From: "José Antonio Santos Cadenas" <santoscadenas@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: Proposed API for HDP (v4)
Date: Fri, 9 Jul 2010 20:39:33 +0200 [thread overview]
Message-ID: <201007092039.34032.santoscadenas@gmail.com> (raw)
In-Reply-To: <201007081912.31407.santoscadenas@gmail.com>
BlueZ D-Bus Health API description
**********************************
Santiago Carot-Nemesio <sancane@gmail.com>
José Antonio Santos-Cadenas <santoscadenas@gmail.com>
Elvis Pfützenreuter <epx@signove.com>
Health Device Profile hierarchy
===============================
Service org.bluez
Interface org.bluez.HealthManager
Object path [variable prefix]/
Methods:
path RegisterApplication(object agent, dict config)
Returns the path of the new registered application. The agent
parameter is the path of the object with the callbacks to
notify events (see org.bluez.HealthAgent at the end of this
document)
This petition starts an mcap instance on every adapter and also
register a proper record in the SDP if is needed.
Dict is defined as bellow:
{
"end_points" : [{ (optional)
"role" : ("source" or "sink"), (mandatory)
"specs" :[{ (mandatory)
"data_type" : uint16, (mandatory)
"description" : string, (optional)
}]
}]
}
Application will be closed by the call or implicitly when the
programs leaves the bus.
Possible errors: org.bluez.Error.InvalidArguments
void UnregisterApplication(object application)
Closes the HDP application identified by the object path. Also
application will be closed if the process that started it leaves
the bus. If there is a SDP record associated to this application
it will also be removed.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
void UpdateServices()
This method searches for HDP applications on the all remote
devices and notifies them to the appropriate agents.
Signals:
void ServiceDiscovered(object service)
This signal is sent when a device containing an HDP
application is paired or when the method Update of the
HealthManager is called and new HealthServices are discovered.
The object path is the HealthService path. The signal will be
launched once for each HealthService.
void ServiceRemoved(object service)
This signal is sent if during an Update some HealthServices
have disappeared. The signal is launched once for each removed
HealthService.
--------------------------------------------------------------------------------
Service org.bluez
Interface org.bluez.HealthService
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/hdp_YYYY
Methods:
array GetProperties()
Returns all properties for the interface. See the properties
section for available properties.
boolean Echo(array{byte})
Sends an echo petition to the remote service. Returns True if
response matches with the buffer sent. If some error is detected
False value is returned and the associated MCL is closed.
string OpenDataChannel(byte mdepid, string conf)
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 using one of this values "Reliable", "Streaming", "Any".
Returns an string that identifies the data channel.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.HealthError
void ReconnectDataChannel(string data_channel)
Reconnects a previously created data channel.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.HealthError
org.bluez.Error.NotFound
void DeleteDataChannel(string data_channel)
Deletes a data channel so it will not be available.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.NotFound
org.bluez.Error.HealthError
void DeleteAllDataChannels()
Deletes all data channels so they will not be available for
future use.
Possible errors: org.bluez.Error.HealthError
Properties:
array EndPoints
An array with all the end points in this Service. Each one of
then has this format.
{
"mdepid": uint8,
"role" : "source" or "sink" ,
"specs" : [{
"dtype" : uint16,
"description" : string, (optional)
}]
}
HealthAgent hierarchy
=====================
(this object is implemented by the HDP user in order to receive notifications)
Service unique name
Interface org.bluez.HealthAgent
Object path freely definable
Methods:
void Release()
This method gets called when the service daemon unregisters the
agent. An agent can use it to do cleanup tasks. There is no need
to unregister the agent, because when this method gets called it
has already been unregistered.
void DataChannelCreated(object service, string data_channel,
string conf, fd file_descriptor, boolean reconnection)
This method is called when a new data channel is created.
The service parameter contains the object path of the
HealthService that created the connection, data_channel is
the string that identifies the data channel, conf is the quality
of service of the data channel ("reliable" or "streaming"),
file_descriptor the file descriptor for reading and writing
data and reconnection indicates if it is a reconnection or a
data channel creation.
void DataChannelRemoved(object service, string data_channel)
This method is called when a data channel is deleted.
After this call the data channel path will not be valid and can
be reused for future creation of data channels.
prev parent reply other threads:[~2010-07-09 18:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 17:12 Proposed API for HDP José Antonio Santos Cadenas
2010-07-08 17:39 ` Marcel Holtmann
2010-07-08 18:33 ` José Antonio Santos Cadenas
2010-07-08 19:15 ` Marcel Holtmann
2010-07-08 19:50 ` Santiago Carot-Nemesio
2010-07-08 19:17 ` Gustavo F. Padovan
2010-07-08 20:30 ` José Antonio Santos Cadenas
2010-07-08 17:54 ` Gustavo F. Padovan
2010-07-08 18:36 ` José Antonio Santos Cadenas
2010-07-08 19:13 ` Gustavo F. Padovan
2010-07-09 12:46 ` José Antonio Santos Cadenas
2010-07-09 13:49 ` José Antonio Santos Cadenas
2010-07-09 14:04 ` Elvis Pfützenreuter
2010-07-09 16:55 ` Gustavo F. Padovan
2010-07-09 17:12 ` José Antonio Santos Cadenas
2010-07-09 17:36 ` Gustavo F. Padovan
2010-07-09 18:13 ` Proposed API for HDP (v3) José Antonio Santos Cadenas
2010-07-09 18:39 ` José Antonio Santos Cadenas [this message]
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=201007092039.34032.santoscadenas@gmail.com \
--to=santoscadenas@gmail.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;
as well as URLs for NNTP newsgroup(s).