adb6a08526a78317268ebc19aa76bb48ba3bbacd
[NetworkManager.git] / introspection / nm-vpn-plugin.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2
3 <node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4   <interface name="org.freedesktop.NetworkManager.VPN.Plugin">
5     <annotation name="org.gtk.GDBus.C.Name" value="VpnPlugin"/>
6
7     <tp:docstring>
8       This interface is provided by plugins providing VPN services to the NetworkManager daemon.
9     </tp:docstring>
10
11     <method name="Connect">
12       <tp:docstring>
13         Tells the plugin to connect.  Interactive secrets requests (eg, emitting
14         the SecretsRequired signal) are not allowed.
15       </tp:docstring>
16       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_connect"/>
17       <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
18         <tp:docstring>
19           Describes the connection to be established.
20         </tp:docstring>
21       </arg>
22       <tp:possible-errors>
23         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StartingInProgress"/>
24         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStarted"/>
25         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
26         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
27         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
28         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
29       </tp:possible-errors>
30     </method>
31
32     <method name="ConnectInteractive">
33       <tp:docstring>
34         Tells the plugin to connect, allowing interactive secrets requests (eg
35         the plugin is allowed to emit the SecretsRequired signal if the VPN
36         service indicates that it needs additional secrets during the connect
37         process).
38       </tp:docstring>
39       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_connect_interactive"/>
40       <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
41         <tp:docstring>
42           Describes the connection to be established.
43         </tp:docstring>
44       </arg>
45       <arg name="details" type="a{sv}" direction="in" tp:type="String_Variant_Map">
46         <tp:docstring>
47           Additional details about the Connect process.
48         </tp:docstring>
49       </arg>
50       <tp:possible-errors>
51         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StartingInProgress"/>
52         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStarted"/>
53         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
54         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
55         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
56         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
57         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/>
58       </tp:possible-errors>
59     </method>
60
61     <method name="NeedSecrets">
62       <tp:docstring>
63         Asks the plugin whether the provided connection will require secrets to connect successfully.
64       </tp:docstring>
65       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_need_secrets"/>
66       <arg name="settings" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
67         <tp:docstring>
68           Describes the connection that may need secrets.
69         </tp:docstring>
70       </arg>
71       <arg name="setting_name" type="s" direction="out">
72         <tp:docstring>
73           The setting name within the provided connection that requires secrets, if any.
74         </tp:docstring>
75       </arg>
76       <tp:possible-errors>
77         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid"/>
78       </tp:possible-errors>
79     </method>
80
81     <method name="Disconnect">
82       <tp:docstring>
83         Disconnect the plugin.
84       </tp:docstring>
85       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_disconnect"/>
86       <tp:possible-errors>
87         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
88         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStopped"/>
89       </tp:possible-errors>
90     </method>
91
92     <method name="SetConfig">
93       <tp:docstring>
94         Set generic connection details on the connection.
95       </tp:docstring>
96       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_config"/>
97       <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
98         <tp:docstring>
99           Generic configuration details for the connection.
100         </tp:docstring>
101       </arg>
102     </method>
103
104     <method name="SetIp4Config">
105       <tp:docstring>
106         Set IPv4 details on the connection.
107       </tp:docstring>
108       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_ip4_config"/>
109       <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
110         <tp:docstring>
111           Ip4Config details for the connection. You must call
112           SetConfig() before calling this.
113         </tp:docstring>
114       </arg>
115     </method>
116
117     <method name="SetIp6Config">
118       <tp:docstring>
119         Set IPv6 details on the connection.
120       </tp:docstring>
121       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_ip6_config"/>
122       <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
123         <tp:docstring>
124           Ip6Config details for the connection. You must call
125           SetConfig() before calling this.
126         </tp:docstring>
127       </arg>
128     </method>
129
130     <method name="SetFailure">
131       <tp:docstring>
132         Indicate a failure to the plugin.
133       </tp:docstring>
134       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_failure"/>
135       <arg name="reason" type="s" direction="in">
136         <tp:docstring>
137           The reason for the failure.
138         </tp:docstring>
139       </arg>
140     </method>
141
142     <property name="State" type="u" access="read" tp:type="NM_VPN_SERVICE_STATE">
143       <tp:docstring>
144         The state of the plugin.
145       </tp:docstring>
146     </property>
147
148     <signal name="StateChanged">
149       <tp:docstring>
150         Emitted when the plugin state changes.
151       </tp:docstring>
152       <arg name="state" type="u" tp:type="NM_VPN_SERVICE_STATE">
153         <tp:docstring>
154           The new state of the plugin.
155         </tp:docstring>
156       </arg>
157     </signal>
158
159     <signal name="SecretsRequired">
160       <tp:docstring>
161         Emitted during an ongoing ConnectInteractive() request when the plugin
162         has determined that new secrets are required.  NetworkManager will then
163         call the NewSecrets() method with a connection hash including the new
164         secrets.
165       </tp:docstring>
166       <arg name="message" type="s" direction="out">
167           <tp:docstring>
168               Informational message, if any, about the request.  For example, if
169               a second PIN is required, could indicate to the user to wait for
170               the token code to change until entering the next PIN.
171           </tp:docstring>
172       </arg>
173       <arg name="secrets" type="as" direction="out">
174           <tp:docstring>
175               Array of strings of VPN secret names which the plugin thinks
176               secrets may be required for, or other VPN-specific data to be
177               processed by the VPN's front-end.
178           </tp:docstring>
179       </arg>
180     </signal>
181
182     <method name="NewSecrets">
183       <tp:docstring>
184         Called in response to a SecretsRequired signal to deliver updated secrets
185         or other information to the plugin.
186       </tp:docstring>
187       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_new_secrets"/>
188       <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
189         <tp:docstring>
190           Describes the connection including the new secrets.
191         </tp:docstring>
192       </arg>
193       <tp:possible-errors>
194         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
195         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
196         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
197         <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/>
198       </tp:possible-errors>
199     </method>
200
201     <signal name="Config">
202       <tp:docstring>
203         The plugin obtained generic configuration information.
204       </tp:docstring>
205       <arg name="config" type="a{sv}" tp:type="String_Variant_Map">
206         <tp:docstring>
207           The configuration information.
208         </tp:docstring>
209       </arg>
210     </signal>
211
212     <signal name="Ip4Config">
213       <tp:docstring>
214         The plugin obtained an IPv4 configuration.
215       </tp:docstring>
216       <arg name="ip4config" type="a{sv}" tp:type="String_Variant_Map">
217         <tp:docstring>
218           The IPv4 configuration.
219         </tp:docstring>
220       </arg>
221     </signal>
222
223     <signal name="Ip6Config">
224       <tp:docstring>
225         The plugin obtained an IPv6 configuration.
226       </tp:docstring>
227       <arg name="ip6config" type="a{sv}" tp:type="String_Variant_Map">
228         <tp:docstring>
229           The IPv6 configuration.
230         </tp:docstring>
231       </arg>
232     </signal>
233
234     <signal name="LoginBanner">
235       <tp:docstring>
236         Emitted when the plugin receives a login banner from the VPN service.
237       </tp:docstring>
238       <arg name="banner" type="s">
239         <tp:docstring>
240           The login banner string.
241         </tp:docstring>
242       </arg>
243     </signal>
244
245     <signal name="Failure">
246       <tp:docstring>
247         Emitted when a failure in the VPN plugin occurs.
248       </tp:docstring>
249       <arg name="reason" type="u" tp:type="NM_VPN_PLUGIN_FAILURE">
250         <tp:docstring>
251           Reason code for the failure.
252         </tp:docstring>
253       </arg>
254     </signal>
255
256     <tp:enum name="NM_VPN_SERVICE_STATE" type="u">
257       <tp:enumvalue suffix="UNKNOWN" value="0">
258         <tp:docstring>
259           The state of the VPN plugin is unknown.
260         </tp:docstring>
261       </tp:enumvalue>
262       <tp:enumvalue suffix="INIT" value="1">
263         <tp:docstring>
264           The VPN plugin is initialized.
265         </tp:docstring>
266       </tp:enumvalue>
267       <tp:enumvalue suffix="SHUTDOWN" value="2">
268         <tp:docstring>
269           (Not used.)
270         </tp:docstring>
271       </tp:enumvalue>
272       <tp:enumvalue suffix="STARTING" value="3">
273         <tp:docstring>
274           The plugin is attempting to connect to a VPN server.
275         </tp:docstring>
276       </tp:enumvalue>
277       <tp:enumvalue suffix="STARTED" value="4">
278         <tp:docstring>
279           The plugin has connected to a VPN server.
280         </tp:docstring>
281       </tp:enumvalue>
282       <tp:enumvalue suffix="STOPPING" value="5">
283         <tp:docstring>
284           The plugin is disconnecting from the VPN server.
285         </tp:docstring>
286       </tp:enumvalue>
287       <tp:enumvalue suffix="STOPPED" value="6">
288         <tp:docstring>
289           The plugin has disconnected from the VPN server.
290         </tp:docstring>
291       </tp:enumvalue>
292     </tp:enum>
293
294     <tp:enum name="NM_VPN_PLUGIN_FAILURE" type="u">
295       <tp:enumvalue suffix="LOGIN_FAILED" value="0">
296         <tp:docstring>
297           Login failed.
298         </tp:docstring>
299       </tp:enumvalue>
300       <tp:enumvalue suffix="CONNECT_FAILED" value="1">
301         <tp:docstring>
302           Connect failed.
303         </tp:docstring>
304       </tp:enumvalue>
305       <tp:enumvalue suffix="BAD_IP_CONFIG" value="2">
306         <tp:docstring>
307           Invalid IP configuration returned from the VPN plugin.
308         </tp:docstring>
309       </tp:enumvalue>
310     </tp:enum>
311
312   </interface>
313 </node>