summaryrefslogtreecommitdiff
path: root/src/adapter.h
diff options
context:
space:
mode:
authorYun-Hao Chung <howardchung@chromium.org>2021-08-03 19:43:06 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-08-04 15:01:33 -0700
commit86aa6bc91d5458b1c2ef1138e97fb37af4f7939c (patch)
treed1ead16f4e92308dbe816b1f14513a7f4d1abc0c /src/adapter.h
parent320bda705956c53f753d9b8af208dae0352034b7 (diff)
downloadbluez-86aa6bc91d5458b1c2ef1138e97fb37af4f7939c.tar.gz
core: add device callbacks to adapter driver
This adds the following callbacks to btd_adapter_driver. device_added: called when a device is added to the adapter device_removed: called when a device is removed from the adapter device_resolved: called when all services of the device have been resolved.
Diffstat (limited to 'src/adapter.h')
-rw-r--r--src/adapter.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/adapter.h b/src/adapter.h
index 60b5e3bcc..3d69aeda1 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -105,11 +105,19 @@ void btd_adapter_set_class(struct btd_adapter *adapter, uint8_t major,
struct btd_adapter_driver {
const char *name;
- int (*probe) (struct btd_adapter *adapter);
- void (*remove) (struct btd_adapter *adapter);
- void (*resume) (struct btd_adapter *adapter);
+ int (*probe)(struct btd_adapter *adapter);
+ void (*remove)(struct btd_adapter *adapter);
+ void (*resume)(struct btd_adapter *adapter);
+ void (*device_added)(struct btd_adapter *adapter,
+ struct btd_device *device);
+ void (*device_removed)(struct btd_adapter *adapter,
+ struct btd_device *device);
+ void (*device_resolved)(struct btd_adapter *adapter,
+ struct btd_device *device);
};
+void device_resolved_drivers(struct btd_adapter *adapter,
+ struct btd_device *device);
typedef void (*service_auth_cb) (DBusError *derr, void *user_data);
void adapter_add_profile(struct btd_adapter *adapter, gpointer p);