doc: Add description of GetProperties method
[platform/upstream/connman.git] / doc / vpn-connection-api.txt
1 vpn connection
2 ==============
3
4 Service         net.connman.vpn
5 Interface       net.connman.vpn.Connection
6 Object path     [variable prefix]/{connection0,connection1,...}
7
8 Methods         dict GetProperties()  [experimental]
9
10                         Returns properties for the connection object. See
11                         the properties section for available properties.
12
13                         Possible Errors: [connection].Error.InvalidArguments
14
15                 void SetProperty(string name, variant value) [experimental]
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: [connection].Error.InvalidArguments
23                                          [connection].Error.InvalidProperty
24
25                 void ClearProperty(string name) [experimental]
26
27                         Clears the value of the specified property.
28
29                         Possible Errors: [connection].Error.InvalidArguments
30                                          [connection].Error.InvalidProperty
31
32                 void Connect() [experimental]
33
34                         Connect this VPN connection. It will attempt to connect
35                         to the VPN connection. The Connect() will wait until
36                         the connection is created or there is an error. The
37                         error description is returned in dbus error.
38
39                         Possible Errors: [connection].Error.InvalidArguments
40                                         [connection].Error.InProgress
41
42                 void Disconnect() [experimental]
43
44                         Disconnect this VPN connection. If the connection is
45                         not connected an error message will be generated.
46
47                         Possible Errors: [connection].Error.InvalidArguments
48
49 Signals         PropertyChanged(string name, variant value) [experimental]
50
51                         This signal indicates a changed value of the given
52                         property.
53
54 Properties      string State [readonly]
55
56                         The connection state information.
57
58                         Valid states are "idle", "failure", "configuration",
59                         "ready", "disconnect".
60
61                 string Type [readonly]
62
63                         The VPN type (for example "openvpn", "vpnc" etc.)
64
65                 string Name [readonly]
66
67                         The VPN name.
68
69                 string Domain [readonly]
70
71                         The domain name used behind the VPN connection.
72                         This is optional for most VPN technologies.
73
74                 string Host [readonly]
75
76                        The VPN host (server) address.
77
78                 int Index [readonly]
79
80                         The index of the VPN network tunneling interface.
81                         If there is no tunneling device, then this value
82                         is not returned.
83
84                 dict IPv4 [readonly]
85
86                         string Address
87
88                                 The current configured IPv4 address.
89
90                         string Netmask
91
92                                The current configured IPv4 netmask.
93
94                         string Gateway
95
96                                The current configured IPv4 gateway.
97
98                         string Peer
99
100                                The current configured VPN tunnel endpoint
101                                IPv4 address.
102
103                 dict IPv6 [readonly]
104
105                         string Address
106
107                                 The current configured IPv6 address.
108
109                         string PrefixLength
110
111                                The prefix length of the IPv6 address.
112
113                         string Gateway
114
115                                The current configured IPv6 gateway.
116
117                         string Peer
118
119                                The current configured VPN tunnel endpoint
120                                IPv6 address.
121
122                 array{string} Nameservers [readonly]
123
124                         The list of nameservers set by VPN.
125
126                 array{dict} UserRoutes [readwrite]
127
128                         int ProtocolFamily
129
130                                 Protocol family of the route. Set to 4
131                                 if IPv4 and 6 if IPv6 route.
132
133                         string Network
134
135                                 The network part of the route.
136
137                         string Netmask
138
139                                 The netmask of the route.
140
141                         string Gateway
142
143                                 Gateway address of the route.
144
145                         The list of currently active user activated
146                         routes.
147
148                 array{dict} ServerRoutes [readonly]
149
150                         int ProtocolFamily
151
152                                 Protocol family of the route. Set to 4
153                                 if IPv4 and 6 if IPv6 route.
154
155                         string Network
156
157                                 The network part of the route.
158
159                         string Netmask
160
161                                 The netmask of the route.
162
163                         string Gateway
164
165                                 Gateway address of the route.
166
167                         The VPN server activated route. These routes
168                         are pushed to connman by VPN server.
169
170                 There can be other properties also but as the VPN
171                 technologies are so different, they have different
172                 kind of options that they need, so not all options
173                 are mentioned in this document.