Add documentation for the new service error property
[framework/connectivity/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 Connect()
16
17                         Connect this service. It will attempt to connect
18                         WiFi, WiMAX or Bluetooth services.
19
20                         For Ethernet devices this method can only be used
21                         if it has previously been disconnected. Otherwise
22                         the plugging of a cable will trigger connecting
23                         automatically. If no cable is plugged in this method
24                         will fail.
25
26                         Possible Errors: [service].Error.InvalidArguments
27
28                 void Disconnect()
29
30                         Disconnect this service. If the service is not
31                         connected an error message will be generated.
32
33                         On Ethernet devices this will disconnect the IP
34                         details from the service. It will not magically
35                         unplug the cable. When no cable is plugged in this
36                         method will fail.
37
38                         Possible Errors: [service].Error.InvalidArguments
39
40                 void Remove()
41
42                         A successfully connected service with Favorite=true
43                         can be removed this way. If it is connected, it will
44                         be automatically disconnected first.
45
46                         This is similar to setting the Favorite property
47                         to false, but that is currently not supported.
48
49                         Calling this method on Ethernet devices will cause
50                         an error message. It is not possible to remove these
51                         kind of devices.
52
53                         Possible Errors: [service].Error.InvalidArguments
54
55                 void MoveBefore(object service)
56
57                         If a service has been used before, this allows a
58                         reorder of the favorite services.
59
60                         The target service object must be part of this
61                         profile. Moving between profiles is not supported.
62
63                         Possible Errors: [service].Error.InvalidArguments
64
65                 void MoveAfter(object service)
66
67                         If a service has been used before, this allows a
68                         reorder of the favorite services.
69
70                         The target service object must be part of this
71                         profile. Moving between profiles is not supported.
72
73                         Possible Errors: [service].Error.InvalidArguments
74
75 Signals         PropertyChanged(string name, variant value)
76
77                         This signal indicates a changed value of the given
78                         property.
79
80 Properties      string State [readonly]
81
82                         The service state information.
83
84                         Valid states are "idle", "failure", "association",
85                         "configuration" and "ready".
86
87                 string Error [readonly]
88
89                         The service error status details.
90
91                         When error occur during connection or disconnection
92                         the detailed information are represented in this
93                         property to help the user interface to present the
94                         user with alternate options.
95
96                         This property is only valid when the service is in
97                         the "failure" state. Otherwise it might be empty or
98                         not present at all.
99
100                         The detailed error codes will be defined later.
101
102                 string Name [readonly]
103
104                         The service name (for example "Wireless" etc.)
105
106                         This name can be used for directly displaying it in
107                         the application. It has pure informational purpose.
108
109                         For Ethernet devices and hidden WiFi networks it is
110                         not guaranteed that this property is present.
111
112                 string Type [readonly]
113
114                         The service type (for example "ethernet", "wifi" etc.)
115
116                         This information should only be used to determine
117                         advanced properties or showing the correct icon
118                         to the user.
119
120                 string Mode [readonly]
121
122                         If the service type is WiFi, then this property is
123                         present and contains the mode of the network. The
124                         possible values are "managed" or "adhoc".
125
126                         This property might be only present for WiFi
127                         services.
128
129                 string Security [readonly]
130
131                         If the service type is WiFi, then this property is
132                         present and contains the security method or key
133                         management setting.
134
135                         Possible values are "none", "wep", "wpa" and "rsn".
136
137                         This property might be only present for WiFi
138                         services.
139
140                 string Passphrase [readwrite]
141
142                         If the service type is WiFi, then this property
143                         can be used to store a passphrase.
144
145                         This property is still experimental and might be
146                         removed in future version.
147
148                 uint8 Strength [readonly]
149
150                         Indicates the signal strength of the service. This
151                         is a normalized value between 0 and 100.
152
153                         This property will not be present for Ethernet
154                         devices.
155
156                 boolean Favorite [readonly]
157
158                         Will be true if a cable is plugged in or the user
159                         selected and successfully connected to this service.
160
161                         Setting this property to true has no effect at all
162                         and setting it to false is similar to the Remove()
163                         method. So for now it will be considered a read
164                         only property.