From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>
Subject: [PATCH v2 BlueZ 01/27] doc: Introduce Alert API
Date: Thu, 27 Sep 2012 14:36:10 -0400 [thread overview]
Message-ID: <1348770996-12236-2-git-send-email-anderson.lizardo@openbossa.org> (raw)
In-Reply-To: <1348770996-12236-1-git-send-email-anderson.lizardo@openbossa.org>
This API will be implemented and initially used by Phone Alert Status
and Alert Notification GATT profiles (server role).
---
Makefile.am | 2 +-
doc/alert-api.txt | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+), 1 deletion(-)
create mode 100644 doc/alert-api.txt
diff --git a/Makefile.am b/Makefile.am
index 315077f..a42544d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -385,7 +385,7 @@ EXTRA_DIST += doc/manager-api.txt \
doc/network-api.txt doc/input-api.txt doc/audio-api.txt \
doc/control-api.txt doc/hfp-api.txt doc/health-api.txt \
doc/sap-api.txt doc/media-api.txt doc/assigned-numbers.txt \
- doc/supported-features.txt
+ doc/supported-features.txt doc/alert-api.txt
AM_YFLAGS = -d
diff --git a/doc/alert-api.txt b/doc/alert-api.txt
new file mode 100644
index 0000000..e58430c
--- /dev/null
+++ b/doc/alert-api.txt
@@ -0,0 +1,109 @@
+BlueZ D-Bus Alert API description
+*********************************
+
+Copyright (C) 2012 Instituto Nokia de Tecnologia - INdT
+
+Introduction
+------------
+
+Currently, there are two different GATT server profiles that depend on
+receiving alerts or notifications from the platform: Phone Alert Status (PASP)
+and Alert Notification (ANP). PASP is very specific to mobile phones, and also
+allows limited control to alerts (i.e. mute once or switch to a silent mode).
+
+This document presents a unified API that allows to register and notify alerts,
+and to control some alerts (using the provided agent object).
+
+
+Alert hierarchy
+===============
+
+Service org.bluez
+Interface org.bluez.Alert
+Object path /org/bluez
+
+Methods void RegisterAlert(string category, object agent)
+
+ Register a new alert category and an agent for it. This
+ means the application will be responsible for notifying
+ BlueZ of any alerts of that category, using the
+ NewAlert() method.
+
+ Supported ANP categories: simple, email, news, call,
+ missed_call, sms_mms, voice_mail, schedule,
+ high_priority, instant_message
+ Supported PASP categories: ringer, vibrate, display
+
+ Possible Errors: org.bluez.Error.InvalidArguments
+
+ void NewAlert(string category, uint16 count, string description)
+
+ Notify BlueZ of new alert(s) for the given category. The
+ description is relative to the last received alert and
+ can be sender name, caller ID, title, or other
+ information specific to the category.
+
+ For ringer, vibrate and display categories, valid
+ descriptions are "active" and "not active". Alerts from
+ ringer category also accept "enabled" and "disabled",
+ depending on whether ringer is in silent mode or not.
+
+ Description must not exceed 18 bytes when encoded in
+ UTF-8 format, otherwise an error is returned. If there
+ is no description, an empty string should be used.
+
+ The count argument contains the number of alerts not
+ yet acknowledged by the user on the UI. To save D-Bus
+ traffic, events that may generate multiple alerts at
+ the same time (like email, sms, news) should trigger a
+ single NewAlert().
+
+ If there are more than 254 new alerts, count must be
+ set to 255. PASP alerts should always set count to 1.
+
+ Possible Errors: org.bluez.Error.InvalidArguments
+
+ void UnreadAlert(string category, uint16 count)
+
+ Some services (like SMS and e-mail) keep track of
+ number of unread items. This method allows to update
+ this counter, so peer devices can be notified using
+ Alert Notification Profile.
+
+ If there are more than 254 unread alerts, count must be
+ set to 255.
+
+ Possible Errors: org.bluez.Error.InvalidArguments
+
+Alert Agent hierarchy
+=====================
+
+Service org.bluez
+Interface org.bluez.AlertAgent
+Object path freely definable
+
+Methods void MuteOnce()
+
+ This method is only called if "ringer" alert category
+ is specified when registering the agent.
+
+ Mute the ringer once (e.g. during a incoming call). If
+ ringer is not active, does nothing.
+
+ void SetRinger(string mode)
+
+ This method is only called if "ringer" alert category
+ is specified when registering the agent.
+
+ Set ringer to the specified mode. If mode is "enabled",
+ ringer is set to the default mode, as defined by the
+ current active profile. If mode is "disabled", ringer
+ will not activate on incoming calls, until it is set
+ back to "enabled" mode.
+
+ Possible Errors: org.bluez.Error.InvalidArguments
+
+ void Release()
+
+ Release this agent. At this point, it will not be used
+ by BlueZ anymore and can be destroyed by the owner.
--
1.7.9.5
next prev parent reply other threads:[~2012-09-27 18:36 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 18:00 [PATCH BlueZ 00/25] Add support for PASP and ANP server profiles Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 01/25] doc: Introduce Alert API Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 02/25] alert: Introduce manager abstraction layer Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 03/25] alert: Initial profile registration Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 04/25] alert: Add Phone Alert Status Service Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 05/25] alert: Add Ringer Control Point characteristic Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 06/25] alert: Add Ringer Setting characteristic Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 07/25] alert: Add Alert Status characteristic Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 08/25] alert: Initial Alert Notification Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 09/25] alert: Implement category registration in RegisterAlert() Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 10/25] alert: Add initial support for NewAlert D-Bus method Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 11/25] alert: Add initial support for UnreadAlert " Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 12/25] alert: Automatically unregister alert when agent leaves D-Bus Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 13/25] alert: Add per adapter attribute handle information Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 14/25] alert: Update Supported New/Unread Category characteristic values Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 15/25] alert: Update new alert characteristic value Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 16/25] alert: Update unread " Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 17/25] alert: Implement MuteOnce command Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 18/25] alert: Add support for calling MuteOnce() Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 19/25] alert: Add support for calling SetRinger() Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 20/25] alert: Add test-alert script Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 21/25] alert: Update Alert Status and Ringer Setting characteristic values Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 22/25] alert: Add support for ringer setting notification Anderson Lizardo
2012-09-24 18:00 ` [PATCH BlueZ 23/25] alert: Add support for alert status notification Anderson Lizardo
2012-09-24 18:01 ` [PATCH BlueZ 24/25] alert: Add support for new alert notification Anderson Lizardo
2012-09-24 18:01 ` [PATCH BlueZ 25/25] alert: Add support for unread " Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 00/27] Add support for PASP and ANP server profiles Anderson Lizardo
2012-09-27 18:36 ` Anderson Lizardo [this message]
2012-09-27 18:36 ` [PATCH v2 BlueZ 02/27] alert: Introduce manager abstraction layer Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 03/27] alert: Initial profile registration Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 04/27] alert: Add Phone Alert Status Service Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 05/27] alert: Add Ringer Control Point characteristic Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 06/27] alert: Add Ringer Setting characteristic Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 07/27] alert: Add Alert Status characteristic Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 08/27] alert: Initial Alert Notification Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 09/27] alert: Implement category registration in RegisterAlert() Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 10/27] alert: Add initial support for NewAlert D-Bus method Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 11/27] alert: Add initial support for UnreadAlert " Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 12/27] alert: Automatically unregister alert when agent leaves D-Bus Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 13/27] alert: Add per adapter attribute handle information Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 14/27] alert: Update Supported New/Unread Category characteristic values Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 15/27] alert: Update new alert characteristic value Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 16/27] alert: Update unread " Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 17/27] alert: Implement MuteOnce command Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 18/27] alert: Add support for calling MuteOnce() Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 19/27] alert: Add support for calling SetRinger() Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 20/27] alert: Add test-alert script Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 21/27] alert: Update Alert Status and Ringer Setting characteristic values Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 22/27] alert: Add support for ringer setting notification Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 23/27] alert: Add support for alert status notification Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 24/27] alert: Add support for new alert notification Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 25/27] alert: Add support for unread " Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 26/27] alert: Implement Release() agent method Anderson Lizardo
2012-09-27 18:36 ` [PATCH v2 BlueZ 27/27] alert: Add org.bluez.AlertAgent to D-Bus policy file Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 00/27] Add support for PASP and ANP server profiles Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 01/27] doc: Introduce Alert API Anderson Lizardo
2012-10-03 8:21 ` Johan Hedberg
2012-10-03 10:56 ` Anderson Lizardo
2012-10-03 12:46 ` [PATCH v4 " Anderson Lizardo
2012-10-03 19:39 ` Johan Hedberg
2012-10-03 20:17 ` Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 02/27] alert: Introduce manager abstraction layer Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 03/27] alert: Initial profile registration Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 04/27] alert: Add Phone Alert Status Service Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 05/27] alert: Add Ringer Control Point characteristic Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 06/27] alert: Add Ringer Setting characteristic Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 07/27] alert: Add Alert Status characteristic Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 08/27] alert: Initial Alert Notification Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 09/27] alert: Implement category registration in RegisterAlert() Anderson Lizardo
2012-10-03 12:49 ` [PATCH v4 " Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 10/27] alert: Add initial support for NewAlert D-Bus method Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 11/27] alert: Add initial support for UnreadAlert " Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 12/27] alert: Automatically unregister alert when agent leaves D-Bus Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 13/27] alert: Add per adapter attribute handle information Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 14/27] alert: Update Supported New/Unread Category characteristic values Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 15/27] alert: Update new alert characteristic value Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 16/27] alert: Update unread " Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 17/27] alert: Implement MuteOnce command Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 18/27] alert: Add support for calling MuteOnce() Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 19/27] alert: Add support for calling SetRinger() Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 20/27] alert: Add test-alert script Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 21/27] alert: Update Alert Status and Ringer Setting characteristic values Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 22/27] alert: Add support for ringer setting notification Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 23/27] alert: Add support for alert status notification Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 24/27] alert: Add support for new alert notification Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 25/27] alert: Add support for unread " Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 26/27] alert: Implement Release() agent method Anderson Lizardo
2012-10-02 20:24 ` [PATCH v3 BlueZ 27/27] alert: Add org.bluez.AlertAgent to D-Bus policy file Anderson Lizardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348770996-12236-2-git-send-email-anderson.lizardo@openbossa.org \
--to=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox