From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>
Subject: [RFC BlueZ 6/7] attrib-api: Add RegisterWatcher/UnregisterWatcher methods
Date: Mon, 23 Jul 2012 11:55:19 -0400 [thread overview]
Message-ID: <1343058920-18608-7-git-send-email-anderson.lizardo@openbossa.org> (raw)
In-Reply-To: <1343058920-18608-1-git-send-email-anderson.lizardo@openbossa.org>
These methods are used to register or unregister watchers for
characteristics, so applications can be notified when the characteristic
value changes.
The Release() method is added to the Watcher interface to notify the
watcher object that it has been unregistered and is no longer valid.
---
doc/attribute-api.txt | 7 +++++++
doc/service-api.txt | 21 +++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/doc/attribute-api.txt b/doc/attribute-api.txt
index 4b392b9..0805756 100644
--- a/doc/attribute-api.txt
+++ b/doc/attribute-api.txt
@@ -120,3 +120,10 @@ Methods void ValueChanged(object characteristic, dict value)
This method is only called when the "raw" setting is
enabled on Adapter.RegisterCharacteristicsWatcher().
+
+ void Release()
+
+ This method is called when the service daemon
+ unregisters the watcher, which can then perform cleanup
+ tasks. There is no need to unregister the watcher if
+ this method is called.
diff --git a/doc/service-api.txt b/doc/service-api.txt
index 5c8c7f3..0139f5f 100644
--- a/doc/service-api.txt
+++ b/doc/service-api.txt
@@ -43,6 +43,27 @@ Methods uint32 AddRecord(string record)
org.bluez.Error.DoesNotExist
org.bluez.Error.Failed
+ void RegisterWatcher(object agent, dict settings,
+ array{object} characteristics)
+
+ Register a watcher to monitor characteristic changes.
+
+ A watcher will be registered for each specified
+ characteristic object. The settings dictionary has the
+ following format:
+
+ {
+ "raw": boolean (optional)
+ }
+
+ If the "raw" setting is enabled, the RawValueChanged()
+ watcher method is called when the characteristic value
+ changes, otherwise, ValueChanged() is called.
+
+ void UnregisterWatcher(object agent)
+
+ Unregister a characteristic watcher.
+
void RequestAuthorization(string address, uint32 handle)
Request an authorization for an incoming connection
--
1.7.9.5
next prev parent reply other threads:[~2012-07-23 15:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 15:55 [RFC BlueZ 0/7] Generic GATT API changes Anderson Lizardo
2012-07-23 15:55 ` [RFC BlueZ 1/7] attrib-api: Remove local service hierarchy Anderson Lizardo
2012-07-23 15:55 ` [RFC BlueZ 2/7] attrib-api: Update introduction text Anderson Lizardo
2012-07-23 15:55 ` [RFC BlueZ 3/7] attrib-api: Remove GATT service hierarchy Anderson Lizardo
2012-07-23 15:55 ` [RFC BlueZ 4/7] attrib-api: Update Characteristic interface Anderson Lizardo
2012-07-23 15:55 ` [RFC BlueZ 5/7] attrib-api: Update Watcher interface methods Anderson Lizardo
2012-07-23 15:55 ` Anderson Lizardo [this message]
2012-07-23 15:55 ` [RFC BlueZ 7/7] doc: Add Register/Unregister GATT based services Anderson Lizardo
2012-07-24 9:27 ` Johan Hedberg
2012-07-24 9:53 ` [RFC BlueZ 0/7] Generic GATT API changes Johan Hedberg
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=1343058920-18608-7-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;
as well as URLs for NNTP newsgroup(s).