Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2 v3] Add generic descriptor support to Attribute API document
@ 2011-02-23 13:49 Elvis Pfützenreuter
  2011-02-23 13:49 ` [PATCH 2/2 v3] Implement generic descriptor access to Attribute API Elvis Pfützenreuter
  2011-02-24 18:29 ` [PATCH 1/2 v3] Add generic descriptor support to Attribute API document Anderson Lizardo
  0 siblings, 2 replies; 5+ messages in thread
From: Elvis Pfützenreuter @ 2011-02-23 13:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: epx

This patch proposes extensions to Attribute API, giving access to all
characteristic descriptors (beyond 'Description' and 'Format').

Client Characteristic Configuration automatic update upon Watcher
registering will be handled by another patch series.
---
 doc/attribute-api.txt |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/doc/attribute-api.txt b/doc/attribute-api.txt
index 23808e6..bb7cbfa 100644
--- a/doc/attribute-api.txt
+++ b/doc/attribute-api.txt
@@ -104,6 +104,7 @@ Methods		dict GetProperties()
 
 			Possible Errors: org.bluez.Error.InvalidArguments
 
+
 Properties 	string UUID [readonly]
 
 			UUID128 of this characteristic.
@@ -143,6 +144,35 @@ Properties 	string UUID [readonly]
 			Friendly representation of the Characteristic Value
 			based on the format attribute.
 
+		dict Descriptors [readwrite]
+
+			Dict of descriptors for this characteristic.
+
+			This dict contains only the descriptors not already
+			covered by other properties (v.g. Description, Format).
+
+			Each descriptor is mapped to an unique object path,
+			which is the dict key.
+
+			Each dict value is, in turn, a dict with at least
+			the following keys:
+
+			{
+				"UUID": string. Descriptor UUID, always present
+				"Value": array of bytes. Raw descriptor value,
+					 present only when/if descriptor value
+					 has been fetched.
+			}
+
+			When updating a descriptor value using SetProperty(),
+			only one descriptor at a time may be updated in order
+			to guarantee unambiguous error reporting. In other
+			words, when calling SetProperty('Descriptors', dict),
+			dict must have exactly one entry.
+
+			Descriptor's UUID may not be updated. If present, it is
+			ignored by SetProperty().
+
 
 Characteristic Watcher hierarchy
 ===============================
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-24 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 13:49 [PATCH 1/2 v3] Add generic descriptor support to Attribute API document Elvis Pfützenreuter
2011-02-23 13:49 ` [PATCH 2/2 v3] Implement generic descriptor access to Attribute API Elvis Pfützenreuter
2011-02-24 18:29 ` [PATCH 1/2 v3] Add generic descriptor support to Attribute API document Anderson Lizardo
2011-02-24 19:34   ` Elvis Pfützenreuter
2011-02-24 20:46     ` Anderson Lizardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox