gprs: Try re-attaching when we switch cells
[platform/upstream/ofono.git] / doc / connman-api.txt
1 Connection Manager hierarchy
2 =================
3
4 Service         org.ofono
5 Interface       org.ofono.ConnectionManager
6 Object path     [variable]
7
8 Methods         dict GetProperties()
9
10                         Returns all global system properties. See the
11                         properties section for available properties.
12
13                 void SetProperty(string property, variant value)
14
15                         Sets the property to a desired value
16
17                         Possible Errors: [service].Error.InProgress
18                                          [service].Error.NotImplemented
19                                          [service].Error.InvalidArguments
20                                          [service].Error.Failed
21
22                 void DeactivateAll()
23
24                         Deactivates all active contexts.
25
26                         Possible Errors: [service].Error.InProgress
27                                          [service].Error.InvalidArguments
28                                          [service].Error.Failed
29
30                 array{object,dict} GetContexts()
31
32                         Get array of context objects and properties.
33
34                         The method should only be call once per application.
35                         Further changes shall be monitored via ContextAdded
36                         ContextRemoved signals.
37
38                 object AddContext(string type)
39
40                         Creates a new Primary context.  The type contains
41                         the intended purpose of the context.
42
43                         For possible values of the type parameter see the
44                         Type documentation of ConnectionContext interface.
45                         Returns the object path of the created context.
46
47                         Possible Errors: [service].Error.InvalidArguments
48                                          [service].Error.InvalidFormat
49                                          [service].Error.Failed
50
51                 void RemoveContext(object context)
52
53                         Removes a primary context.  All secondary contexts, if
54                         any, associated with the primary context are also
55                         removed.
56
57                         Possible Errors: [service].Error.InProgress
58                                          [service].Error.InvalidArguments
59                                          [service].Error.InvalidFormat
60                                          [service].Error.NotFound
61                                          [service].Error.Failed
62
63                 void ResetContexts()
64
65                         Removes all contexts and re-provisions from the APN
66                         database. Contexts must all be deactivated for this
67                         method to work, and the atom must not be powered.
68
69                         Possible Errors: [service].Error.InProgress
70                                          [service].Error.InvalidArguments
71                                          [service].Error.NotAllowed
72
73 Signals         PropertyChanged(string property, variant value)
74
75                         This signal indicates a changed value of the given
76                         property.
77
78                 ContextAdded(object path, dict properties)
79
80                         Signal that gets emitted when a new context has
81                         been created.  It contains the context object path
82                         and its properties.
83
84                 ContextRemoved(object path)
85
86                         Signal that gets emitted when a context has been
87                         removed.  The object path of the context is only
88                         included for reference.  Its properties are no
89                         longer accessible at this point.
90
91 Properties      boolean Attached [readonly]
92
93                         Contains whether the Packet Radio Service is attached.
94                         The attach state might change dynamically based on
95                         availability of network resources.  If this value
96                         changes to false, the user can assume that all
97                         contexts have been deactivated.
98
99                         If the modem is detached, certain features will not
100                         be available, e.g. receiving SMS over packet radio
101                         or network initiated PDP activation.
102
103                 string Bearer [readonly, optional]
104
105                         Contains the data bearer technology as reported by the
106                         GPRS service registration (if known).
107
108                         Possible values are:
109                         "none", "gsm", "edge", "umts", "hsdpa", "hsupa",
110                         "hspa" (HSDPA and HSUPA at the same time) and
111                         "lte"
112
113                 boolean Suspended [readonly, optional]
114
115                         Contains whether the GPRS service is suspended.
116                         During suspended state the modem is attached to the
117                         GPRS service and all contexts remain established,
118                         however, data transfer is not possible.
119
120                         The suspended state may be entered if the modem is
121                         temporarily out of network coverage. GPRS class B
122                         modems will suspend GPRS whenever a voice call is
123                         active at the same time. GPRS may also be suspended
124                         if the network does not support simultaneous packet
125                         data and voice. Various signalling procedures may
126                         also cause GPRS to be briefly suspended.
127
128                         As the suspension may be brief, clients should wait
129                         for an appropriate time for GPRS service to resume
130                         before taking corrective action.
131
132                 boolean RoamingAllowed [readwrite]
133
134                         Contains whether data roaming is allowed.  In the off
135                         setting, if the packet radio registration state
136                         indicates that the modem is roaming, oFono will
137                         automatically detach and no further connection
138                         establishment will be possible.
139
140                 boolean Powered [readwrite]
141
142                         Controls whether packet radio use is allowed. Setting
143                         this value to off detaches the modem from the
144                         Packet Domain network.
145
146 Connection Context hierarchy
147 =================
148
149 Service         org.ofono
150 Interface       org.ofono.ConnectionContext
151 Object path     [variable]
152
153 Methods         dict GetProperties()
154                         Returns all properties for the context object.
155
156                 void SetProperty(string property, variant value)
157
158                         Sets the property to a desired value
159
160                         Possible Errors: [service].Error.InvalidArguments
161                                          [service].Error.InvalidFormat
162                                          [service].Error.Failed
163                                          [service].Error.InProgress
164                                          [service].Error.NotAttached
165                                          [service].Error.AttachInProgress
166                                          [service].Error.NotImplemented
167
168 Signals         PropertyChanged(string property, variant value)
169
170                         This signal indicates a changed value of the given
171                         property.
172
173 Properties      boolean Active [readwrite]
174
175                         Holds whether the context is activated.  This value
176                         can be set to activate / deactivate the context.
177
178                 string AccessPointName [readwrite]
179
180                         Holds the name of the access point.  This is
181                         abbreviated as APN.  This value cannot be changed when
182                         the context is active.
183
184                 string Type [readwrite]
185
186                         Contains the intended usage type for this context.
187                         The currently supported values are:
188                                 "internet" - General internet connectivity
189                                 "mms" - Used by MMS related services
190                                 "wap" - Used by WAP related services
191                                 "ims" - Used by IMS related services
192
193                 string AuthenticationMethod [readwrite]
194                         Holds the PPP authentication method to use.  Valid
195                         values are "pap" and "chap".  Defaults to "chap".
196
197                 string Username [readwrite]
198
199                         Holds the username to be used for authentication
200                         purposes.  This value cannot be changed when the
201                         context is active.
202
203                 string Password [readwrite]
204
205                         Holds the password to be used for authentication
206                         purposes.  This value cannot be changed when the
207                         context is active.
208
209                 string Protocol [readwrite]
210
211                         Holds the protocol for this context.  Valid values
212                         are: "ip", "ipv6" and "dual".
213
214                 string Name [readwrite]
215
216                         The name is a free form string that describes this
217                         context.  The name should not be empty and limited
218                         to a short string for display purposes.
219
220                 dict Settings [readonly, optional]
221
222                         Holds all the IP network settings
223
224                         string Interface [readonly, optional]
225
226                                 Holds the interface of the network interface
227                                 used by this context (e.g. "ppp0" "usb0")
228
229                         string Method [readonly, optional]
230
231                                 Holds the IP network config method
232                                         "static"- Set IP network statically
233                                         "dhcp"  - Set IP network through DHCP
234
235                         string Address [readonly, optional]
236
237                                 Holds the IP address for this context.
238
239                         string Netmask [readonly, optional]
240
241                                 Holds the Netmask for this context.
242
243                         array{string} DomainNameServers [readonly, optional]
244
245                                 Holds the list of domain name servers for this
246                                 context.
247
248                         string Gateway [readonly, optional]
249
250                                 Holds the gateway IP for this connection.
251
252                         string Proxy [readonly, MMS only]
253
254                                 Holds the current proxy information for
255                                 using this context.
256
257                                 In combination with the Interface value
258                                 this allows access to the services offered
259                                 by this context.
260
261                                 It is possible that this reflects just the
262                                 MessageProxy property if such a routing can
263                                 be set up.  However this can also be pointing
264                                 to a local proxy on 127.0.0.1 and then using
265                                 the loopback interace lo for it.
266
267                                 Users of this context should bind to the
268                                 provided interface and only attempt access
269                                 via this proxy.  All other values are left
270                                 out in this case.
271
272                 dict IPv6.Settings [readonly, optional]
273
274                         Holds all the IPv6 network settings
275
276                         string Interface [readonly, optional]
277
278                                 Holds the interface of the network interface
279                                 used by this context (e.g. "ppp0" "usb0")
280
281                         string Address [readonly, optional]
282
283                                 Holds the IP address for this context.
284
285                         byte PrefixLength [readonly, optional]
286
287                                 Holds the prefix length.
288
289                         array{string} DomainNameServers [readonly, optional]
290
291                                 Holds the list of domain name servers for this
292                                 context.
293
294                         string Gateway [readonly, optional]
295
296                                 Holds the gateway IP for this connection.
297
298                 string MessageProxy [readwrite, MMS only]
299
300                         Holds the MMS Proxy setting.
301
302                 string MessageCenter [readwrite, MMS only]
303
304                         Holds the MMSC setting.