[gnome-control-center] network: add a way to get the vpn connection object back



commit 4081d83ca7d7af2e7fcc68290ae9f489997f4de0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 15 17:20:54 2011 -0400

    network: add a way to get the vpn connection object back
    
    This will be needed to activate/deactivate vpn.

 panels/network/net-vpn.c |    6 ++++++
 panels/network/net-vpn.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/net-vpn.c b/panels/network/net-vpn.c
index 9ccd818..db3a1b0 100644
--- a/panels/network/net-vpn.c
+++ b/panels/network/net-vpn.c
@@ -69,6 +69,12 @@ net_vpn_set_connection (NetVpn *vpn, NMConnection *connection)
         priv->setting = NM_SETTING_VPN (nm_connection_get_setting_by_name (connection, "vpn"));
 }
 
+NMConnection *
+net_vpn_get_connection (NetVpn *vpn)
+{
+        return vpn->priv->connection;
+}
+
 NMVPNConnectionState
 net_vpn_get_state (NetVpn *vpn)
 {
diff --git a/panels/network/net-vpn.h b/panels/network/net-vpn.h
index d409aa4..38c81dc 100644
--- a/panels/network/net-vpn.h
+++ b/panels/network/net-vpn.h
@@ -57,6 +57,7 @@ GType            net_vpn_get_type               (void);
 NetVpn          *net_vpn_new                    (void);
 void             net_vpn_set_connection         (NetVpn         *vpn,
                                                  NMConnection   *connection);
+NMConnection    *net_vpn_get_connection         (NetVpn         *vpn);
 const gchar     *net_vpn_get_gateway            (NetVpn         *vpn);
 const gchar     *net_vpn_get_id                 (NetVpn         *vpn);
 const gchar     *net_vpn_get_username           (NetVpn         *vpn);



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