summaryrefslogtreecommitdiff
path: root/src/device.h
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@codecoup.pl>2018-03-28 12:10:55 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-03-29 14:20:11 +0300
commita0b886e26c83ad4dfbf0b2b2e024c8ce9ead9a7d (patch)
tree87e22692148120090c347fbc694ff2f1ec8de043 /src/device.h
parent2c3bba7b38be03834162e34069156f1fd49f0528 (diff)
downloadbluez-a0b886e26c83ad4dfbf0b2b2e024c8ce9ead9a7d.tar.gz
gatt: Add support for storing Service Changed CCC value
This adds support for storing CCC value of Service Changed characteristic. Once bluetoothd is restart stored values are read and any device subscribed to indications will receive Service Changed indication with 0x00010-0xffff value. This is to invalidate any non-core services since there is no way to verify if applications will register their services in same order (or at all). This fix accessing invalid handles by stacks that rely only on Service Changed indication for rediscovery ie. Apple iOS.
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.h b/src/device.h
index 306c813fc..b90f9273a 100644
--- a/src/device.h
+++ b/src/device.h
@@ -87,6 +87,7 @@ void device_probe_profile(gpointer a, gpointer b);
void device_remove_profile(gpointer a, gpointer b);
struct btd_adapter *device_get_adapter(struct btd_device *device);
const bdaddr_t *device_get_address(struct btd_device *device);
+uint8_t device_get_le_address_type(struct btd_device *device);
const char *device_get_path(const struct btd_device *device);
gboolean device_is_temporary(struct btd_device *device);
bool device_is_connectable(struct btd_device *device);
@@ -132,6 +133,11 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg);
bool device_is_disconnecting(struct btd_device *device);
void device_set_ltk_enc_size(struct btd_device *device, uint8_t enc_size);
+void device_store_svc_chng_ccc(struct btd_device *device, uint8_t bdaddr_type,
+ uint16_t value);
+void device_load_svc_chng_ccc(struct btd_device *device, uint16_t *ccc_le,
+ uint16_t *ccc_bredr);
+
typedef void (*disconnect_watch) (struct btd_device *device, gboolean removal,
void *user_data);