Re: [PATCH] libnm-glib: Add missing function nm_active_connection_get_vpn()



On Fri, 2010-02-19 at 13:54 +0100, Jirka Klimes wrote:
> Hello,
> 
> the attached patch adds nm_active_connection_get_vpn() method
> for NMActiveConnection obtaining Vpn property of 
> org.freedesktop.NetworkManager.Connection.Active interface.

Actually, this should be handled internally by libnm-glib, so given an
NMActiveConnection object, you can:


if (NM_IS_VPN_CONNECTION (active_connection))
    <it's a VPN>
else
    <it's not>

since NMVPNConnection is a subclass of NMActiveConnection.  The object
cache stuff will automatically figure out what type it should be when
creating the object initially in response to the ActiveConnection
property changes.

Dan




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