summaryrefslogtreecommitdiff
path: root/doc/service-api.txt
blob: 0678c821d41d1675998dcb3745ae9a5281e1436b (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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
Service hierarchy
=================

Service		org.moblin.connman
Interface	org.moblin.connman.Service
Object path	[variable prefix]/{service0,service1,...}

Methods		dict GetProperties()

			Returns properties for the service object. 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

		void ClearProperty(string name)

			Clears the value of the specified property.

			Possible Errors: [service].Error.InvalidArguments
					 [service].Error.InvalidProperty

		void Connect()

			Connect this service. It will attempt to connect
			WiFi, WiMAX or Bluetooth services.

			For Ethernet devices this method can only be used
			if it has previously been disconnected. Otherwise
			the plugging of a cable will trigger connecting
			automatically. If no cable is plugged in this method
			will fail.

			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.

			Possible Errors: [service].Error.InvalidArguments

		void Disconnect()

			Disconnect this service. If the service is not
			connected an error message will be generated.

			On Ethernet devices this will disconnect the IP
			details from the service. It will not magically
			unplug the cable. When no cable is plugged in this
			method will fail.

			This method can also be used to abort a previous
			connectiong attempt via the Connect method.

			Possible Errors: [service].Error.InvalidArguments

		void Remove()

			A successfully connected service with Favorite=true
			can be removed this way. If it is connected, it will
			be automatically disconnected first.

			If the service requires a passphrase it will be
			cleared and forgotten when removing.

			This is similar to setting the Favorite property
			to false, but that is currently not supported.

			Calling this method on Ethernet devices will cause
			an error message. It is not possible to remove these
			kind of devices.

			Possible Errors: [service].Error.InvalidArguments

		void MoveBefore(object service)

			If a service has been used before, this allows a
			reorder of the favorite services.

			The target service object must be part of this
			profile. Moving between profiles is not supported.

			Possible Errors: [service].Error.InvalidArguments

		void MoveAfter(object service)

			If a service has been used before, this allows a
			reorder of the favorite services.

			The target service object must be part of this
			profile. Moving between profiles is not supported.

			Possible Errors: [service].Error.InvalidArguments

Signals		PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

Properties	string State [readonly]

			The service state information.

			Valid states are "idle", "failure", "association",
			"configuration" and "ready".

		string Error [readonly]

			The service error status details.

			When error occur during connection or disconnection
			the detailed information are represented in this
			property to help the user interface to present the
			user with alternate options.

			This property is only valid when the service is in
			the "failure" state. Otherwise it might be empty or
			not present at all.

			Current defined error code is "dhcp-failed".

		string Name [readonly]

			The service name (for example "Wireless" etc.)

			This name can be used for directly displaying it in
			the application. It has pure informational purpose.

			For Ethernet devices and hidden WiFi networks it is
			not guaranteed that this property is present.

		string Type [readonly]

			The service type (for example "ethernet", "wifi" etc.)

			This information should only be used to determine
			advanced properties or showing the correct icon
			to the user.

		string Mode [readonly]

			If the service type is WiFi, then this property is
			present and contains the mode of the network. The
			possible values are "managed" or "adhoc".

			This property might be only present for WiFi
			services.

		string Security [readonly]

			If the service type is WiFi, then this property is
			present and contains the security method or key
			management setting.

			Possible values are "none", "wep", "wpa" and "rsn".

			This property might be only present for WiFi
			services.

		string Passphrase [readwrite]

			If the service type is WiFi, then this property
			can be used to store a passphrase.

			No PropertyChanged signals will be send for this
			property. The PassphraseRequired property should
			be monitored instead.

			This property might also not always be included
			since it is protected by a different security policy.

		boolean PassphraseRequired [readonly]

			If the service type is WiFi, then this property
			indicates if a passphrase is required.

			If a passphrase has been set already or if no
			passphrase is needed, then this property will
			be set to false.

		uint8 Strength [readonly]

			Indicates the signal strength of the service. This
			is a normalized value between 0 and 100.

			This property will not be present for Ethernet
			devices.

		boolean Favorite [readonly]

			Will be true if a cable is plugged in or the user
			selected and successfully connected to this service.

			This value is automatically changed and to revert
			it back to false the Remove() method needs to be
			used.

		boolean AutoConnect [readwrite]

			If set to true, this service will auto-connect
			when not other connection is available.

			For favorite services it is possible to change
			this value to prevent or permit automatic
			connection attempts.

		string IPv4.Method [readwrite]

			The IPv4 configuration method. Possible values here
			are "dhcp" and "static".

		string IPv4.Address [readwrite]

			The current configured IPv4 address.