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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
Manager hierarchy
=================
Service net.connman
Interface net.connman.Manager
Object path /
Methods dict GetProperties()
Returns all global system properties. See the
properties section for available properties.
Possible Errors: [service].Error.InvalidArguments
void SetProperty(string name, variant value)
Changes the value of the specified property. Only
properties that are listed as read-write are
changeable. On success a PropertyChanged signal
will be emitted.
Possible Errors: [service].Error.InvalidArguments
[service].Error.InvalidProperty
string GetState()
Return global connection state of a system. The
same value is return via the State property.
Possible Errors: [service].Error.InvalidArguments
void RequestScan(string type)
Request to trigger a scan for the specified
technology. The empty string "" triggers scanning
on all technologies.
Possible Errors: [service].Error.InvalidArguments
void EnableTechnology(string type)
Enable specified type of technologies.
Possible Errors: [service].Error.InvalidArguments
void DisableTechnology(string type)
Disable specified type of technologies.
Possible Errors: [service].Error.InvalidArguments
array{object,dict} GetServices()
Returns a sorted list of tuples with service
object path and dictionary of service properties.
This list will not contain sensitive information
like passphrases etc.
Possible Errors: [service].Error.InvalidArguments
object LookupService(string pattern)
Lookup a service matching the specific pattern.
Examples are interface names like "eth0", "wlan0"
etc. or service names like "hotspot" etc.
In case of multiple services match the the pattern
an error is returned.
Possible Errors: [service].Error.InvalidArguments
[service].Error.NotUnique
[service].Error.NotFound
object ConnectService(dict network)
Connect to a network specified by the given
properties.
For connecting to a hidden WiFi network for example
it is required that Type = "wifi" and the SSID
properties are provided.
When successful this method will return object
path of the service object.
This method can also be used to connect to an
already existing service. It works exactly the
same as executing the Connect method from the
service interface.
This method call will only return in case of an
error or when the service is fully connected. So
setting a longer D-Bus timeout might be a really
good idea.
When 'SessionMode' property is enabled, this method
call is disallowed.
Possible Errors: [service].Error.InvalidArguments
void ProvisionService(string configuration)
Provide a configuration for services.
Service configuration is provided as a single string
that follows the same format as configuration files,
see config-format.txt. An exception to this format
is that only one service can be provisioned per call.
Possible Errors: [service].Error.InvalidArguments
object ConnectProvider(dict provider)
Connect to a VPN specified by the given provider
properties.
When successful this method will return the object
path of the VPN service object.
This method can also be used to connect to an
already existing VPN.
This method call will only return in case of an
error or when the service is fully connected. So
setting a longer D-Bus timeout might be a really
good idea.
When 'SessionMode' property is enabled, this method
call is disallowed.
Possible Errors: [service].Error.InvalidArguments
void RegisterAgent(object path)
Register new agent for handling user requests.
Possible Errors: [service].Error.InvalidArguments
void UnregisterAgent(object path)
Unregister an existing agent.
Possible Errors: [service].Error.InvalidArguments
void RegisterCounter(object path, uint32 accuracy, uint32 period)
Register a new counter for user notifications.
The accuracy is specified in kilo-bytes and defines
a threshold for counter updates. Together with the
period value it defines how often user space needs
to be updated. The period value is in seconds.
This interface is not meant for time tracking. If
the time needs to be tracked down to the second, it
is better to have a real timer running inside the
application than using this interface.
Also getting notified for every kilo-byte is a bad
choice (even if the interface supports it). Something
like 10 kilo-byte units or better 1 mega-byte seems
to be a lot more reasonable and better for the user.
Possible Errors: [service].Error.InvalidArguments
void UnregisterCounter(object path)
Unregister an existing counter.
Possible Errors: [service].Error.InvalidArguments
object CreateSession(dict settings, object notifier)
Create a new session for the application. Every
application can create multiple session with
different settings. The settings are described
as part of the session interface.
The notifier allows asynchronous notification about
session specific changes. These changes can be
for online/offline state or IP address changes or
similar things the application is required to
handle.
Every application should at least create one session
to inform about its requirements and it purpose.
void DestroySession(object session)
Remove the previously created session.
If an application exits unexpectatly the session
will be automatically destroyed.
object path, dict, fd RequestPrivateNetwork(dict options)
[experimental]
Request a new Private Network, which includes the
creation of a tun/tap interface, and IP
configuration, NAT and IP forwarding on that
interface.
An object path, a dictionnary and a file descriptor
with IP settings are returned.
Possible Errors: [service].Error.InvalidArguments
[service].Error.NotSupported
void ReleasePrivateNetwork(object path) [experimental]
Releases a private network.
Possible Errors: [service].Error.InvalidArguments
Signals PropertyChanged(string name, variant value)
This signal indicates a changed value of the given
property.
StateChanged(string state)
This signal is similar to the PropertyChanged signal
for the State property.
It exists for application state only care about the
current state and so can avoid to be woken up when
other details changes.
Properties string State [readonly]
The global connection state of a system. Possible
values are "online" if at least one connection exists
and "offline" if no device is connected.
In certain situations the state might change to
the value "connected". This can only be seen if
previously no connection was present.
array{string} AvailableTechnologies [readonly]
The list of available technologies. The strings
are the same as the ones from the service types.
array{string} EnabledTechnologies [readonly]
The list of enabled technologies. The strings
are the same as the ones from the service types.
array{string} ConnectedTechnologies [readonly]
The list of connected technologies. The strings
are the same as the ones from the service type.
string DefaultTechnology [readonly]
The current connected technology which holds the
default route.
boolean OfflineMode [readwrite]
The offline mode indicates the global setting for
switching all radios on or off. Changing offline mode
to true results in powering down all devices. When
leaving offline mode the individual policy of each
device decides to switch the radio back on or not.
During offline mode, it is still possible to switch
certain technologies manually back on. For example
the limited usage of WiFi or Bluetooth devices might
be allowed in some situations.
object ActiveProfile [readwrite]
Object path of the current active profile.
array{object} Technologies [readonly]
List of technology object paths.
array{object} Services [readonly]
List of service object paths. The list is sorted
internally to have the service with the default
route always first and then the favorite services
followed by scan results.
This list represents the available services for the
current selected profile. If the profile gets changed
then this list will be updated.
The same list is available via the profile object
itself. It is just provided here for convenience of
applications only dealing with the current active
profile.
boolean SessionMode [readwrite]
This disables the auto connect feature. It should be
enabled when the Session API is used. When SessionMode
is enabled, 'ConnectService' and 'ConnectProvider'
method calls are disallowed.
The default value is false.
|