dbus: use the annotations for documentation
[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     <annotation name="org.gtk.GDBus.DocString" value="
8       This interface is provided by plugins providing VPN services to the NetworkManager daemon.
9     " />
10
11     <method name="Connect">
12       <annotation name="org.gtk.GDBus.DocString" value="
13         Tells the plugin to connect.  Interactive secrets requests (eg, emitting
14         the SecretsRequired signal) are not allowed.
15       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
19           Describes the connection to be established.
20         " />
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       <annotation name="org.gtk.GDBus.DocString" value="
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       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
42           Describes the connection to be established.
43         " />
44       </arg>
45       <arg name="details" type="a{sv}" direction="in" tp:type="String_Variant_Map">
46         <annotation name="org.gtk.GDBus.DocString" value="
47           Additional details about the Connect process.
48         " />
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       <annotation name="org.gtk.GDBus.DocString" value="
63         Asks the plugin whether the provided connection will require secrets to connect successfully.
64       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
68           Describes the connection that may need secrets.
69         " />
70       </arg>
71       <arg name="setting_name" type="s" direction="out">
72         <annotation name="org.gtk.GDBus.DocString" value="
73           The setting name within the provided connection that requires secrets, if any.
74         " />
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       <annotation name="org.gtk.GDBus.DocString" value="
83         Disconnect the plugin.
84       " />
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       <annotation name="org.gtk.GDBus.DocString" value="
94         Set generic connection details on the connection.
95       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
99           Generic configuration details for the connection.
100         " />
101       </arg>
102     </method>
103
104     <method name="SetIp4Config">
105       <annotation name="org.gtk.GDBus.DocString" value="
106         Set IPv4 details on the connection.
107       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
111           Ip4Config details for the connection. You must call
112           SetConfig() before calling this.
113         " />
114       </arg>
115     </method>
116
117     <method name="SetIp6Config">
118       <annotation name="org.gtk.GDBus.DocString" value="
119         Set IPv6 details on the connection.
120       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
124           Ip6Config details for the connection. You must call
125           SetConfig() before calling this.
126         " />
127       </arg>
128     </method>
129
130     <method name="SetFailure">
131       <annotation name="org.gtk.GDBus.DocString" value="
132         Indicate a failure to the plugin.
133       " />
134       <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_failure"/>
135       <arg name="reason" type="s" direction="in">
136         <annotation name="org.gtk.GDBus.DocString" value="
137           The reason for the failure.
138         " />
139       </arg>
140     </method>
141
142     <property name="State" type="u" access="read" tp:type="NM_VPN_SERVICE_STATE">
143       <annotation name="org.gtk.GDBus.DocString" value="
144         The state of the plugin.
145       " />
146     </property>
147
148     <signal name="StateChanged">
149       <annotation name="org.gtk.GDBus.DocString" value="
150         Emitted when the plugin state changes.
151       " />
152       <arg name="state" type="u" tp:type="NM_VPN_SERVICE_STATE">
153         <annotation name="org.gtk.GDBus.DocString" value="
154           The new state of the plugin.
155         " />
156       </arg>
157     </signal>
158
159     <signal name="SecretsRequired">
160       <annotation name="org.gtk.GDBus.DocString" value="
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       " />
166       <arg name="message" type="s" direction="out">
167           <annotation name="org.gtk.GDBus.DocString" value="
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           " />
172       </arg>
173       <arg name="secrets" type="as" direction="out">
174           <annotation name="org.gtk.GDBus.DocString" value="
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           " />
179       </arg>
180     </signal>
181
182     <method name="NewSecrets">
183       <annotation name="org.gtk.GDBus.DocString" value="
184         Called in response to a SecretsRequired signal to deliver updated secrets
185         or other information to the plugin.
186       " />
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         <annotation name="org.gtk.GDBus.DocString" value="
190           Describes the connection including the new secrets.
191         " />
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       <annotation name="org.gtk.GDBus.DocString" value="
203         The plugin obtained generic configuration information.
204       " />
205       <arg name="config" type="a{sv}" tp:type="String_Variant_Map">
206         <annotation name="org.gtk.GDBus.DocString" value="
207           The configuration information.
208         " />
209       </arg>
210     </signal>
211
212     <signal name="Ip4Config">
213       <annotation name="org.gtk.GDBus.DocString" value="
214         The plugin obtained an IPv4 configuration.
215       " />
216       <arg name="ip4config" type="a{sv}" tp:type="String_Variant_Map">
217         <annotation name="org.gtk.GDBus.DocString" value="
218           The IPv4 configuration.
219         " />
220       </arg>
221     </signal>
222
223     <signal name="Ip6Config">
224       <annotation name="org.gtk.GDBus.DocString" value="
225         The plugin obtained an IPv6 configuration.
226       " />
227       <arg name="ip6config" type="a{sv}" tp:type="String_Variant_Map">
228         <annotation name="org.gtk.GDBus.DocString" value="
229           The IPv6 configuration.
230         " />
231       </arg>
232     </signal>
233
234     <signal name="LoginBanner">
235       <annotation name="org.gtk.GDBus.DocString" value="
236         Emitted when the plugin receives a login banner from the VPN service.
237       " />
238       <arg name="banner" type="s">
239         <annotation name="org.gtk.GDBus.DocString" value="
240           The login banner string.
241         " />
242       </arg>
243     </signal>
244
245     <signal name="Failure">
246       <annotation name="org.gtk.GDBus.DocString" value="
247         Emitted when a failure in the VPN plugin occurs.
248       " />
249       <arg name="reason" type="u" tp:type="NM_VPN_PLUGIN_FAILURE">
250         <annotation name="org.gtk.GDBus.DocString" value="
251           Reason code for the failure.
252         " />
253       </arg>
254     </signal>
255
256     <tp:enum name="NM_VPN_SERVICE_STATE" type="u">
257       <tp:enumvalue suffix="UNKNOWN" value="0">
258         <annotation name="org.gtk.GDBus.DocString" value="
259           The state of the VPN plugin is unknown.
260         " />
261       </tp:enumvalue>
262       <tp:enumvalue suffix="INIT" value="1">
263         <annotation name="org.gtk.GDBus.DocString" value="
264           The VPN plugin is initialized.
265         " />
266       </tp:enumvalue>
267       <tp:enumvalue suffix="SHUTDOWN" value="2">
268         <annotation name="org.gtk.GDBus.DocString" value="
269           (Not used.)
270         " />
271       </tp:enumvalue>
272       <tp:enumvalue suffix="STARTING" value="3">
273         <annotation name="org.gtk.GDBus.DocString" value="
274           The plugin is attempting to connect to a VPN server.
275         " />
276       </tp:enumvalue>
277       <tp:enumvalue suffix="STARTED" value="4">
278         <annotation name="org.gtk.GDBus.DocString" value="
279           The plugin has connected to a VPN server.
280         " />
281       </tp:enumvalue>
282       <tp:enumvalue suffix="STOPPING" value="5">
283         <annotation name="org.gtk.GDBus.DocString" value="
284           The plugin is disconnecting from the VPN server.
285         " />
286       </tp:enumvalue>
287       <tp:enumvalue suffix="STOPPED" value="6">
288         <annotation name="org.gtk.GDBus.DocString" value="
289           The plugin has disconnected from the VPN server.
290         " />
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         <annotation name="org.gtk.GDBus.DocString" value="
297           Login failed.
298         " />
299       </tp:enumvalue>
300       <tp:enumvalue suffix="CONNECT_FAILED" value="1">
301         <annotation name="org.gtk.GDBus.DocString" value="
302           Connect failed.
303         " />
304       </tp:enumvalue>
305       <tp:enumvalue suffix="BAD_IP_CONFIG" value="2">
306         <annotation name="org.gtk.GDBus.DocString" value="
307           Invalid IP configuration returned from the VPN plugin.
308         " />
309       </tp:enumvalue>
310     </tp:enum>
311
312   </interface>
313 </node>