doc: Fix race conditions in technology handling
[framework/connectivity/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                 object ConnectProvider(dict provider)
43
44                         Connect to a VPN specified by the given provider
45                         properties.
46
47                         When successful this method will return the object
48                         path of the VPN service object.
49
50                         This method can also be used to connect to an
51                         already existing VPN.
52
53                         This method call will only return in case of an
54                         error or when the service is fully connected. So
55                         setting a longer D-Bus timeout might be a really
56                         good idea.
57
58                         When 'SessionMode' property is enabled, this method
59                         call is disallowed.
60
61                         Possible Errors: [service].Error.InvalidArguments
62
63                 void RegisterAgent(object path)
64
65                         Register new agent for handling user requests.
66
67                         Possible Errors: [service].Error.InvalidArguments
68
69                 void UnregisterAgent(object path)
70
71                         Unregister an existing agent.
72
73                         Possible Errors: [service].Error.InvalidArguments
74
75                 void RegisterCounter(object path, uint32 accuracy, uint32 period)  [experimental]
76
77                         Register a new counter for user notifications.
78
79                         The accuracy is specified in kilo-bytes and defines
80                         a threshold for counter updates. Together with the
81                         period value it defines how often user space needs
82                         to be updated. The period value is in seconds.
83
84                         This interface is not meant for time tracking. If
85                         the time needs to be tracked down to the second, it
86                         is better to have a real timer running inside the
87                         application than using this interface.
88
89                         Also getting notified for every kilo-byte is a bad
90                         choice (even if the interface supports it). Something
91                         like 10 kilo-byte units or better 1 mega-byte seems
92                         to be a lot more reasonable and better for the user.
93
94                         Possible Errors: [service].Error.InvalidArguments
95
96                 void UnregisterCounter(object path)  [experimental]
97
98                         Unregister an existing counter.
99
100                         Possible Errors: [service].Error.InvalidArguments
101
102                 object CreateSession(dict settings, object notifier)  [experimental]
103
104                         Create a new session for the application. Every
105                         application can create multiple session with
106                         different settings. The settings are described
107                         as part of the session interface.
108
109                         The notifier allows asynchronous notification about
110                         session specific changes. These changes can be
111                         for online/offline state or IP address changes or
112                         similar things the application is required to
113                         handle.
114
115                         Every application should at least create one session
116                         to inform about its requirements and it purpose.
117
118                 void DestroySession(object session)  [experimental]
119
120                         Remove the previously created session.
121
122                         If an application exits unexpectatly the session
123                         will be automatically destroyed.
124
125                 object path, dict, fd RequestPrivateNetwork(dict options)
126                                                                 [experimental]
127
128                         Request a new Private Network, which includes the
129                         creation of a tun/tap interface, and IP
130                         configuration, NAT and IP forwarding on that
131                         interface.
132                         An object path, a dictionnary and a file descriptor
133                         with IP settings are returned.
134
135                         Possible Errors: [service].Error.InvalidArguments
136                                          [service].Error.NotSupported
137
138                 void ReleasePrivateNetwork(object path) [experimental]
139
140                         Releases a private network.
141
142                         Possible Errors: [service].Error.InvalidArguments
143
144 Signals         TechnologyAdded(object path, dict properties)
145
146                         Signal that is sent when a new technology is added.
147
148                         It contains the object path of the technology and
149                         also its properties.
150
151                 TechnologyRemoved(object path)
152
153                         Signal that is sent when a modem has been removed.
154
155                         The object path is no longer accessible after this
156                         signal and only emitted for reference.
157
158                 PropertyChanged(string name, variant value)
159
160                         This signal indicates a changed value of the given
161                         property.
162
163 Properties      string State [readonly]
164
165                         The global connection state of a system. Possible
166                         values are "online" if at least one connection exists
167                         and "offline" if no device is connected.
168
169                         In certain situations the state might change to
170                         the value "connected". This can only be seen if
171                         previously no connection was present.
172
173                 boolean OfflineMode [readwrite]
174
175                         The offline mode indicates the global setting for
176                         switching all radios on or off. Changing offline mode
177                         to true results in powering down all devices. When
178                         leaving offline mode the individual policy of each
179                         device decides to switch the radio back on or not.
180
181                         During offline mode, it is still possible to switch
182                         certain technologies manually back on. For example
183                         the limited usage of WiFi or Bluetooth devices might
184                         be allowed in some situations.
185
186                 array{object} Services [readonly]
187
188                         List of service object paths. The list is sorted
189                         internally to have the service with the default
190                         route always first and then the favorite services
191                         followed by scan results.
192
193                         This list represents the available services for the
194                         current selected profile. If the profile gets changed
195                         then this list will be updated.
196
197                         The same list is available via the profile object
198                         itself. It is just provided here for convenience of
199                         applications only dealing with the current active
200                         profile.
201
202                 boolean SessionMode [readwrite]  [experminental]
203
204                         This disables the auto connect feature. It should be
205                         enabled when the Session API is used. When SessionMode
206                         is enabled, 'ConnectService' and 'ConnectProvider'
207                         method calls are disallowed.
208
209                         The default value is false.