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