summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSantiago Carot-Nemesio <sancane@gmail.com>2012-01-25 14:12:34 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-03 10:44:21 -0800
commit24124f11815fb77c735f3f31304b085e8932b2b0 (patch)
tree2ed16f5c2e5333a752f3caa087d521f8be522b4f /plugins
parent1b44684fb046fe580a3becd17c2652d3f0edd25b (diff)
downloadbluez-24124f11815fb77c735f3f31304b085e8932b2b0.tar.gz
gatt-service: Add support for 128-bit Bluetooth UUIDs
UUID services in GATT should be either 16-bit or 128-bit. Current GATT interface does not allow to provide 128-bit ones. This patch enables plugins to register services using 128-bit UUIDs.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gatt-example.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/gatt-example.c b/plugins/gatt-example.c
index 701c1d7e3..e791c5391 100644
--- a/plugins/gatt-example.c
+++ b/plugins/gatt-example.c
@@ -105,8 +105,11 @@ static uint8_t battery_state_read(struct attribute *a, gpointer user_data)
static gboolean register_battery_service(struct btd_adapter *adapter)
{
- return gatt_service_add(adapter, GATT_PRIM_SVC_UUID,
- BATTERY_STATE_SVC_UUID,
+ bt_uuid_t uuid;
+
+ bt_uuid16_create(&uuid, BATTERY_STATE_SVC_UUID);
+
+ return gatt_service_add(adapter, GATT_PRIM_SVC_UUID, &uuid,
/* battery state characteristic */
GATT_OPT_CHR_UUID, BATTERY_STATE_UUID,
GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ |