Linux bluetooth development
 help / color / mirror / Atom feed
From: "Elvis Pfützenreuter" <epx@signove.com>
To: linux-bluetooth@vger.kernel.org
Cc: epx@signove.com
Subject: [PATCH 1/2 v3] Add generic descriptor support to Attribute API document
Date: Wed, 23 Feb 2011 10:49:39 -0300	[thread overview]
Message-ID: <1298468980-2215-1-git-send-email-epx@signove.com> (raw)

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


             reply	other threads:[~2011-02-23 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:49 Elvis Pfützenreuter [this message]
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

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=1298468980-2215-1-git-send-email-epx@signove.com \
    --to=epx@signove.com \
    --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