VPN API changes


I have reworked the NetworkManager VPN API (not the private NM <->
plugin API, but the NM <-> user API) for both D-Bus and libnm-glib to be
more consistent.  A quick summary of the changes, feel free to ask
questions if you'd like more explanation:

- Now use ActivateConnection & DeactivateConnection on the base NM
object to start/stop a VPN connection.  A call to ActivateConnection
should pass the path of a currently active connection (as returned from
the ActiveConnections property of the base NM object) in the
'specific-object' argument, which refers to the connection on which the
VPN connection will be based.  The VPN connection's lifecycle is tied to
the base connection specified here and will be torn down when the base
connection is deactivated or stopped.  The base connection also affects
routing for tun devices, for example.  You can also specify a 'device'
argument, though this is mostly redundant when specifying the base
connection, and I may make this optional for VPN connections in the

- The VPNConnection object now exports the ActiveConnection interface,
and is essentially a subclass of the ActiveConnection object.  So the
objects returned by the ActiveConnections property of the base NM object
will all be instances of ActiveConnection (ie, will export the
org.freedesktop.NetworkManager.Connection.Active interface);
additionally some may be VPNConnections.  If you want to distinguish
between the two, you can look up the ServiceName/Connection in your own
tables of NMConnection objects, or you can query the boolean "Vpn"
property of any ActiveConnection object.

- Consequently, VPNConnection objects no longer export a 'name'
property; the name should be looked up off the 'Id' property of the
connection object identified by the VPNConnection's ServiceName and
Connection properties

- When deactivating a VPNConnection, pass the object path of the
VPNConnection (as returned by the ActiveConnections property of the base
NM object) to the base NM object's DeactivateConnection method.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]