summaryrefslogtreecommitdiff
path: root/introspection/nm-vpn-plugin.xml
blob: 07397c2b97c976517865218ab19cbf843d3b3308 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<?xml version="1.0" encoding="UTF-8" ?>

<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  <interface name="org.freedesktop.NetworkManager.VPN.Plugin">
    <tp:docstring>
      This interface is provided by plugins providing VPN services to the NetworkManager daemon.
    </tp:docstring>

    <method name="Connect">
      <tp:docstring>
        Tells the plugin to connect.  Interactive secrets requests (eg, emitting
        the SecretsRequired signal) are not allowed.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_connect"/>
      <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
        <tp:docstring>
          Describes the connection to be established.
        </tp:docstring>
      </arg>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StartingInProgress"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStarted"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
      </tp:possible-errors>
    </method>

    <method name="ConnectInteractive">
      <tp:docstring>
        Tells the plugin to connect, allowing interactive secrets requests (eg
        the plugin is allowed to emit the SecretsRequired signal if the VPN
        service indicates that it needs additional secrets during the connect
        process).
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_connect_interactive"/>
      <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
        <tp:docstring>
          Describes the connection to be established.
        </tp:docstring>
      </arg>
      <arg name="details" type="a{sv}" direction="in" tp:type="String_Variant_Map">
        <tp:docstring>
          Additional details about the Connect process.
        </tp:docstring>
      </arg>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StartingInProgress"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStarted"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/>
      </tp:possible-errors>
    </method>

    <method name="NeedSecrets">
      <tp:docstring>
        Asks the plugin whether the provided connection will require secrets to connect successfully.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_need_secrets"/>
      <arg name="settings" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
        <tp:docstring>
          Describes the connection that may need secrets.
        </tp:docstring>
      </arg>
      <arg name="setting_name" type="s" direction="out">
        <tp:docstring>
          The setting name within the provided connection that requires secrets, if any.
        </tp:docstring>
      </arg>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.ConnectionInvalid"/>
      </tp:possible-errors>
    </method>

    <method name="Disconnect">
      <tp:docstring>
        Disconnect the plugin.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_disconnect"/>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.StoppingInProgress"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.AlreadyStopped"/>
      </tp:possible-errors>
    </method>

    <method name="SetConfig">
      <tp:docstring>
        Set generic connection details on the connection.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_config"/>
      <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
        <tp:docstring>
          Generic configuration details for the connection.
        </tp:docstring>
      </arg>
    </method>

    <method name="SetIp4Config">
      <tp:docstring>
        Set IPv4 details on the connection.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_ip4_config"/>
      <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
        <tp:docstring>
          Ip4Config details for the connection. You must call
	  SetConfig() before calling this.
        </tp:docstring>
      </arg>
    </method>

    <method name="SetIp6Config">
      <tp:docstring>
        Set IPv6 details on the connection.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_ip6_config"/>
      <arg name="config" type="a{sv}" direction="in" tp:type="String_Variant_Map">
        <tp:docstring>
          Ip6Config details for the connection. You must call
	  SetConfig() before calling this.
        </tp:docstring>
      </arg>
    </method>

    <method name="SetFailure">
      <tp:docstring>
        Indicate a failure to the plugin.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_set_failure"/>
      <arg name="reason" type="s" direction="in">
        <tp:docstring>
          The reason for the failure.
        </tp:docstring>
      </arg>
    </method>

    <property name="State" type="u" access="read" tp:type="NM_VPN_CONNECTION_STATE">
      <tp:docstring>
        The state of the plugin.
      </tp:docstring>
    </property>

    <signal name="StateChanged">
      <tp:docstring>
        Emitted when the plugin state changes.
      </tp:docstring>
      <arg name="state" type="u" tp:type="NM_VPN_CONNECTION_STATE">
        <tp:docstring>
          The new state of the plugin.
        </tp:docstring>
      </arg>
    </signal>

    <signal name="SecretsRequired">
      <tp:docstring>
        Emitted during an ongoing ConnectInteractive() request when the plugin
        has determined that new secrets are required.  NetworkManager will then
        call the NewSecrets() method with a connection hash including the new
        secrets.
      </tp:docstring>
      <arg name="message" type="s" direction="out">
          <tp:docstring>
              Informational message, if any, about the request.  For example, if
              a second PIN is required, could indicate to the user to wait for
              the token code to change until entering the next PIN.
          </tp:docstring>
      </arg>
      <arg name="secrets" type="as" direction="out">
          <tp:docstring>
              Array of strings of VPN secret names which the plugin thinks
              secrets may be required for, or other VPN-specific data to be
              processed by the VPN's front-end.
          </tp:docstring>
      </arg>
    </signal>

    <method name="NewSecrets">
      <tp:docstring>
        Called in response to a SecretsRequired signal to deliver updated secrets
        or other information to the plugin.
      </tp:docstring>
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_vpn_plugin_new_secrets"/>
      <arg name="connection" type="a{sa{sv}}" direction="in" tp:type="String_String_Variant_Map_Map">
        <tp:docstring>
          Describes the connection including the new secrets.
        </tp:docstring>
      </arg>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/>
        <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/>
      </tp:possible-errors>
    </method>

    <signal name="Config">
      <tp:docstring>
        The plugin obtained generic configuration information.
      </tp:docstring>
      <arg name="config" type="a{sv}" tp:type="String_Variant_Map">
        <tp:docstring>
          The configuration information.
        </tp:docstring>
      </arg>
    </signal>

    <signal name="Ip4Config">
      <tp:docstring>
        The plugin obtained an IPv4 configuration.
      </tp:docstring>
      <arg name="ip4config" type="a{sv}" tp:type="String_Variant_Map">
        <tp:docstring>
          The IPv4 configuration.
        </tp:docstring>
      </arg>
    </signal>

    <signal name="Ip6Config">
      <tp:docstring>
        The plugin obtained an IPv6 configuration.
      </tp:docstring>
      <arg name="ip6config" type="a{sv}" tp:type="String_Variant_Map">
        <tp:docstring>
          The IPv6 configuration.
        </tp:docstring>
      </arg>
    </signal>

    <signal name="LoginBanner">
      <tp:docstring>
        Emitted when the plugin receives a login banner from the VPN service.
      </tp:docstring>
      <arg name="banner" type="s">
        <tp:docstring>
          The login banner string.
        </tp:docstring>
      </arg>
    </signal>

    <signal name="Failure">
      <tp:docstring>
        Emitted when a failure in the VPN plugin occurs.
      </tp:docstring>
      <arg name="reason" type="u" tp:type="NM_VPN_PLUGIN_FAILURE">
        <tp:docstring>
          Reason code for the failure.
        </tp:docstring>
      </arg>
    </signal>

    <tp:enum name="NM_VPN_PLUGIN_FAILURE" type="u">
      <tp:enumvalue suffix="LOGIN_FAILED" value="0">
        <tp:docstring>
          Login failed.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="CONNECT_FAILED" value="1">
        <tp:docstring>
          Connect failed.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="BAD_IP_CONFIG" value="2">
        <tp:docstring>
          Invalid IP configuration returned from the VPN plugin.
        </tp:docstring>
      </tp:enumvalue>
    </tp:enum>

  </interface>
</node>