summaryrefslogtreecommitdiff
path: root/src/profile.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-12-11 10:29:49 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-12-11 10:29:49 +0200
commitafc8cdfb40888c6029d7fdbbf902e9e55dfcd758 (patch)
treefb62f477708b34c934901857080ef96f5f1dd18e /src/profile.h
parent6ba4ea63efe5376064dfb267f8bc46e1ad5ec328 (diff)
downloadbluez-afc8cdfb40888c6029d7fdbbf902e9e55dfcd758.tar.gz
profile: Use direct calls for profile connection states
In order to be able to track also remotely initiated connections we cannot have a callback system where device.c passes a function pointer to the profile implementation. Instead we need explicit calls to device.c whenever the connection state changes.
Diffstat (limited to 'src/profile.h')
-rw-r--r--src/profile.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/profile.h b/src/profile.h
index 6991041d3..826d8dd52 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -29,8 +29,8 @@
struct btd_profile;
-typedef void (*btd_profile_cb)(struct btd_profile *profile,
- struct btd_device *device, int err);
+typedef void (*btd_profile_cb)(struct btd_device *device,
+ struct btd_profile *profile, int err);
struct btd_profile {
const char *name;
@@ -46,11 +46,10 @@ struct btd_profile {
void (*device_remove) (struct btd_profile *p,
struct btd_device *device);
- int (*connect) (struct btd_device *device, struct btd_profile *profile,
- btd_profile_cb cb);
+ int (*connect) (struct btd_device *device,
+ struct btd_profile *profile);
int (*disconnect) (struct btd_device *device,
- struct btd_profile *profile,
- btd_profile_cb cb);
+ struct btd_profile *profile);
int (*adapter_probe) (struct btd_profile *p,
struct btd_adapter *adapter);