From 96f60e1411514fb4b0d8690aca1c02b3c6b32b9c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 10 Sep 2012 15:38:55 +0300 Subject: [PATCH] profile: Add asynchronous completion functions for connect/disconnect --- src/profile.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/profile.h b/src/profile.h index 9088c322d..a29746244 100644 --- a/src/profile.h +++ b/src/profile.h @@ -23,6 +23,10 @@ #define BTD_UUIDS(args...) ((const char *[]) { args, NULL } ) +struct btd_profile; + +typedef void (*btd_profile_cb)(struct btd_profile *profile, void *data); + struct btd_profile { const char *name; @@ -34,8 +38,10 @@ struct btd_profile { int (*device_probe) (struct btd_device *device, GSList *uuids); void (*device_remove) (struct btd_device *device); - void (*connect) (struct btd_device *device); - void (*disconnect) (struct btd_device *device); + void (*connect) (struct btd_device *device, btd_profile_cb cb, + void *data); + void (*disconnect) (struct btd_device *device, btd_profile_cb cb, + void *data); int (*adapter_probe) (struct btd_adapter *adapter); void (*adapter_remove) (struct btd_adapter *adapter); -- 2.47.3