• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1BlueZ D-Bus Adapter API description
2***********************************
3
4Copyright (C) 2004-2008  Marcel Holtmann <marcel@holtmann.org>
5Copyright (C) 2005-2006  Johan Hedberg <johan.hedberg@nokia.com>
6Copyright (C) 2005-2006  Claudio Takahasi <claudio.takahasi@indt.org.br>
7Copyright (C) 2006-2007  Luiz von Dentz <luiz.dentz@indt.org.br>
8
9
10Adapter hierarchy
11=================
12
13Service		org.bluez
14Interface	org.bluez.Adapter
15Object path	[variable prefix]/{hci0,hci1,...}
16
17Methods		dict GetProperties()
18
19			Returns all properties for the adapter. See the
20			properties section for available properties.
21
22			Possible Errors: org.bluez.Error.DoesNotExist
23					 org.bluez.Error.InvalidArguments
24
25		void SetProperty(string name, variant value)
26
27			Changes the value of the specified property. Only
28			properties that are listed a read-write are changeable.
29			On success this will emit a PropertyChanged signal.
30
31			Possible Errors: org.bluez.Error.DoesNotExist
32					 org.bluez.Error.InvalidArguments
33
34		void RequestSession()
35
36			This method will request a client session that
37			provides operational Bluetooth. A possible mode
38			change must be confirmed by the user via the agent.
39
40			Possible Errors: org.bluez.Error.Rejected
41
42		void ReleaseSession()
43
44			Release a previous requested session.
45
46			Possible Errors: org.bluez.Error.DoesNotExist
47
48		void StartDiscovery()
49
50			This method starts the device discovery session. This
51			includes an inquiry procedure and remote device name
52			resolving. Use StopDiscovery to release the sessions
53			acquired.
54
55			This process will start emitting DeviceFound and
56			PropertyChanged "Discovering" signals.
57
58			Possible errors: org.bluez.Error.NotReady
59					 org.bluez.Error.Failed
60
61		void StopDiscovery()
62
63			This method will cancel any previous StartDiscovery
64			transaction.
65
66			Note that a discovery procedure is shared between all
67			discovery sessions thus calling StopDiscovery will only
68			release a single session.
69
70			Possible errors: org.bluez.Error.NotReady
71					 org.bluez.Error.Failed
72					 org.bluez.Error.NotAuthorized
73
74		object FindDevice(string address)
75
76			Returns the object path of device for given address.
77			The device object needs to be first created via
78			CreateDevice or CreatePairedDevice.
79
80			Possible Errors: org.bluez.Error.DoesNotExist
81					 org.bluez.Error.InvalidArguments
82
83		array{object} ListDevices()
84
85			Returns list of device object paths.
86
87			Possible errors: org.bluez.Error.InvalidArguments
88					 org.bluez.Error.Failed
89					 org.bluez.Error.OutOfMemory
90
91		object CreateDevice(string address)
92
93			Creates a new object path for a remote device. This
94			method will connect to the remote device and retrieve
95			all SDP records.
96
97			If the object for the remote device already exists
98			this method will fail.
99
100			Possible errors: org.bluez.Error.InvalidArguments
101					 org.bluez.Error.Failed
102
103		object CreatePairedDevice(string address, object agent,
104							string capability)
105
106			Creates a new object path for a remote device. This
107			method will connect to the remote device and retrieve
108			all SDP records and then initiate the pairing.
109
110			If previously CreateDevice was used successfully,
111			this method will only initiate the pairing.
112
113			Compared to CreateDevice this method will fail if
114			the pairing already exists, but not if the object
115			path already has been created. This allows applications
116			to use CreateDevice first and the if needed use
117			CreatePairedDevice to initiate pairing.
118
119			The agent object path is assumed to reside within the
120			process (D-Bus connection instance) that calls this
121			method. No separate registration procedure is needed
122			for it and it gets automatically released once the
123			pairing operation is complete.
124
125			The capability parameter is the same as for the
126			RegisterAgent method.
127
128			Possible errors: org.bluez.Error.InvalidArguments
129					 org.bluez.Error.Failed
130
131		void CancelDeviceCreation(string address)
132
133			Aborts either a CreateDevice call or a
134			CreatePairedDevice call.
135
136			Possible errors: org.bluez.Error.InvalidArguments
137					 org.bluez.Error.NotInProgress
138
139		void RemoveDevice(object device)
140
141			This removes the remote device object at the given
142			path. It will remove also the pairing information.
143
144			Possible errors: org.bluez.Error.InvalidArguments
145					 org.bluez.Error.Failed
146
147		void RegisterAgent(object agent, string capability)
148
149			This registers the adapter wide agent.
150
151			The object path defines the path the of the agent
152			that will be called when user input is needed.
153
154			If an application disconnects from the bus all
155			of its registered agents will be removed.
156
157			The capability parameter can have the values
158			"DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
159			"NoInputNoOutput" which reflects the input and output
160			capabilities of the agent. If an empty string is
161			used it will fallback to "DisplayYesNo".
162
163			Possible errors: org.bluez.Error.InvalidArguments
164					 org.bluez.Error.AlreadyExists
165
166		void UnregisterAgent(object agent)
167
168			This unregisters the agent that has been previously
169			registered. The object path parameter must match the
170			same value that has been used on registration.
171
172			Possible errors: org.bluez.Error.DoesNotExist
173
174Signals		PropertyChanged(string name, variant value)
175
176			This signal indicates a changed value of the given
177			property.
178
179		DeviceFound(string address, dict values)
180
181			This signal will be send every time an inquiry result
182			has been found by the service daemon. In general they
183			only appear during a device discovery.
184
185			The dictionary can contain bascially the same values
186			that we be returned by the GetProperties method
187			from the org.bluez.Device interface. In addition there
188			can be values for the RSSI and the TX power level.
189
190		DeviceDisappeared(string address)
191
192			This signal will be send when an inquiry session for
193			a periodic discovery finishes and previously found
194			devices are no longer in range or visible.
195
196		DeviceCreated(object device)
197
198			Parameter is object path of created device.
199
200		DeviceRemoved(object device)
201
202			Parameter is object path of removed device.
203
204Properties	string Address [readonly]
205
206			The Bluetooth device address.
207
208		string Name [readwrite]
209
210			The Bluetooth friendly name. This value can be
211			changed and a PropertyChanged signal will be emitted.
212
213		uint32 Class [readonly]
214
215			The Bluetooth class of device.
216
217		boolean Powered [readwrite]
218
219			Switch an adapter on or off. This will also set the
220			appropiate connectable state.
221
222		boolean Discoverable [readwrite]
223
224			Switch an adapter to discoverable or non-discoverable
225			to either make it visible or hide it. This is a global
226			setting and should only be used by the settings
227			application.
228
229			If the DiscoverableTimeout is set to a non-zero
230			value then the system will set this value back to
231			false after the timer expired.
232
233			In case the adapter is switched off, setting this
234			value will fail.
235
236			When changing the Powered property the new state of
237			this property will be updated via a PropertyChanged
238			signal.
239
240		boolean Pairable [readwrite]
241
242			Switch an adapter to pairable or non-pairable. This is
243			a global setting and should only be used by the
244			settings application.
245
246			Note that this property only affects incoming pairing
247			requests.
248
249		uint32 PaireableTimeout [readwrite]
250
251			The pairable timeout in seconds. A value of zero
252			means that the timeout is disabled and it will stay in
253			pareable mode forever.
254
255		uint32 DiscoverableTimeout [readwrite]
256
257			The discoverable timeout in seconds. A value of zero
258			means that the timeout is disabled and it will stay in
259			discoverable/limited mode forever.
260
261			The default value for the discoverable timeout should
262			be 180 seconds (3 minutes).
263
264		boolean Discovering [readonly]
265
266			Indicates that a device discovery procedure is active.
267
268		array{object} Devices [readonly]
269
270			List of device object paths.
271