summaryrefslogtreecommitdiff
path: root/attrib
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2011-01-07 16:12:12 -0400
committerJohan Hedberg <johan.hedberg@nokia.com>2011-01-07 22:28:24 +0200
commit8a07d7e4d1d9fb9436be889f7a63029617e80eb4 (patch)
tree014f82e43fc6d67100b5b50eff970571c7e49f19 /attrib
parenta5797b18a33f03cca891e95dfb04be9c5565411b (diff)
downloadbluez-8a07d7e4d1d9fb9436be889f7a63029617e80eb4.tar.gz
Move GAP service registration to src/attrib-server.c
GAP service shall be registered only once, so it makes sense to move it to the core attribute server code. The GAP "Device Name" characteristic was always "Example Device" on the example server. This has been changed to use the Name attribute from main.conf.
Diffstat (limited to 'attrib')
-rw-r--r--attrib/example.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/attrib/example.c b/attrib/example.c
index f28068a0b..41c76ebc5 100644
--- a/attrib/example.c
+++ b/attrib/example.c
@@ -61,7 +61,6 @@
static int register_attributes(void)
{
- const char *devname = "Example Device";
const char *desc_out_temp = "Outside Temperature";
const char *desc_out_hum = "Outside Relative Humidity";
const char *desc_weight = "Rucksack Weight";
@@ -79,24 +78,6 @@ static int register_attributes(void)
uuid_t uuid;
int len;
- /* GAP service: primary service definition */
- sdp_uuid16_create(&uuid, GATT_PRIM_SVC_UUID);
- att_put_u16(GENERIC_ACCESS_PROFILE_ID, &atval[0]);
- attrib_db_add(0x0001, &uuid, ATT_NONE, ATT_NOT_PERMITTED, atval, 2);
-
- /* GAP service: device name characteristic */
- sdp_uuid16_create(&uuid, GATT_CHARAC_UUID);
- atval[0] = ATT_CHAR_PROPER_READ;
- att_put_u16(0x0006, &atval[1]);
- att_put_u16(GATT_CHARAC_DEVICE_NAME, &atval[3]);
- attrib_db_add(0x0004, &uuid, ATT_NONE, ATT_NOT_PERMITTED, atval, 5);
-
- /* GAP service: device name attribute */
- sdp_uuid16_create(&uuid, GATT_CHARAC_DEVICE_NAME);
- len = strlen(devname);
- strncpy((char *) atval, devname, len);
- attrib_db_add(0x0006, &uuid, ATT_NONE, ATT_NOT_PERMITTED, atval, len);
-
/* GATT service: primary service definition */
sdp_uuid16_create(&uuid, GATT_PRIM_SVC_UUID);
att_put_u16(GENERIC_ATTRIB_PROFILE_ID, &atval[0]);