build: Whitespace & keep vim happy
[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 Signals         PropertyChanged(string property, variant value)
64
65                         This signal indicates a changed value of the given
66                         property.
67
68                 ContextAdded(object path, dict properties)
69
70                         Signal that gets emitted when a new context has
71                         been created.  It contains the context object path
72                         and its properties.
73
74                 ContextRemoved(object path)
75
76                         Signal that gets emitted when a context has been
77                         removed.  The object path of the context is only
78                         included for reference.  Its properties are no
79                         longer accessible at this point.
80
81 Properties      boolean Attached [readonly]
82
83                         Contains whether the Packet Radio Service is attached.
84                         The attach state might change dynamically based on
85                         availability of network resources.  If this value
86                         changes to false, the user can assume that all
87                         contexts have been deactivated.
88
89                         If the modem is detached, certain features will not
90                         be available, e.g. receiving SMS over packet radio
91                         or network initiated PDP activation.
92
93                 string Bearer [readonly, optional]
94
95                         Contains the data bearer technology as reported by the
96                         GPRS service registration (if known).
97
98                         Possible values are:
99                         "none", "gsm", "edge", "umts", "hsdpa", "hsupa",
100                         "hspa" (HSDPA and HSUPA at the same time) and
101                         "lte"
102
103                 boolean Suspended [readonly, optional]
104
105                         Contains whether the GPRS service is suspended.
106                         During suspended state the modem is attached to the
107                         GPRS service and all contexts remain established,
108                         however, data transfer is not possible.
109
110                         The suspended state may be entered if the modem is
111                         temporarily out of network coverage. GPRS class B
112                         modems will suspend GPRS whenever a voice call is
113                         active at the same time. GPRS may also be suspended
114                         if the network does not support simultaneous packet
115                         data and voice. Various signalling procedures may
116                         also cause GPRS to be briefly suspended.
117
118                         As the suspension may be brief, clients should wait
119                         for an appropriate time for GPRS service to resume
120                         before taking corrective action.
121
122                 boolean RoamingAllowed [readwrite]
123
124                         Contains whether data roaming is allowed.  In the off
125                         setting, if the packet radio registration state
126                         indicates that the modem is roaming, oFono will
127                         automatically detach and no further connection
128                         establishment will be possible.
129
130                 boolean Powered [readwrite]
131
132                         Controls whether packet radio use is allowed. Setting
133                         this value to off detaches the modem from the
134                         Packet Domain network.
135
136 Connection Context hierarchy
137 =================
138
139 Service         org.ofono
140 Interface       org.ofono.ConnectionContext
141 Object path     [variable]
142
143 Methods         dict GetProperties()
144                         Returns all properties for the context object.
145
146                 void SetProperty(string property, variant value)
147
148                         Sets the property to a desired value
149
150                         Possible Errors: [service].Error.InvalidArguments
151                                          [service].Error.InvalidFormat
152                                          [service].Error.Failed
153                                          [service].Error.InProgress
154                                          [service].Error.NotAttached
155                                          [service].Error.AttachInProgress
156                                          [service].Error.NotImplemented
157
158 Signals         PropertyChanged(string property, variant value)
159
160                         This signal indicates a changed value of the given
161                         property.
162
163 Properties      boolean Active [readwrite]
164
165                         Holds whether the context is activated.  This value
166                         can be set to activate / deactivate the context.
167
168                 string AccessPointName [readwrite]
169
170                         Holds the name of the access point.  This is
171                         abbreviated as APN.  This value cannot be changed when
172                         the context is active.
173
174                 string Type [readwrite]
175
176                         Contains the intended usage type for this context.
177                         The currently supported values are:
178                                 "internet" - General internet connectivity
179                                 "mms" - Used by MMS related services
180                                 "wap" - Used by WAP related services
181                                 "ims" - Used by IMS related services
182
183                 string Username [readwrite]
184
185                         Holds the username to be used for authentication
186                         purposes.  This value cannot be changed when the
187                         context is active.
188
189                 string Password [readwrite]
190
191                         Holds the password to be used for authentication
192                         purposes.  This value cannot be changed when the
193                         context is active.
194
195                 string Protocol [readwrite]
196
197                         Holds the protocol for this context.  Valid values
198                         are: "ip", "ipv6" and "dual".
199
200                 string Name [readwrite]
201
202                         The name is a free form string that describes this
203                         context.  The name should not be empty and limited
204                         to a short string for display purposes.
205
206                 dict Settings [readonly, optional]
207
208                         Holds all the IP network settings
209
210                         string Interface [readonly, optional]
211
212                                 Holds the interface of the network interface
213                                 used by this context (e.g. "ppp0" "usb0")
214
215                         string Method [readonly, optional]
216
217                                 Holds the IP network config method
218                                         "static"- Set IP network statically
219                                         "dhcp"  - Set IP network through DHCP
220
221                         string Address [readonly, optional]
222
223                                 Holds the IP address for this context.
224
225                         string Netmask [readonly, optional]
226
227                                 Holds the Netmask for this context.
228
229                         array{string} DomainNameServers [readonly, optional]
230
231                                 Holds the list of domain name servers for this
232                                 context.
233
234                         string Gateway [readonly, optional]
235
236                                 Holds the gateway IP for this connection.
237
238                         string Proxy [readonly, MMS only]
239
240                                 Holds the current proxy information for
241                                 using this context.
242
243                                 In combination with the Interface value
244                                 this allows access to the services offered
245                                 by this context.
246
247                                 It is possible that this reflects just the
248                                 MessageProxy property if such a routing can
249                                 be set up.  However this can also be pointing
250                                 to a local proxy on 127.0.0.1 and then using
251                                 the loopback interace lo for it.
252
253                                 Users of this context should bind to the
254                                 provided interface and only attempt access
255                                 via this proxy.  All other values are left
256                                 out in this case.
257
258                 dict IPv6.Settings [readonly, optional]
259
260                         Holds all the IPv6 network settings
261
262                         string Interface [readonly, optional]
263
264                                 Holds the interface of the network interface
265                                 used by this context (e.g. "ppp0" "usb0")
266
267                         string Address [readonly, optional]
268
269                                 Holds the IP address for this context.
270
271                         byte PrefixLength [readonly, optional]
272
273                                 Holds the prefix length.
274
275                         array{string} DomainNameServers [readonly, optional]
276
277                                 Holds the list of domain name servers for this
278                                 context.
279
280                         string Gateway [readonly, optional]
281
282                                 Holds the gateway IP for this connection.
283
284                 string MessageProxy [readwrite, MMS only]
285
286                         Holds the MMS Proxy setting.
287
288                 string MessageCenter [readwrite, MMS only]
289
290                         Holds the MMSC setting.