Imported Upstream version 1.24
[platform/upstream/connman.git] / doc / manager-api.txt
1 Manager hierarchy
2 =================
3
4 Service         net.connman
5 Interface       net.connman.Manager
6 Object path     /
7
8 Methods         dict GetProperties()
9
10                         Returns all global system properties. See the
11                         properties section for available properties.
12
13                         Possible Errors: [service].Error.InvalidArguments
14
15                 void SetProperty(string name, variant value)
16
17                         Changes the value of the specified property. Only
18                         properties that are listed as read-write are
19                         changeable. On success a PropertyChanged signal
20                         will be emitted.
21
22                         Possible Errors: [service].Error.InvalidArguments
23                                          [service].Error.InvalidProperty
24
25                 array{object,dict} GetTechnologies()
26
27                         Returns a list of tuples with technology object
28                         path and dictionary of technology properties.
29
30                         Possible Errors: [service].Error.InvalidArguments
31
32                 array{object,dict} GetServices()
33
34                         Returns a sorted list of tuples with service
35                         object path and dictionary of service properties.
36
37                         This list will not contain sensitive information
38                         like passphrases etc.
39
40                         Possible Errors: [service].Error.InvalidArguments
41
42                 array{object,dict} GetPeers() [experimental]
43
44                         Returns a sorted list of tuples with peer object path
45                         and dictionary of peer properties
46
47                         Possible Errors: [service].Error.InvalidArguments
48
49                 object ConnectProvider(dict provider)   [deprecated]
50
51                         Connect to a VPN specified by the given provider
52                         properties.
53
54                         When successful this method will return the object
55                         path of the VPN service object.
56
57                         This method can also be used to connect to an
58                         already existing VPN.
59
60                         This method call will only return in case of an
61                         error or when the service is fully connected. So
62                         setting a longer D-Bus timeout might be a really
63                         good idea.
64
65                         When 'SessionMode' property is enabled, this method
66                         call is disallowed.
67
68                         This API is deprecated and should not be used.
69                         The VPN configuration API is provided by ConnMan
70                         VPN daemon and user should use that one instead.
71
72                         Possible Errors: [service].Error.InvalidArguments
73
74                 void RemoveProvider(object path)        [deprecated]
75
76                         Remove a VPN specified by the object path.
77
78                 void RegisterAgent(object path)
79
80                         Register new agent for handling user requests.
81
82                         Possible Errors: [service].Error.InvalidArguments
83
84                 void UnregisterAgent(object path)
85
86                         Unregister an existing agent.
87
88                         Possible Errors: [service].Error.InvalidArguments
89
90                 void RegisterCounter(object path, uint32 accuracy, uint32 period)  [experimental]
91
92                         Register a new counter for user notifications.
93
94                         The accuracy is specified in kilo-bytes and defines
95                         a threshold for counter updates. Together with the
96                         period value it defines how often user space needs
97                         to be updated. The period value is in seconds.
98
99                         This interface is not meant for time tracking. If
100                         the time needs to be tracked down to the second, it
101                         is better to have a real timer running inside the
102                         application than using this interface.
103
104                         Also getting notified for every kilo-byte is a bad
105                         choice (even if the interface supports it). Something
106                         like 10 kilo-byte units or better 1 mega-byte seems
107                         to be a lot more reasonable and better for the user.
108
109                         Possible Errors: [service].Error.InvalidArguments
110
111                 void UnregisterCounter(object path)  [experimental]
112
113                         Unregister an existing counter.
114
115                         Possible Errors: [service].Error.InvalidArguments
116
117                 object CreateSession(dict settings, object notifier)  [experimental]
118
119                         Create a new session for the application. Every
120                         application can create multiple session with
121                         different settings. The settings are described
122                         as part of the session interface.
123
124                         The notifier allows asynchronous notification about
125                         session specific changes. These changes can be
126                         for online/offline state or IP address changes or
127                         similar things the application is required to
128                         handle.
129
130                         Every application should at least create one session
131                         to inform about its requirements and it purpose.
132
133                 void DestroySession(object session)  [experimental]
134
135                         Remove the previously created session.
136
137                         If an application exits unexpectatly the session
138                         will be automatically destroyed.
139
140                 object path, dict, fd RequestPrivateNetwork(dict options)
141                                                                 [experimental]
142
143                         Request a new Private Network, which includes the
144                         creation of a tun/tap interface, and IP
145                         configuration, NAT and IP forwarding on that
146                         interface.
147                         An object path, a dictionnary and a file descriptor
148                         with IP settings are returned.
149
150                         Possible Errors: [service].Error.InvalidArguments
151                                          [service].Error.NotSupported
152
153                 void ReleasePrivateNetwork(object path) [experimental]
154
155                         Releases a private network.
156
157                         Possible Errors: [service].Error.InvalidArguments
158
159 Signals         TechnologyAdded(object path, dict properties)
160
161                         Signal that is sent when a new technology is added.
162
163                         It contains the object path of the technology and
164                         also its properties.
165
166                 TechnologyRemoved(object path)
167
168                         Signal that is sent when a technology has been removed.
169
170                         The object path is no longer accessible after this
171                         signal and only emitted for reference.
172
173                 ServicesChanged(array{object, dict}, array{object})
174
175                         Signals a list of services that have been changed
176                         via the first array. And a list of service that
177                         have been removed via the second array.
178
179                         The list of added services is sorted. The dictionary
180                         with the properties might be empty in case none of
181                         the properties have changed. Or only contains the
182                         properties that have changed.
183
184                         For newly added services the whole set of properties
185                         will be present.
186
187                         The list of removed services can be empty.
188
189                         This signal will only be triggered when the sort
190                         order of the service list or the number of services
191                         changes. It will not be emitted if only a property
192                         of the service object changes. For that it is
193                         required to watch the PropertyChanged signal of
194                         the service object.
195
196                 PeersChanged(array{object, dict}, array{object}) [experimental]
197
198                         Signals a list of peers that have been changed via the
199                         first array. And a list of peer that have been removed
200                         via the second array.
201
202                         The list of changed peers is sorted. The dictionary
203                         with the properties might be empty in case none of the
204                         properties have changed. Or only contains the
205                         properties that have changed.
206
207                         For newly added peers the whole set of properties will
208                         be present.
209
210                         The list of removed peers can be empty.
211
212                         This signal will only be triggered when the sort order
213                         of the peer list or the number of peers changes. It
214                         will not be emitted if only a property of the peer
215                         object changes. For that it is required to watch the
216                         PropertyChanged signal of the peer object.
217
218                 PropertyChanged(string name, variant value)
219
220                         This signal indicates a changed value of the given
221                         property.
222
223 Properties      string State [readonly]
224
225                         The global connection state of a system. Possible
226                         values are "offline", "idle", "ready" and "online".
227
228                         If the device is in offline mode, the value "offline"
229                         indicates this special global state. It can also be
230                         retrieved via the OfflineMode property, but is kept
231                         here for consistency and to differentiate from "idle".
232
233                         However when OfflineMode property is true, the State
234                         property can still be "idle", "ready" or "online"
235                         since it is possible by the end user to re-enable
236                         individual technologies like WiFi and Bluetooth while
237                         in offline mode.
238
239                         The states "idle", "ready" and "online" match to
240                         states from the services. If no service is in
241                         either "ready" or "online" state it will indicate
242                         the "idle" state.
243
244                         If at least one service is in "ready" state and no
245                         service is in "online" state, then it will indicate
246                         the "ready" state.
247
248                         When at least one service is in "online" state,
249                         this property will indicate "online" as well.
250
251                 boolean OfflineMode [readwrite]
252
253                         The offline mode indicates the global setting for
254                         switching all radios on or off. Changing offline mode
255                         to true results in powering down all devices. When
256                         leaving offline mode the individual policy of each
257                         device decides to switch the radio back on or not.
258
259                         During offline mode, it is still possible to switch
260                         certain technologies manually back on. For example
261                         the limited usage of WiFi or Bluetooth devices might
262                         be allowed in some situations.
263
264                 boolean SessionMode [readwrite]  [experminental][deprecated]
265
266                         This property exists only for compatibility reasons
267                         and does not affect ConnMan in any way.
268
269                         The default value is false.