~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to doc/adapter-api.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2008-10-07 12:10:29 UTC
  • Revision ID: james.westby@ubuntu.com-20081007121029-4gup4fmmh2vfo5nh
Tags: upstream-4.12
ImportĀ upstreamĀ versionĀ 4.12

Show diffs side-by-side

added added

removed removed

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