network: add a way to get the vpn connection object back
This will be needed to activate/deactivate vpn.
This commit is contained in:
parent
3163675d85
commit
4081d83ca7
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue