Connection
Object Hierarchy:
Description:
[ CCode ( type_cname = "NMConnectionInterface" , type_id = "nm_connection_get_type ()" ) ]
public interface Connection : Object
public interface Connection : Object
NMConnection is the interface implemented by RemoteConnection on the client side,
and NMSettingsConnection
on the daemon side.
All known implementing classes:
Namespace: NM
Package: libnm
Content:
Constants:
- public const string CHANGED
- public const string NORMALIZE_PARAM_IP4_CONFIG_METHOD
- public const string NORMALIZE_PARAM_IP6_CONFIG_METHOD
- public const string SECRETS_CLEARED
- public const string SECRETS_UPDATED
Static methods:
- public static Quark error_quark ()
Methods:
- public void add_setting (owned Setting setting)
- public void clear_secrets ()
Clears and frees any secrets that may be stored in the connection, to avoid keeping secret data in memory when not needed.
- public void clear_secrets_with_flags (SettingClearSecretsWithFlagsFn? func)
Clears and frees secrets determined by
func
. - public void clear_settings ()
Deletes all of this's settings.
- public bool compare (Connection b, SettingCompareFlags flags)
Compares two Connection objects for similarity, with comparison behavior modified by a set of flags.
- public void dump ()
Print the connection (including secrets!) to stdout.
- public void for_each_setting_value (SettingValueIterFn func)
Iterates over the properties of each Setting object in the Connection, calling the supplied user function for each property.
- public unowned string get_connection_type ()
A shortcut to return the type from the connection's SettingConnection.
- public unowned string get_id ()
A shortcut to return the ID from the connection's SettingConnection.
- public unowned string get_interface_name ()
Returns the interface name as stored in NMSettingConnection:interface_name.
- public unowned string get_path ()
Returns the connection's D-Bus path.
- public unowned Setting get_setting (Type setting_type)
- public unowned Setting8021x get_setting_802_1x ()
A shortcut to return any Setting8021x the connection might contain.
- public unowned SettingAdsl get_setting_adsl ()
A shortcut to return any SettingAdsl the connection might contain.
- public unowned SettingBluetooth get_setting_bluetooth ()
A shortcut to return any SettingBluetooth the connection might contain.
- public unowned SettingBond get_setting_bond ()
A shortcut to return any SettingBond the connection might contain.
- public unowned SettingBridge get_setting_bridge ()
A shortcut to return any SettingBridge the connection might contain.
- public unowned SettingBridgePort get_setting_bridge_port ()
A shortcut to return any SettingBridgePort the connection might contain.
- public unowned Setting get_setting_by_name (string name)
Gets the Setting with the given name, if one has been previously added the Connection.
- public unowned SettingCdma get_setting_cdma ()
A shortcut to return any SettingCdma the connection might contain.
- public unowned SettingConnection get_setting_connection ()
A shortcut to return any SettingConnection the connection might contain.
- public unowned SettingDcb get_setting_dcb ()
A shortcut to return any SettingDcb the connection might contain.
- public unowned SettingDummy get_setting_dummy ()
A shortcut to return any SettingDummy the connection might contain.
- public unowned SettingGeneric get_setting_generic ()
A shortcut to return any SettingGeneric the connection might contain.
- public unowned SettingGsm get_setting_gsm ()
A shortcut to return any SettingGsm the connection might contain.
- public unowned SettingInfiniband get_setting_infiniband ()
A shortcut to return any SettingInfiniband the connection might contain.
- public unowned SettingIP4Config get_setting_ip4_config ()
A shortcut to return any SettingIP4Config the connection might contain.
- public unowned SettingIP6Config get_setting_ip6_config ()
A shortcut to return any SettingIP6Config the connection might contain.
- public unowned SettingIPTunnel get_setting_ip_tunnel ()
A shortcut to return any SettingIPTunnel the connection might contain.
- public unowned SettingMacsec get_setting_macsec ()
A shortcut to return any SettingMacsec the connection might contain.
- public unowned SettingMacvlan get_setting_macvlan ()
A shortcut to return any SettingMacvlan the connection might contain.
- public unowned SettingOlpcMesh get_setting_olpc_mesh ()
A shortcut to return any SettingOlpcMesh the connection might contain.
- public unowned SettingOvsBridge get_setting_ovs_bridge ()
A shortcut to return any SettingOvsBridge the connection might contain.
- public unowned SettingOvsInterface get_setting_ovs_interface ()
A shortcut to return any SettingOvsInterface the connection might contain.
- public unowned SettingOvsPatch get_setting_ovs_patch ()
A shortcut to return any SettingOvsPatch the connection might contain.
- public unowned SettingOvsPort get_setting_ovs_port ()
A shortcut to return any SettingOvsPort the connection might contain.
- public unowned SettingPpp get_setting_ppp ()
A shortcut to return any SettingPpp the connection might contain.
- public unowned SettingPppoe get_setting_pppoe ()
A shortcut to return any SettingPppoe the connection might contain.
- public unowned SettingProxy get_setting_proxy ()
A shortcut to return any SettingProxy the connection might contain.
- public unowned SettingSerial get_setting_serial ()
A shortcut to return any SettingSerial the connection might contain.
- public unowned SettingTCConfig get_setting_tc_config ()
A shortcut to return any SettingTCConfig the connection might contain.
- public unowned SettingTeam get_setting_team ()
A shortcut to return any SettingTeam the connection might contain.
- public unowned SettingTeamPort get_setting_team_port ()
A shortcut to return any SettingTeamPort the connection might contain.
- public unowned SettingTun get_setting_tun ()
A shortcut to return any SettingTun the connection might contain.
- public unowned SettingVlan get_setting_vlan ()
A shortcut to return any SettingVlan the connection might contain.
- public unowned SettingVpn get_setting_vpn ()
A shortcut to return any SettingVpn the connection might contain.
- public unowned SettingVxlan get_setting_vxlan ()
A shortcut to return any SettingVxlan the connection might contain.
- public unowned SettingWimax get_setting_wimax ()
A shortcut to return any SettingWimax the connection might contain.
- public unowned SettingWired get_setting_wired ()
A shortcut to return any SettingWired the connection might contain.
- public unowned SettingWireless get_setting_wireless ()
A shortcut to return any SettingWireless the connection might contain.
- public unowned SettingWirelessSecurity get_setting_wireless_security ()
A shortcut to return any SettingWirelessSecurity the connection might contain.
- public (unowned Setting)[]? get_settings ()
Retrieves the settings in this.
- public unowned string get_uuid ()
A shortcut to return the UUID from the connection's SettingConnection.
- public string get_virtual_device_description ()
Returns the name that disambiguate_names would return for the virtual device that would be created for this.
- public bool is_type (string type)
A convenience function to check if the given this is a particular type (ie wired, Wi-Fi, ppp, etc).
- public bool is_virtual ()
Checks if this refers to a virtual device (and thus can potentially be activated even if the device it refers to doesn't exist).
- public unowned string? need_secrets (out GenericArray<unowned string>? hints)
Returns the name of the first setting object in the connection which would need secrets to make a successful connection.
- public bool normalize (HashTable<string,void*>? parameters, out bool modified) throws Error
Does some basic normalization and fixup of well known inconsistencies and deprecated fields.
- public void remove_setting (Type setting_type)
- public bool replace_settings (Variant new_settings) throws Error
Replaces this's settings with
new_settings
(which must be syntactically valid, and describe a known type of connection, but does not need to result in a connection that passes verify). - public void replace_settings_from_connection (Connection new_connection)
Deep-copies the settings of
new_connection
and replaces the settings of this with the copied settings. - public void set_path (string path)
Sets the D-Bus path of the connection.
- public unowned Variant to_dbus (ConnectionSerializationFlags flags)
Converts the Connection into a Variant of type nm_variant_type_connection describing the connection, suitable for marshalling over D-Bus or otherwise serializing.
- public bool update_secrets (string setting_name, Variant secrets) throws Error
Update the specified setting's secrets, given a dictionary of secrets intended for that setting (deserialized from D-Bus for example).
- public bool verify () throws Error
Validates the connection and all its settings.
- public bool verify_secrets () throws Error
Verifies the secrets in the connection.
Signals:
- public virtual signal void changed ()
The changed signal is emitted when any property (including secrets) of any setting of the connection is modified, or when settings are added or removed.
- public virtual signal void secrets_cleared ()
The secrets_cleared signal is emitted when the secrets of a connection are cleared.
- public virtual signal void secrets_updated (string setting)
The secrets_updated signal is emitted when the secrets of a setting have been changed.
Inherited Members:
All known members inherited from class GLib.Object