blob: b6385865617934e19f429568b9a49bb9220dfe0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
BlueZ D-Bus Adapter API description
***********************************
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
Copyright (C) 2005-2006 Claudio Takahasi <claudio.takahasi@indt.org.br>
Copyright (C) 2006-2007 Luiz von Dentz <luiz.dentz@indt.org.br>
Adapter hierarchy
=================
Service org.bluez
Interface org.bluez.Adapter
Object path [variable prefix]/{hci0,hci1,...}
Methods void RequestSession()
This method requests a client session that provides
operational Bluetooth. A possible mode change must be
confirmed by the user via the agent.
Clients may request multiple sessions. All sessions
are released when adapter's mode is changed to off
state.
Possible Errors: org.bluez.Error.Rejected
void ReleaseSession()
Release a previously requested session. It sets
adapter to the mode in use on the moment of session
request.
Setting the powered or discoverable properties
changes adapter's mode persistently, such that session
release will not modify it.
Possible Errors: org.bluez.Error.DoesNotExist
void StartDiscovery()
This method starts the device discovery session. This
includes an inquiry procedure and remote device name
resolving. Use StopDiscovery to release the sessions
acquired.
This process will start emitting DevicesFound and
PropertyChanged "Discovering" signals.
Possible errors: org.bluez.Error.NotReady
org.bluez.Error.Failed
void StopDiscovery()
This method will cancel any previous StartDiscovery
transaction.
Note that a discovery procedure is shared between all
discovery sessions thus calling StopDiscovery will only
release a single session.
Possible errors: org.bluez.Error.NotReady
org.bluez.Error.Failed
org.bluez.Error.NotAuthorized
object FindDevice(string address)
Returns the object path of device for given address.
Possible Errors: org.bluez.Error.DoesNotExist
org.bluez.Error.InvalidArguments
void RemoveDevice(object device)
This removes the remote device object at the given
path. It will remove also the pairing information.
Possible errors: org.bluez.Error.InvalidArguments
org.bluez.Error.Failed
void RegisterAgent(object agent, string capability)
This registers the adapter wide agent.
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.
The dictionary contains the properties from the
org.bluez.Device interface.
DeviceCreated(object device)
Parameter is object path of created device.
DeviceRemoved(object device)
Parameter is object path of removed device.
Properties string Address [readonly]
The Bluetooth device address.
string Name [readwrite]
The Bluetooth friendly name. This value can be
changed and a PropertyChanged signal will be emitted.
uint32 Class [readonly]
The Bluetooth class of device.
boolean Powered [readwrite]
Switch an adapter on or off. This will also set the
appropriate connectable state.
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
pairable mode forever.
uint32 DiscoverableTimeout [readwrite]
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]
Indicates that a device discovery procedure is active.
array{object} Devices [readonly]
List of device object paths.
array{string} UUIDs [readonly]
List of 128-bit UUIDs that represents the available
local services.
|