2010-07-13 04:36:53 +08:00
|
|
|
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 /org/bluez/
|
|
|
|
|
|
|
|
Methods:
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
object CreateApplication(dict config)
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Returns the path of the new registered application.
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2011-02-09 03:37:57 +08:00
|
|
|
Dict is defined as below:
|
2010-07-13 04:36:53 +08:00
|
|
|
{
|
|
|
|
"DataType": uint16, (mandatory)
|
|
|
|
"Role" : ("Source" or "Sink"), (mandatory)
|
|
|
|
"Description" : string, (optional)
|
|
|
|
"ChannelType" : ("Reliable" or "Streaming")
|
|
|
|
(just for Sources, optional)
|
|
|
|
}
|
|
|
|
|
|
|
|
Application will be closed by the call or implicitly when the
|
|
|
|
programs leaves the bus.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
|
2010-07-13 05:24:01 +08:00
|
|
|
void DestroyApplication(object application)
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Closes the HDP application identified by the object path. Also
|
|
|
|
application will be closed if the process that started it leaves
|
2010-09-01 15:42:33 +08:00
|
|
|
the bus. Only the creator of the application will be able to
|
|
|
|
destroy it.
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.NotFound
|
2010-09-01 15:42:33 +08:00
|
|
|
org.bluez.Error.NotAllowed
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Service org.bluez
|
2010-09-01 15:42:33 +08:00
|
|
|
Interface org.bluez.HealthDevice
|
|
|
|
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Methods:
|
|
|
|
|
2010-10-01 23:17:16 +08:00
|
|
|
dict GetProperties()
|
|
|
|
|
|
|
|
Returns all properties for the interface. See the properties
|
|
|
|
section for available properties.
|
|
|
|
|
|
|
|
Posible errors: org.bluez.Error.NotAllowed
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Boolean Echo()
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Sends an echo petition to the remote service. Returns True if
|
|
|
|
response matches with the buffer sent. If some error is detected
|
2010-09-01 15:42:33 +08:00
|
|
|
False value is returned.
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.OutOfRange
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
object CreateChannel(object application, string configuration)
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Creates a new data channel.
|
2010-07-13 04:36:53 +08:00
|
|
|
The configuration should indicate the channel quality of
|
|
|
|
service using one of this values "Reliable", "Streaming", "Any".
|
|
|
|
|
|
|
|
Returns the object path that identifies the data channel that
|
|
|
|
is already connected.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
|
|
|
org.bluez.Error.HealthError
|
|
|
|
|
|
|
|
void DestroyChannel(object channel)
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Destroys the data channel object. Only the creator of the
|
|
|
|
channel or the creator of the HealtApplication that received the
|
|
|
|
data channel will be able to destroy it
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.InvalidArguments
|
2010-09-01 15:42:33 +08:00
|
|
|
org.bluez.Error.NotFound
|
|
|
|
org.bluez.Error.NotAllowed
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Signals:
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
void ChannelConnected(object channel)
|
|
|
|
|
|
|
|
This signal is launched when a new data channel is created or
|
|
|
|
when a known data channel is reconnected.
|
|
|
|
|
|
|
|
void ChannelDeleted(object channel)
|
|
|
|
|
|
|
|
This signal is launched when a data channel is deleted.
|
|
|
|
|
|
|
|
After this signal the data channel path will not be valid and
|
|
|
|
its path can be reused for future data channels.
|
|
|
|
|
|
|
|
void PropertyChanged(string name, variant value)
|
|
|
|
|
|
|
|
This signal indicates a changed value of the given property.
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
object MainChannel [readonly]
|
|
|
|
|
|
|
|
The first reliable channel opened. It is needed by upper
|
|
|
|
applications in order to send specific protocol data units. The
|
|
|
|
first reliable can change after a reconnection.
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.HealthChannel
|
2010-11-03 22:06:28 +08:00
|
|
|
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/chanZZZ
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Only the process that created the data channel or the creator of the
|
|
|
|
HealthApplication that received it will be able to call this methods.
|
|
|
|
|
2010-07-13 04:36:53 +08:00
|
|
|
Methods:
|
|
|
|
|
|
|
|
dict GetProperties()
|
|
|
|
|
|
|
|
Returns all properties for the interface. See the properties
|
|
|
|
section for available properties.
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Posible errors: org.bluez.Error.NotAllowed
|
|
|
|
|
2010-07-13 04:36:53 +08:00
|
|
|
fd Acquire()
|
|
|
|
|
|
|
|
Returns the file descriptor for this data channel. If the data
|
|
|
|
channel is not connected it will also reconnect.
|
|
|
|
|
|
|
|
Possible errors: org.bluez.Error.NotConnected
|
2010-09-01 15:42:33 +08:00
|
|
|
org.bluez.Error.NotAllowed
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
void Release()
|
|
|
|
|
|
|
|
Releases the fd. Application should also need to close() it.
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Possible errors: org.bluez.Error.NotAcquired
|
|
|
|
org.bluez.Error.NotAllowed
|
|
|
|
|
2010-07-13 04:36:53 +08:00
|
|
|
Properties:
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
string Type [readonly]
|
2010-07-13 04:36:53 +08:00
|
|
|
|
|
|
|
The quality of service of the data channel. ("Reliable" or
|
|
|
|
"Streaming")
|
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
object Device [readonly]
|
2010-07-13 04:36:53 +08:00
|
|
|
|
2010-09-01 15:42:33 +08:00
|
|
|
Identifies the Remote Device that is connected with. Maps with
|
|
|
|
a HealthDevice object.
|
2010-11-03 22:06:27 +08:00
|
|
|
|
|
|
|
object Application [readonly]
|
|
|
|
|
|
|
|
Identifies the HealthApplication to which this channel is
|
|
|
|
related to (which indirectly defines its role and data type).
|