Add initial support for LookupService helper method
[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                 object LookupService(string pattern)
73
74                         Lookup a service matching the specific pattern.
75
76                         Examples are interface names like "eth0", "wlan0"
77                         etc. or service names like "hotspot" etc.
78
79                         In case of multiple services match the the pattern
80                         an error is returned.
81
82                         Possible Errors: [service].Error.InvalidArguments
83                                          [service].Error.NotUnique
84                                          [service].Error.NotFound
85
86                 object ConnectService(dict network)
87
88                         Connect to a network specified by the given
89                         properties.
90
91                         For connecting to a hidden WiFi network for example
92                         it is required that Type = "wifi" and the SSID
93                         properties are provided.
94
95                         When successful this method will return object
96                         path of the service object.
97
98                         This method can also be used to connect to an
99                         already existing service. It works exactly the
100                         same as executing the Connect method from the
101                         service interface.
102
103                         This method call will only return in case of an
104                         error or when the service is fully connected. So
105                         setting a longer D-Bus timeout might be a really
106                         good idea.
107
108                         Possible Errors: [service].Error.InvalidArguments
109
110                 void RegisterAgent(object path)
111
112                         Register new agent for handling user requests.
113
114                         Possible Errors: [service].Error.InvalidArguments
115
116                 void UnregisterAgent(object path)
117
118                         Unregister an existing agent.
119
120                         Possible Errors: [service].Error.InvalidArguments
121
122                 void RegisterCounter(object path, uint32 interval)
123
124                         Register a new counter for user notifications.
125
126                         If the interval is zero then no timer for updates
127                         will be started. Only kernel events can then
128                         trigger updates. Otherwise the kernel will be
129                         polled every n seconds for an update.
130
131                         Possible Errors: [service].Error.InvalidArguments
132
133                 void UnregisterCounter(object path)
134
135                         Unregister an existing counter.
136
137                         Possible Errors: [service].Error.InvalidArguments
138
139                 object RequestSession(string bearer)
140
141                         Request a networking session.
142
143                         If the bearer is an empty string the best available
144                         service will be picked.
145
146                         When successful this method will return the object
147                         path of the corresponding service.
148
149                         Possible Errors: [service].Error.InvalidArguments
150
151                 void ReleaseSession()
152
153                         Release a networking session.
154
155                         Possible Errors: [service].Error.InvalidArguments
156
157 Signals         PropertyChanged(string name, variant value)
158
159                         This signal indicates a changed value of the given
160                         property.
161
162                 StateChanged(string state)
163
164                         This signal is similar to the PropertyChanged signal
165                         for the State property.
166
167                         It exists for application state only care about the
168                         current state and so can avoid to be woken up when
169                         other details changes.
170
171 Properties      string State [readonly]
172
173                         The global connection state of a system. Possible
174                         values are "online" if at least one connection exists
175                         and "offline" if no device is connected.
176
177                         In certain situations the state might change to
178                         the value "connected". This can only be seen if
179                         previously no connection was present.
180
181                 array{string} AvailableTechnologies [readonly]
182
183                         The list of available technologies. The strings
184                         are the same as the ones from the service types.
185
186                 array{string} EnabledTechnologies [readonly]
187
188                         The list of enabled technologies. The strings
189                         are the same as the ones from the service types.
190
191                 array{string} ConnectedTechnologies [readonly]
192
193                         The list of connected technologies. The strings
194                         are the same as the ones from the service type.
195
196                 string DefaultTechnology [readonly]
197
198                         The current connected technology which holds the
199                         default route.
200
201                 boolean OfflineMode [readwrite]
202
203                         The offline mode indicates the global setting for
204                         switching all radios on or off. Changing offline mode
205                         to true results in powering down all devices. When
206                         leaving offline mode the individual policy of each
207                         device decides to switch the radio back on or not.
208
209                         During offline mode, it is still possible to switch
210                         certain technologies manually back on. For example
211                         the limited usage of WiFi or Bluetooth devices might
212                         be allowed in some situations.
213
214                 object ActiveProfile [readwrite]
215
216                         Object path of the current active profile.
217
218                 array{object} Profiles [readonly]
219
220                         List of profile object paths.
221
222                 array{object} Technologies [readonly]
223
224                         List of technology object paths.
225
226                 array{object} Services [readonly]
227
228                         List of service object paths. The list is sorted
229                         internally to have the service with the default
230                         route always first and then the favorite services
231                         followed by scan results.
232
233                         This list represents the available services for the
234                         current selected profile. If the profile gets changed
235                         then this list will be updated.
236
237                         The same list is available via the profile object
238                         itself. It is just provided here for convenience of
239                         applications only dealing with the current active
240                         profile.