mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Remove const qualifier for transports
The internal API in bluetooth-util should not use the const qualifier for operations modifying the transport object. This is specially useful in order to use the available hooks.
This commit is contained in:
		
							parent
							
								
									e68712acb4
								
							
						
					
					
						commit
						640038cc28
					
				
					 3 changed files with 9 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -968,7 +968,7 @@ pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discov
 | 
			
		|||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile) {
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile) {
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
    void *state = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -981,7 +981,7 @@ const pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetoo
 | 
			
		|||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int pa_bluetooth_transport_acquire(const pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu) {
 | 
			
		||||
int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu) {
 | 
			
		||||
    DBusMessage *m, *r;
 | 
			
		||||
    DBusError err;
 | 
			
		||||
    int ret;
 | 
			
		||||
| 
						 | 
				
			
			@ -1019,7 +1019,7 @@ fail:
 | 
			
		|||
    return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void pa_bluetooth_transport_release(const pa_bluetooth_transport *t, const char *accesstype) {
 | 
			
		||||
void pa_bluetooth_transport_release(pa_bluetooth_transport *t, const char *accesstype) {
 | 
			
		||||
    DBusMessage *m;
 | 
			
		||||
    DBusError err;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,10 +133,10 @@ const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_disco
 | 
			
		|||
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
 | 
			
		||||
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discovery *y, const char *path);
 | 
			
		||||
const pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile);
 | 
			
		||||
pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile);
 | 
			
		||||
 | 
			
		||||
int pa_bluetooth_transport_acquire(const pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu);
 | 
			
		||||
void pa_bluetooth_transport_release(const pa_bluetooth_transport *t, const char *accesstype);
 | 
			
		||||
int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, const char *accesstype, size_t *imtu, size_t *omtu);
 | 
			
		||||
void pa_bluetooth_transport_release(pa_bluetooth_transport *t, const char *accesstype);
 | 
			
		||||
int pa_bluetooth_transport_parse_property(pa_bluetooth_transport *t, DBusMessageIter *i);
 | 
			
		||||
 | 
			
		||||
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *d);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -344,7 +344,7 @@ static void teardown_stream(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
static void bt_transport_release(struct userdata *u) {
 | 
			
		||||
    const char *accesstype = "rw";
 | 
			
		||||
    const pa_bluetooth_transport *t;
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
 | 
			
		||||
    /* Ignore if already released */
 | 
			
		||||
    if (!bt_transport_is_acquired(u))
 | 
			
		||||
| 
						 | 
				
			
			@ -382,7 +382,7 @@ static pa_bt_audio_state_t get_profile_audio_state(const struct userdata *u, con
 | 
			
		|||
static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 | 
			
		||||
    const char *accesstype = "rw";
 | 
			
		||||
    const pa_bluetooth_device *d;
 | 
			
		||||
    const pa_bluetooth_transport *t;
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
 | 
			
		||||
    if (u->transport == NULL) {
 | 
			
		||||
        pa_log("Transport no longer available.");
 | 
			
		||||
| 
						 | 
				
			
			@ -1977,7 +1977,7 @@ static void bt_transport_config(struct userdata *u) {
 | 
			
		|||
/* Run from main thread */
 | 
			
		||||
static int setup_transport(struct userdata *u) {
 | 
			
		||||
    const pa_bluetooth_device *d;
 | 
			
		||||
    const pa_bluetooth_transport *t;
 | 
			
		||||
    pa_bluetooth_transport *t;
 | 
			
		||||
 | 
			
		||||
    pa_assert(u);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue