Return-Path: Message-ID: From: Claudio Takahasi To: bluez-devel@lists.sourceforge.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1959_15563838.1129727167974" Subject: [Bluez-devel] Device Configuration D-Bus services Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 19 Oct 2005 11:06:07 -0200 ------=_Part_1959_15563838.1129727167974 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi folks, I would like to bring up the device configuration services before start coding, I would like design how these services will work and receive comments. The services provided under these paths/interfaces will not be public. Only an administrator group or a root will be allowed to send messages. We don't need care about the configuration file rules now, it can be defined later. In my opinion it's better use the same approach of the Manager. A main path object "/org/bluez/Manager" (FALLBACK) should catch messages sent to unregistered paths and handle services like: - DeviceList, displays UP/DOWN devices - UP - DOWN - RESET The device based paths can provide services like: - SetProperty - GetProperty - Commands - Features Using SetProperty/GetProperty instead of define one method name for each property is more clean. However it is important keep in mind that the documentation of this service must be well-defined, because the method call/method reply arguments will have different argument number and types. In the method call, the first argument must be a byte(faster comparison) indicating the command code instead of use a string to represent the command. Suggested paths and Interfaces: *** Main path path: /org/bluez/Devices interface: org.bluez.Devices *** Device based path: /org/bluez/Devices/hciX interface: org.bluez.Devices Another point is the message handler function. Currently, there is only one function responsible for handle the messages. In my opinion it will be better create other DBusObjectPathVTable to address Device messages for make the logic more clear. For SetProperty/GetProperty will be required extract the first argument to get the command code in the message handle function. Is everything ok? Any comments? Regards, Claudio. -- --------------------------------------------------------- Claudio Takahasi Nokia's Institute of Technology - INdT claudio.takahasi@indt.org.br ------=_Part_1959_15563838.1129727167974 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi folks,

I would like to bring up the device configuration services before start coding, I would like design how these services will work and receive commen= ts.

The services provided under these paths/interfaces will not be public. Only=
an administrator group or a root will be allowed to send messages. We don't=
need care about the configuration file rules now, it can be defined later.<= br>
In my opinion it's better use the same approach of the Manager. A main path=
object "/org/bluez/Manager" (FALLBACK) should catch messages sent= to unregistered
paths and handle services like:
- DeviceList, displays UP/DOWN devices
- UP
- DOWN
- RESET

The device based paths can provide services like:
- SetProperty
- GetProperty
- Commands
- Features

Using SetProperty/GetProperty instead of define one method name for each property is more clean. However it is important keep in mind that the
documentation of this service must be well-defined, because the method
call/method reply arguments will have different argument number and types.<= br> In the method call, the first argument must be a byte(faster comparison) indicating the command code instead of use a string to represent the comman= d.

Suggested paths and Interfaces:
*** Main path
path:
/org/bluez/Devices
interface: org.bluez.Devices

*** Device based
path:
/org/bluez/Devices/hciX
interface: org.bluez.Devices


Another point is the message handler function. Currently, there is only one=
function responsible for handle the messages. In my opinion it will be bett= er
create other DBusObjectPathVTable to address Device messages for make the <= br> logic more clear. For SetProperty/GetProperty will be required extract the<= br> first argument to get the command code in the message handle function.


Is everything  ok? Any comments?

Regards,
Claudio.

--
--------------------------------------= -------------------
Claudio Takahasi
Nokia's Institute of Technology = - INdT
claudio.takahasi@= indt.org.br
------=_Part_1959_15563838.1129727167974-- ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel