From: Santiago Carot-Nemesio <scarot@libresoft.es>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: HDP proposed API
Date: Tue, 04 May 2010 09:55:41 +0200 [thread overview]
Message-ID: <1272959741.2182.123.camel@mosquito> (raw)
Hello,
Next is the API wich we have been working last weeks.
Regards.
BlueZ D-Bus HDP API description
***********************************
Authors:
Santiago Carot-Nemesio sancane@gmail.com
Jose Antonio Santos-Cadenas santoscadenas@gmail.com
Health Device Profile hierarchy
===============================
Service org.bluez
Interface org.bluez.Hdp
Object path [variable prefix]/{hci0,hci1,...}
Methods object CreateSession(object path, byte data_spec)
Returns the object path for the new HDP session.
The path parameter is the path of the remote object
with the callbacks to nofity events (see
org.bluez.HdpAgent at the end of this document)
The data_spec is the data exchange specficication
(see section 5.2.10 of the specification document)
Possible errors: org.bluez.Error.InvalidArguments
void DeleteSession(object path)
Delete the HDP session identified by the object path.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
--------------------------------------------------------------------------------
Service org.bluez
Interface org.bluez.HdpSession
Object path [variable prefix]/{hci0,hci1,...}/{hdp0,hdp1,...}
uint8 AllocateMdep(uint8 role)
This method allocates a logical end point. Valids values
for MDEP roles are:
* 0x00 For source
* 0x01 For sink
The return value is the allocated MDEP.
void AddFeature(uint8 mdepid, uint16 dtype, string dscr)
Add a new entry in the HDP supported feature list with
the role given in the MDEP id.
If the new feature has the same data type as other
previusly added feature for the same MDEP id, the old
feature will be overwritten.
void Start()
Starts the associated MCAP layer and set up the SDP
registry with all supported features.
Possible errors: org.bluez.Error.HdpError
object Connect(string btaddr)
Connect with the device and returns the object path of
the remote device.
To call this method, the session must be started.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.HdpError
void Disconnect(object device, boolean delete)
Disconnect from the remote device. If delete is true, any
status will also be deleted. Otherwise, the status will
be keeped for allowing future reconnections.
To call this method, the session must be started.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
org.bluez.Error.HdpError
--------------------------------------------------------------------------------
Service org.bluez
Interface org.bluez.HdpDevice
Object path [variable prefix]/{hci0,hci1,...}/{hdp0,hdp1,...}/dev_XX_XX_XX_XX_XX_XX
boolean Echo(array{byte})
Sends an echo petition to the remote device. Return True
if response matches with the buffer sended. If some error
is detected False value is returned and the associated
MCL is closed.
uint16 OpenDc(byte mdepid, byte config)
Creates a new data channel with the indicated config
to the remote MCAP Data End Point (MDEP).
The configuration should indicate the channel quality of
service.
Returns the data channel id.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.HdpError
file_descriptor GetDcFd(uint16 mdlid)
Gets a file descriptor where data can be readed or
writed for receive or sent by the data channel.
Returns the file descriptor
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
org.bluez.Error.HdpError
void DeleteDc(uint16 mdlid)
Deletes a data channel so it will not be available for
use.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
org.bluez.Error.HdpError
void DeleteAllDc()
Deletes all data channels so it will not be available
for use. Typically this function is called when the
connection with the remote device will be closed
permanently
Possible errors: org.bluez.Error.HdpError
uint16 FirstRelDc()
Returns the identificator of the first reliable data
channel connected for this device.
Possible errors: org.bluez.Error.HdpError
HDPAgent hierarchy
==================
Service unique name
Interface org.bluez.HdpAgent
Object path freely definable
void DeviceConnected(object path)
This method is called whenever a new device connection
has been established over the control channel of the
current HDP session. The objectpath contains the object
path of the remote device.
void DeviceDisconnected(object path)
This method is called when a remote device is
disconnected definitively. Any future reconnections
will fail. Also all data channels associated to this
device will be closed.
void CreatedDc(object path, uint16 mdlid, filedescriptor fd)
This method is called when a new data channel is created
The path contains the object path of the device whith
the new connection is created, the mdlid the data
channel identificator and the fd is the file descriptor
where the data can be readed or writed.
void DeletedDc(object path, uint16 mdlid)
This method is called when a data channel is closed.
After this call the data channel will not be valid and
can be reused for future created data channels.
void DataReady(object path, uint16 mdlid, filedescriptor fd)
This method is called when there is new data that can be
readed in a data channel
next reply other threads:[~2010-05-04 7:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 7:55 Santiago Carot-Nemesio [this message]
2010-05-04 10:04 ` HDP proposed API Luiz Augusto von Dentz
2010-05-04 10:13 ` José Antonio Santos Cadenas
2010-05-04 10:54 ` José Antonio Santos Cadenas
2010-05-04 14:50 ` Luiz Augusto von Dentz
2010-05-05 10:11 ` Santiago Carot-Nemesio
2010-05-05 10:53 ` Santiago Carot-Nemesio
2010-05-05 0:07 ` Elvis Pfützenreuter
2010-05-05 10:57 ` José Antonio Santos Cadenas
2010-05-05 12:13 ` Elvis Pfützenreuter
2010-05-05 13:10 ` Elvis Pfützenreuter
2010-05-05 13:18 ` José Antonio Santos Cadenas
2010-05-05 13:22 ` Elvis Pfützenreuter
2010-05-05 13:36 ` José Antonio Santos Cadenas
2010-05-05 0:32 ` Elvis Pfützenreuter
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=1272959741.2182.123.camel@mosquito \
--to=scarot@libresoft.es \
--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).