doc: Remove method for handling provisioning
[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                 void RequestScan(string type)
26
27                         Request to trigger a scan for the specified
28                         technology. The empty string "" triggers scanning
29                         on all technologies.
30
31                         Possible Errors: [service].Error.InvalidArguments
32
33                 void EnableTechnology(string type)
34
35                         Enable specified type of technologies.
36
37                         Possible Errors: [service].Error.InvalidArguments
38
39                 void DisableTechnology(string type)
40
41                         Disable specified type of technologies.
42
43                         Possible Errors: [service].Error.InvalidArguments
44
45                 array{object,dict} GetServices()
46
47                         Returns a sorted list of tuples with service
48                         object path and dictionary of service properties.
49
50                         This list will not contain sensitive information
51                         like passphrases etc.
52
53                         Possible Errors: [service].Error.InvalidArguments
54
55                 object LookupService(string pattern)
56
57                         Lookup a service matching the specific pattern.
58
59                         Examples are interface names like "eth0", "wlan0"
60                         etc. or service names like "hotspot" etc.
61
62                         In case of multiple services match the the pattern
63                         an error is returned.
64
65                         Possible Errors: [service].Error.InvalidArguments
66                                          [service].Error.NotUnique
67                                          [service].Error.NotFound
68
69                 object ConnectService(dict network)
70
71                         Connect to a network specified by the given
72                         properties.
73
74                         For connecting to a hidden WiFi network for example
75                         it is required that Type = "wifi" and the SSID
76                         properties are provided.
77
78                         When successful this method will return object
79                         path of the service object.
80
81                         This method can also be used to connect to an
82                         already existing service. It works exactly the
83                         same as executing the Connect method from the
84                         service interface.
85
86                         This method call will only return in case of an
87                         error or when the service is fully connected. So
88                         setting a longer D-Bus timeout might be a really
89                         good idea.
90
91                         When 'SessionMode' property is enabled, this method
92                         call is disallowed.
93
94                         Possible Errors: [service].Error.InvalidArguments
95
96                 object ConnectProvider(dict provider)
97
98                         Connect to a VPN specified by the given provider
99                         properties.
100
101                         When successful this method will return the object
102                         path of the VPN service object.
103
104                         This method can also be used to connect to an
105                         already existing VPN.
106
107                         This method call will only return in case of an
108                         error or when the service is fully connected. So
109                         setting a longer D-Bus timeout might be a really
110                         good idea.
111
112                         When 'SessionMode' property is enabled, this method
113                         call is disallowed.
114
115                         Possible Errors: [service].Error.InvalidArguments
116
117                 void RegisterAgent(object path)
118
119                         Register new agent for handling user requests.
120
121                         Possible Errors: [service].Error.InvalidArguments
122
123                 void UnregisterAgent(object path)
124
125                         Unregister an existing agent.
126
127                         Possible Errors: [service].Error.InvalidArguments
128
129                 void RegisterCounter(object path, uint32 accuracy, uint32 period)  [experimental]
130
131                         Register a new counter for user notifications.
132
133                         The accuracy is specified in kilo-bytes and defines
134                         a threshold for counter updates. Together with the
135                         period value it defines how often user space needs
136                         to be updated. The period value is in seconds.
137
138                         This interface is not meant for time tracking. If
139                         the time needs to be tracked down to the second, it
140                         is better to have a real timer running inside the
141                         application than using this interface.
142
143                         Also getting notified for every kilo-byte is a bad
144                         choice (even if the interface supports it). Something
145                         like 10 kilo-byte units or better 1 mega-byte seems
146                         to be a lot more reasonable and better for the user.
147
148                         Possible Errors: [service].Error.InvalidArguments
149
150                 void UnregisterCounter(object path)  [experimental]
151
152                         Unregister an existing counter.
153
154                         Possible Errors: [service].Error.InvalidArguments
155
156                 object CreateSession(dict settings, object notifier)
157
158                         Create a new session for the application. Every
159                         application can create multiple session with
160                         different settings. The settings are described
161                         as part of the session interface.
162
163                         The notifier allows asynchronous notification about
164                         session specific changes. These changes can be
165                         for online/offline state or IP address changes or
166                         similar things the application is required to
167                         handle.
168
169                         Every application should at least create one session
170                         to inform about its requirements and it purpose.
171
172                 void DestroySession(object session)
173
174                         Remove the previously created session.
175
176                         If an application exits unexpectatly the session
177                         will be automatically destroyed.
178
179                 object path, dict, fd RequestPrivateNetwork(dict options)
180                                                                 [experimental]
181
182                         Request a new Private Network, which includes the
183                         creation of a tun/tap interface, and IP
184                         configuration, NAT and IP forwarding on that
185                         interface.
186                         An object path, a dictionnary and a file descriptor
187                         with IP settings are returned.
188
189                         Possible Errors: [service].Error.InvalidArguments
190                                          [service].Error.NotSupported
191
192                 void ReleasePrivateNetwork(object path) [experimental]
193
194                         Releases a private network.
195
196                         Possible Errors: [service].Error.InvalidArguments
197
198 Signals         PropertyChanged(string name, variant value)
199
200                         This signal indicates a changed value of the given
201                         property.
202
203 Properties      string State [readonly]
204
205                         The global connection state of a system. Possible
206                         values are "online" if at least one connection exists
207                         and "offline" if no device is connected.
208
209                         In certain situations the state might change to
210                         the value "connected". This can only be seen if
211                         previously no connection was present.
212
213                 array{string} AvailableTechnologies [readonly]
214
215                         The list of available technologies. The strings
216                         are the same as the ones from the service types.
217
218                 array{string} EnabledTechnologies [readonly]
219
220                         The list of enabled technologies. The strings
221                         are the same as the ones from the service types.
222
223                 array{string} ConnectedTechnologies [readonly]
224
225                         The list of connected technologies. The strings
226                         are the same as the ones from the service type.
227
228                 string DefaultTechnology [readonly]
229
230                         The current connected technology which holds the
231                         default route.
232
233                 boolean OfflineMode [readwrite]
234
235                         The offline mode indicates the global setting for
236                         switching all radios on or off. Changing offline mode
237                         to true results in powering down all devices. When
238                         leaving offline mode the individual policy of each
239                         device decides to switch the radio back on or not.
240
241                         During offline mode, it is still possible to switch
242                         certain technologies manually back on. For example
243                         the limited usage of WiFi or Bluetooth devices might
244                         be allowed in some situations.
245
246                 array{object} Technologies [readonly]
247
248                         List of technology object paths.
249
250                 array{object} Services [readonly]
251
252                         List of service object paths. The list is sorted
253                         internally to have the service with the default
254                         route always first and then the favorite services
255                         followed by scan results.
256
257                         This list represents the available services for the
258                         current selected profile. If the profile gets changed
259                         then this list will be updated.
260
261                         The same list is available via the profile object
262                         itself. It is just provided here for convenience of
263                         applications only dealing with the current active
264                         profile.
265
266                 boolean SessionMode [readwrite]  [experminental]
267
268                         This disables the auto connect feature. It should be
269                         enabled when the Session API is used. When SessionMode
270                         is enabled, 'ConnectService' and 'ConnectProvider'
271                         method calls are disallowed.
272
273                         The default value is false.