NetworkManager/introspection/nm-vpn-plugin.xml
Dan Winship 960c1ae8ff vpn: support IPv6 over VPNs
Add new API to allow passing both IPv4 and IPv6 configuration
information from VPN plugins to the backend.

Now instead of a single Ip4Config, a plugin has Config, Ip4Config, and
Ip6Config. "Config" contains information which is neither IPv4 nor
IPv6 specific, and also indicates which of Ip4Config and Ip6Config are
present. Ip4Config now only contains the IPv4-specific bits of
configuration.

There is backward compatibility in both directions: if the daemon is
new and the VPN plugin is old, then NM will notice that the plugin
emitted the Ip4Config signal without having emitted the Config signal
first, and so will assume that it is IPv4-only, and that the generic
bits of configuration have been included with the Ip4Config. If the
daemon is old and the plugin is new, then NMVPNPlugin will copy the
values from the generic config into the IPv4 config as well. (In fact,
NMVPNPlugin *always* does this, because it's harmless, and it's easier
than actually checking the daemon version.)

Currently the VPN is still configured all-at-once, after both IPv4 and
IPv6 information has been received, but the APIs allow for the
possibility of configuring them one at a time in the future.
2012-05-30 14:24:46 -04:00

200 lines
6.7 KiB
XML

<?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.
</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: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="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>