686613739700d7a08e2dd4887290d2dc3bc9f01b
[platform/upstream/connman.git] / doc / service-api.txt
1 Service hierarchy
2 =================
3
4 Service         org.moblin.connman
5 Interface       org.moblin.connman.Service
6 Object path     [variable prefix]/{service0,service1,...}
7
8 Methods         dict GetProperties()
9
10                         Returns properties for the service object. See
11                         the 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 ClearProperty(string name)
26
27                         Clears the value of the specified property.
28
29                         Possible Errors: [service].Error.InvalidArguments
30                                          [service].Error.InvalidProperty
31
32                 void Connect()
33
34                         Connect this service. It will attempt to connect
35                         WiFi, WiMAX or Bluetooth services.
36
37                         For Ethernet devices this method can only be used
38                         if it has previously been disconnected. Otherwise
39                         the plugging of a cable will trigger connecting
40                         automatically. If no cable is plugged in this method
41                         will fail.
42
43                         Possible Errors: [service].Error.InvalidArguments
44
45                 void Disconnect()
46
47                         Disconnect this service. If the service is not
48                         connected an error message will be generated.
49
50                         On Ethernet devices this will disconnect the IP
51                         details from the service. It will not magically
52                         unplug the cable. When no cable is plugged in this
53                         method will fail.
54
55                         Possible Errors: [service].Error.InvalidArguments
56
57                 void Remove()
58
59                         A successfully connected service with Favorite=true
60                         can be removed this way. If it is connected, it will
61                         be automatically disconnected first.
62
63                         This is similar to setting the Favorite property
64                         to false, but that is currently not supported.
65
66                         Calling this method on Ethernet devices will cause
67                         an error message. It is not possible to remove these
68                         kind of devices.
69
70                         Possible Errors: [service].Error.InvalidArguments
71
72                 void MoveBefore(object service)
73
74                         If a service has been used before, this allows a
75                         reorder of the favorite services.
76
77                         The target service object must be part of this
78                         profile. Moving between profiles is not supported.
79
80                         Possible Errors: [service].Error.InvalidArguments
81
82                 void MoveAfter(object service)
83
84                         If a service has been used before, this allows a
85                         reorder of the favorite services.
86
87                         The target service object must be part of this
88                         profile. Moving between profiles is not supported.
89
90                         Possible Errors: [service].Error.InvalidArguments
91
92 Signals         PropertyChanged(string name, variant value)
93
94                         This signal indicates a changed value of the given
95                         property.
96
97 Properties      string State [readonly]
98
99                         The service state information.
100
101                         Valid states are "idle", "failure", "association",
102                         "configuration" and "ready".
103
104                 string Error [readonly]
105
106                         The service error status details.
107
108                         When error occur during connection or disconnection
109                         the detailed information are represented in this
110                         property to help the user interface to present the
111                         user with alternate options.
112
113                         This property is only valid when the service is in
114                         the "failure" state. Otherwise it might be empty or
115                         not present at all.
116
117                         Current defined error code is "dhcp-failed".
118
119                 string Name [readonly]
120
121                         The service name (for example "Wireless" etc.)
122
123                         This name can be used for directly displaying it in
124                         the application. It has pure informational purpose.
125
126                         For Ethernet devices and hidden WiFi networks it is
127                         not guaranteed that this property is present.
128
129                 string Type [readonly]
130
131                         The service type (for example "ethernet", "wifi" etc.)
132
133                         This information should only be used to determine
134                         advanced properties or showing the correct icon
135                         to the user.
136
137                 string Mode [readonly]
138
139                         If the service type is WiFi, then this property is
140                         present and contains the mode of the network. The
141                         possible values are "managed" or "adhoc".
142
143                         This property might be only present for WiFi
144                         services.
145
146                 string Security [readonly]
147
148                         If the service type is WiFi, then this property is
149                         present and contains the security method or key
150                         management setting.
151
152                         Possible values are "none", "wep", "wpa" and "rsn".
153
154                         This property might be only present for WiFi
155                         services.
156
157                 string Passphrase [readwrite]
158
159                         If the service type is WiFi, then this property
160                         can be used to store a passphrase.
161
162                         This property is still experimental and might be
163                         removed in future version.
164
165                 uint8 Strength [readonly]
166
167                         Indicates the signal strength of the service. This
168                         is a normalized value between 0 and 100.
169
170                         This property will not be present for Ethernet
171                         devices.
172
173                 boolean Favorite [readonly]
174
175                         Will be true if a cable is plugged in or the user
176                         selected and successfully connected to this service.
177
178                         Setting this property to true has no effect at all
179                         and setting it to false is similar to the Remove()
180                         method. So for now it will be considered a read
181                         only property.
182
183                 string IPv4.Method [readwrite]
184
185                         The IPv4 configuration method. Possible values here
186                         are "dhcp" and "static".
187
188                 string IPv4.Address [readwrite]
189
190                         The current configured IPv4 address.