bluez/doc/adapter-api.txt

156 lines
4.4 KiB
Plaintext
Raw Normal View History

2008-03-06 06:10:58 +08:00
BlueZ D-Bus Adapter API description
***********************************
2010-01-02 09:08:17 +08:00
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
2008-03-06 06:10:58 +08:00
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
Copyright (C) 2005-2006 Claudio Takahasi <claudio.takahasi@indt.org.br>
2008-03-07 22:39:14 +08:00
Copyright (C) 2006-2007 Luiz von Dentz <luiz.dentz@indt.org.br>
2008-03-06 06:10:58 +08:00
Adapter hierarchy
=================
Service org.bluez
Interface org.bluez.Adapter1
Object path [variable prefix]/{hci0,hci1,...}
2008-03-06 06:10:58 +08:00
Methods void StartDiscovery()
2008-03-06 06:10:58 +08:00
This method starts the device discovery session. This
2008-03-06 06:10:58 +08:00
includes an inquiry procedure and remote device name
resolving. Use StopDiscovery to release the sessions
acquired.
2008-03-06 06:10:58 +08:00
This process will start emitting DevicesFound and
PropertyChanged "Discovering" signals.
2008-03-06 06:10:58 +08:00
Possible errors: org.bluez.Error.NotReady
org.bluez.Error.Failed
void StopDiscovery()
2008-03-06 06:10:58 +08:00
This method will cancel any previous StartDiscovery
2008-05-29 19:43:08 +08:00
transaction.
2008-03-06 06:10:58 +08:00
Note that a discovery procedure is shared between all
discovery sessions thus calling StopDiscovery will only
release a single session.
2008-03-06 06:10:58 +08:00
Possible errors: org.bluez.Error.NotReady
org.bluez.Error.Failed
org.bluez.Error.NotAuthorized
2008-03-14 03:05:18 +08:00
void RemoveDevice(object device)
This removes the remote device object at the given
path. It will remove also the pairing information.
2008-03-06 06:10:58 +08:00
2008-03-14 03:05:18 +08:00
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.Failed
2008-03-06 06:10:58 +08:00
void RegisterAgent(object agent, string capability)
This registers the adapter wide agent.
2010-11-23 03:05:56 +08:00
The object path defines the path of the agent
that will be called when user input is needed.
If an application disconnects from the bus all
of its registered agents will be removed.
The capability parameter can have the values
"DisplayOnly", "DisplayYesNo", "KeyboardOnly",
"NoInputNoOutput" and "KeyboardDisplay" which reflects
the input and output capabilities of the agent. If an
empty string is used it will fallback to
"DisplayYesNo".
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.AlreadyExists
void UnregisterAgent(object agent)
This unregisters the agent that has been previously
registered. The object path parameter must match the
same value that has been used on registration.
Possible errors: org.bluez.Error.DoesNotExist
Signals DevicesFound(array{object path, dict values})
This signal will be sent every time devices have
been found. In general they only appear during a
device discovery.
2008-03-06 06:10:58 +08:00
The dictionary contains the properties from the
org.bluez.Device1 interface.
2008-03-14 03:05:18 +08:00
2008-03-07 22:39:14 +08:00
Properties string Address [readonly]
2008-03-06 06:10:58 +08:00
2008-03-14 03:05:18 +08:00
The Bluetooth device address.
string Name [readwrite]
2008-03-06 06:10:58 +08:00
2008-03-14 03:05:18 +08:00
The Bluetooth friendly name. This value can be
changed and a PropertyChanged signal will be emitted.
uint32 Class [readonly]
The Bluetooth class of device.
2008-09-24 03:34:46 +08:00
boolean Powered [readwrite]
Switch an adapter on or off. This will also set the
appropriate connectable state.
2008-09-24 03:34:46 +08:00
boolean Discoverable [readwrite]
Switch an adapter to discoverable or non-discoverable
to either make it visible or hide it. This is a global
setting and should only be used by the settings
application.
If the DiscoverableTimeout is set to a non-zero
value then the system will set this value back to
false after the timer expired.
In case the adapter is switched off, setting this
value will fail.
When changing the Powered property the new state of
this property will be updated via a PropertyChanged
signal.
boolean Pairable [readwrite]
Switch an adapter to pairable or non-pairable. This is
a global setting and should only be used by the
settings application.
Note that this property only affects incoming pairing
requests.
uint32 PairableTimeout [readwrite]
The pairable timeout in seconds. A value of zero
means that the timeout is disabled and it will stay in
2012-04-12 23:03:09 +08:00
pairable mode forever.
2008-03-06 06:10:58 +08:00
uint32 DiscoverableTimeout [readwrite]
2008-03-07 22:39:14 +08:00
2008-03-14 03:05:18 +08:00
The discoverable timeout in seconds. A value of zero
means that the timeout is disabled and it will stay in
discoverable/limited mode forever.
The default value for the discoverable timeout should
be 180 seconds (3 minutes).
boolean Discovering [readonly]
2008-03-14 03:05:18 +08:00
Indicates that a device discovery procedure is active.
array{string} UUIDs [readonly]
List of 128-bit UUIDs that represents the available
local services.