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:
Mikel Astiz 2012-10-19 10:11:24 +02:00 committed by Tanu Kaskinen
parent e68712acb4
commit 640038cc28
3 changed files with 9 additions and 9 deletions

View file

@ -968,7 +968,7 @@ pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discov
return NULL; 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; pa_bluetooth_transport *t;
void *state = NULL; void *state = NULL;
@ -981,7 +981,7 @@ const pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetoo
return NULL; 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; DBusMessage *m, *r;
DBusError err; DBusError err;
int ret; int ret;
@ -1019,7 +1019,7 @@ fail:
return ret; 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; DBusMessage *m;
DBusError err; DBusError err;

View file

@ -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); 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); 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); int pa_bluetooth_transport_acquire(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); void pa_bluetooth_transport_release(pa_bluetooth_transport *t, const char *accesstype);
int pa_bluetooth_transport_parse_property(pa_bluetooth_transport *t, DBusMessageIter *i); int pa_bluetooth_transport_parse_property(pa_bluetooth_transport *t, DBusMessageIter *i);
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *d); pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *d);

View file

@ -344,7 +344,7 @@ static void teardown_stream(struct userdata *u) {
static void bt_transport_release(struct userdata *u) { static void bt_transport_release(struct userdata *u) {
const char *accesstype = "rw"; const char *accesstype = "rw";
const pa_bluetooth_transport *t; pa_bluetooth_transport *t;
/* Ignore if already released */ /* Ignore if already released */
if (!bt_transport_is_acquired(u)) 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) { static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
const char *accesstype = "rw"; const char *accesstype = "rw";
const pa_bluetooth_device *d; const pa_bluetooth_device *d;
const pa_bluetooth_transport *t; pa_bluetooth_transport *t;
if (u->transport == NULL) { if (u->transport == NULL) {
pa_log("Transport no longer available."); pa_log("Transport no longer available.");
@ -1977,7 +1977,7 @@ static void bt_transport_config(struct userdata *u) {
/* Run from main thread */ /* Run from main thread */
static int setup_transport(struct userdata *u) { static int setup_transport(struct userdata *u) {
const pa_bluetooth_device *d; const pa_bluetooth_device *d;
const pa_bluetooth_transport *t; pa_bluetooth_transport *t;
pa_assert(u); pa_assert(u);