summaryrefslogtreecommitdiffstats
path: root/doc/connman-api.txt
blob: 1ce1d6132693c1c59482a973cc5a202713b97053 (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
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
Connection Manager hierarchy
=================

Service		org.ofono
Interface	org.ofono.ConnectionManager
Object path	[variable]

Methods		dict GetProperties()

			Returns all global system properties. See the
			properties section for available properties.

		void SetProperty(string property, variant value)

			Sets the property to a desired value

			Possible Errors: [service].Error.InProgress
					 [service].Error.NotImplemented
					 [service].Error.InvalidArguments
					 [service].Error.Failed

		void DeactivateAll()

			Deactivates all active contexts.

			Possible Errors: [service].Error.InProgress
					 [service].Error.InvalidArguments
					 [service].Error.Failed

		array{object,dict} GetContexts()

			Get array of context objects and properties.

			The method should only be call once per application.
			Further changes shall be monitored via ContextAdded
			ContextRemoved signals.

		object AddContext(string type)

			Creates a new Primary context.  The type contains
			the intended purpose of the context.

			For possible values of the type parameter see the
			Type documentation of ConnectionContext interface.
			Returns the object path of the created context.

			Possible Errors: [service].Error.InvalidArguments
					 [service].Error.InvalidFormat
					 [service].Error.Failed

		void RemoveContext(object context)

			Removes a primary context.  All secondary contexts, if
			any, associated with the primary context are also
			removed.

			Possible Errors: [service].Error.InProgress
					 [service].Error.InvalidArguments
					 [service].Error.InvalidFormat
					 [service].Error.NotFound
					 [service].Error.Failed

		void ResetContexts()

			Removes all contexts and re-provisions from the APN
			database. Contexts must all be deactivated for this
			method to work, and the atom must not be powered.

			Possible Errors: [service].Error.InProgress
					 [service].Error.InvalidArguments
					 [service].Error.NotAllowed

Signals		PropertyChanged(string property, variant value)

			This signal indicates a changed value of the given
			property.

		ContextAdded(object path, dict properties)

			Signal that gets emitted when a new context has
			been created.  It contains the context object path
			and its properties.

		ContextRemoved(object path)

			Signal that gets emitted when a context has been
			removed.  The object path of the context is only
			included for reference.  Its properties are no
			longer accessible at this point.

Properties	boolean Attached [readonly]

			Contains whether the Packet Radio Service is attached.
			The attach state might change dynamically based on
			availability of network resources.  If this value
			changes to false, the user can assume that all
			contexts have been deactivated.

			If the modem is detached, certain features will not
			be available, e.g. receiving SMS over packet radio
			or network initiated PDP activation.

		string Bearer [readonly, optional]

			Contains the data bearer technology as reported by the
			GPRS service registration (if known).

			Possible values are:
			"none", "gsm", "edge", "umts", "hsdpa", "hsupa",
			"hspa" (HSDPA and HSUPA at the same time) and
			"lte"

		boolean Suspended [readonly, optional]

			Contains whether the GPRS service is suspended.
			During suspended state the modem is attached to the
			GPRS service and all contexts remain established,
			however, data transfer is not possible.

			The suspended state may be entered if the modem is
			temporarily out of network coverage. GPRS class B
			modems will suspend GPRS whenever a voice call is
			active at the same time. GPRS may also be suspended
			if the network does not support simultaneous packet
			data and voice. Various signalling procedures may
			also cause GPRS to be briefly suspended.

			As the suspension may be brief, clients should wait
			for an appropriate time for GPRS service to resume
			before taking corrective action.

		boolean RoamingAllowed [readwrite]

			Contains whether data roaming is allowed.  In the off
			setting, if the packet radio registration state
			indicates that the modem is roaming, oFono will
			automatically detach and no further connection
			establishment will be possible.

		boolean Powered [readwrite]

			Controls whether packet radio use is allowed. Setting
			this value to off detaches the modem from the
			Packet Domain network.

Connection Context hierarchy
=================

Service		org.ofono
Interface	org.ofono.ConnectionContext
Object path	[variable]

Methods		dict GetProperties()
			Returns all properties for the context object.

		void SetProperty(string property, variant value)

			Sets the property to a desired value

			Possible Errors: [service].Error.InvalidArguments
					 [service].Error.InvalidFormat
					 [service].Error.Failed
					 [service].Error.InProgress
					 [service].Error.NotAttached
					 [service].Error.AttachInProgress
					 [service].Error.NotImplemented

Signals		PropertyChanged(string property, variant value)

			This signal indicates a changed value of the given
			property.

Properties	boolean Active [readwrite]

			Holds whether the context is activated.  This value
			can be set to activate / deactivate the context.

		string AccessPointName [readwrite]

			Holds the name of the access point.  This is
			abbreviated as APN.  This value cannot be changed when
			the context is active.

		string Type [readwrite]

			Contains the intended usage type for this context.
			The currently supported values are:
				"internet" - General internet connectivity
				"mms" - Used by MMS related services
				"wap" - Used by WAP related services
				"ims" - Used by IMS related services

		string AuthenticationMethod [readwrite]
			Holds the PPP authentication method to use.  Valid
			values are "pap" and "chap".  Defaults to "chap".

		string Username [readwrite]

			Holds the username to be used for authentication
			purposes.  This value cannot be changed when the
			context is active.

		string Password [readwrite]

			Holds the password to be used for authentication
			purposes.  This value cannot be changed when the
			context is active.

		string Protocol [readwrite]

			Holds the protocol for this context.  Valid values
			are: "ip", "ipv6" and "dual".

		string Name [readwrite]

			The name is a free form string that describes this
			context.  The name should not be empty and limited
			to a short string for display purposes.

		dict Settings [readonly, optional]

			Holds all the IP network settings

			string Interface [readonly, optional]

				Holds the interface of the network interface
				used by this context (e.g. "ppp0" "usb0")

			string Method [readonly, optional]

				Holds the IP network config method
					"static"- Set IP network statically
					"dhcp"  - Set IP network through DHCP

			string Address [readonly, optional]

				Holds the IP address for this context.

			string Netmask [readonly, optional]

				Holds the Netmask for this context.

			array{string} DomainNameServers [readonly, optional]

				Holds the list of domain name servers for this
				context.

			string Gateway [readonly, optional]

				Holds the gateway IP for this connection.

			string Proxy [readonly, MMS only]

				Holds the current proxy information for
				using this context.

				In combination with the Interface value
				this allows access to the services offered
				by this context.

				It is possible that this reflects just the
				MessageProxy property if such a routing can
				be set up.  However this can also be pointing
				to a local proxy on 127.0.0.1 and then using
				the loopback interace lo for it.

				Users of this context should bind to the
				provided interface and only attempt access
				via this proxy.  All other values are left
				out in this case.

		dict IPv6.Settings [readonly, optional]

			Holds all the IPv6 network settings

			string Interface [readonly, optional]

				Holds the interface of the network interface
				used by this context (e.g. "ppp0" "usb0")

			string Address [readonly, optional]

				Holds the IP address for this context.

			byte PrefixLength [readonly, optional]

				Holds the prefix length.

			array{string} DomainNameServers [readonly, optional]

				Holds the list of domain name servers for this
				context.

			string Gateway [readonly, optional]

				Holds the gateway IP for this connection.

		string MessageProxy [readwrite, MMS only]

			Holds the MMS Proxy setting.

		string MessageCenter [readwrite, MMS only]

			Holds the MMSC setting.