Return-Path: Message-ID: From: Claudio Takahasi To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] Device Configuration D-Bus services In-Reply-To: <1130189692.7840.21.camel@blade> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5307_2220572.1130241940854" References: <3013cac80510241400k2b71125ao7b8b4dfe5077a300@mail.gmail.com> <1130189692.7840.21.camel@blade> 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: Tue, 25 Oct 2005 10:05:40 -0200 ------=_Part_5307_2220572.1130241940854 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Basically the services under the path "/org/bluez/Devices" will provide a way to userspace applications setup the devices, a similar functionality provided by hciconfig. The security issues will be handled by the D-Bus configuration file. Regarding the SetProperty/GetProperty... There are a lot of commands that we intend provide: up, down, reset, rstat, auth, noauth, encrypt, .... My initial suggestion was divide the services into TWO groups: * Device independant, path: /org/bluez/Devices, interface: path: org.bluez.Devices Services: - Up - Down - Reset * Device Based services, path: /org/bluez/Devices/hciX, interface: path: org.bluez.Devices Services: - auth - noauth - encrypt - noencrypt - secmgr - nosecmgr - piscan - noscan - iscan - pscan ... In order to make the API more clean, the device based services will use the method name(SerProperty/GetProperty), where the first message argument is the command identification (auth, noauth, encrypt,...) The question is: if we use an String representation of the command the client coding will be more "legible" by other hand the hcid message argument extracting/comparison will be more expensive than extract a byte or a integer. Which approach do you prefer? Regards, Claudio On 10/24/05, Marcel Holtmann wrote: > > Hi Eduardo, > > > here is the initial patch regarding /org/bluez/Devices. I keep it > > really simple so we can improve it in small steps. I've merged the > > Claudio's code for register and unregister a new path for a device in > > two funcions as this code is used in 3 different parts of the code. > > call it *register_device() and *register_manager(). > > > For now I've leaved the syslog call to register and unregister > > operations so we can see if every thing is going ok. > > I think it is a good idea to introduce some DBG() defines. > > > My next step is to provide a list of registed devices (not only the > > devices that are up) through /org/bluez/Devices path. > > Feel free to send another patch on top of this one. > > > One question: the SetProperty and GetProperty will use an interger or > > a string constant to determing which operation will be used? > > You need to explain to me what you are talking about. Regards > > Marcel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel > -- --------------------------------------------------------- Claudio Takahasi Instituto Nokia de Tecnologia - INdT ------=_Part_5307_2220572.1130241940854 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,

Basically the services under the path "/org/bluez/Devices" will provide a way to userspace applications setup the devices, a similar
functionality provided by hciconfig. The security issues will be handled by=
the D-Bus configuration file.

Regarding the SetProperty/GetProperty...
There are a lot of commands that we intend provide: up, down, reset, rstat,= auth, noauth, encrypt, ....
My initial suggestion was divide the services into TWO groups:
* Device independant, path: /org/bluez/Devices, interface: path: org.bluez.= Devices
   Services:
    - Up
    - Down
    - Reset

* Device Based services, path: /org/bluez/Devices/hciX, interface: path: or= g.bluez.Devices
  Services:
        - auth
        - noauth
        - encrypt
        - noencrypt
        - secmgr
        - nosecmgr
        - piscan
        - noscan
        - iscan
        - pscan
 ...

In order to make the API more clean, the device based services will use the= method
name(SerProperty/GetProperty), where the first message argument is the comm= and
identification (auth, noauth, encrypt,...)

The question is: if we use an String representation of the command the clie= nt coding
will be more "legible" by other hand the hcid message argument ex= tracting/comparison
will be more expensive than extract a byte or a integer. Which approach do = you prefer?

Regards,
Claudio



On 10/24/05, Marcel Holtmann <marcel@= holtmann.org> wrote:
Hi Eduardo,

> here is the initial patch regarding /org/bluez/Devi= ces. I keep it
> really simple so we can improve it in small steps. I= 've merged the
> Claudio's code for register and unregister a new pat= h for a device in
> two funcions as this code is used in 3 different parts of the code= .

call it *register_device() and *register_manager().

> Fo= r now I've leaved the syslog call to register and unregister
> operat= ions so we can see if every thing is going ok.

I think it is a good idea to introduce some DBG() defines.

&= gt; My next step is to provide a list of registed devices (not only the
= > devices that are up) through /org/bluez/Devices path.

Feel free= to send another patch on top of this one.

> One question: the SetProperty and GetProperty will use an inte= rger or
> a string constant to determing which operation will be used= ?

You need to explain to me what you are talking about.
 

Regards

Marcel




-------------------------------------------------------
= This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * R= egister for a JBoss Training Course
Free Certification Exam for All Trai= ning Attendees Through End of 2005
Visit http://ww= w.jboss.com/services/certification for more information
____________= ___________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/list= info/bluez-devel



-- ---------------------------------------------------------
Claudio Takaha= si
Instituto Nokia de Tecnologia - INdT ------=_Part_5307_2220572.1130241940854-- ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel