summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2013-04-26 11:46:25 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-04-26 14:48:32 +0300
commit10620c1c0fbb211455fde597a1d2e5e47806f25d (patch)
tree70807220fbbbd9a104887ccad265d87e43730409 /src/service.c
parent32a4ce9475d5804b854df0ec145c535b11b147a5 (diff)
downloadbluez-10620c1c0fbb211455fde597a1d2e5e47806f25d.tar.gz
profile: Use btd_service for connect/disconnect
Change the btd_profile connect/disconnect callbacks to receive a btd_service pointer. This should make it possible to handle multiple instances of the same profile in a specific device. The patch strongly influences how the profiles should interact with the core. The state transitions, previously reported using the device.h API (device_profile_connected() and device_profile_disconnected()), have now been replaced by the btd_service API. The transitions will then be propagated to device.c by means of the conventional state-changed callback mechanism.
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index eb765f214..98fcbfeb3 100644
--- a/src/service.c
+++ b/src/service.c
@@ -199,7 +199,7 @@ int btd_service_connect(struct btd_service *service)
change_state(service, BTD_SERVICE_STATE_CONNECTING, 0);
- err = profile->connect(service->device, service->profile);
+ err = profile->connect(service);
if (err == 0)
return 0;
@@ -234,7 +234,7 @@ int btd_service_disconnect(struct btd_service *service)
change_state(service, BTD_SERVICE_STATE_DISCONNECTING, 0);
- err = profile->disconnect(service->device, service->profile);
+ err = profile->disconnect(service);
if (err == 0)
return 0;