summaryrefslogtreecommitdiff
path: root/profiles/alert
diff options
context:
space:
mode:
authorBruna Moreira <bruna.moreira@openbossa.org>2012-10-02 16:24:27 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-10-03 22:22:48 +0300
commit5d892e6d2b356666af99c5250fd870389558a62d (patch)
tree2cd9e19b03ab3cc1e6a510e7a466a11cf23f9ece /profiles/alert
parentda5e0bb9752fd0c843641e36e3da43d040eae2aa (diff)
downloadbluez-5d892e6d2b356666af99c5250fd870389558a62d.tar.gz
alert: Add Phone Alert Status Service
Add Phone Alert Status service for PASP.
Diffstat (limited to 'profiles/alert')
-rw-r--r--profiles/alert/server.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/profiles/alert/server.c b/profiles/alert/server.c
index dc844d398..b39ef8a0e 100644
--- a/profiles/alert/server.c
+++ b/profiles/alert/server.c
@@ -27,14 +27,35 @@
#endif
#include <stdbool.h>
+#include <glib.h>
+#include <bluetooth/uuid.h>
+#include "att.h"
#include "adapter.h"
+#include "gatt-service.h"
+#include "gattrib.h"
+#include "gatt.h"
#include "server.h"
#include "profile.h"
+#define PHONE_ALERT_STATUS_SVC_UUID 0x180E
+
+static void register_phone_alert_service(struct btd_adapter *adapter)
+{
+ bt_uuid_t uuid;
+
+ bt_uuid16_create(&uuid, PHONE_ALERT_STATUS_SVC_UUID);
+
+ /* Phone Alert Status Service */
+ gatt_service_add(adapter, GATT_PRIM_SVC_UUID, &uuid,
+ GATT_OPT_INVALID);
+}
+
static int alert_server_probe(struct btd_profile *p,
struct btd_adapter *adapter)
{
+ register_phone_alert_service(adapter);
+
return 0;
}