Connection
Object Hierarchy:
Description:
The NMConnection struct contains only private data.
It should only be accessed through the functions described below.
Namespace: NM
Package: libnm-util
Content:
Properties:
- public string path { get; set construct; }
The connection's D-Bus path, used only by the calling process as a record of the D-Bus path of the connection as provided by a settings service.
Static methods:
- public static Setting create_setting (string name)
Create a new Setting object of the desired type, given a setting name.
- public static Quark error_quark ()
Registers an error quark for Connection if necessary.
- public static Type lookup_setting_type (string name)
Returns the Type of the setting's class for a given setting name.
- public static Type lookup_setting_type_by_quark (Quark error_quark)
Returns the Type of the setting's class for a given setting error quark.
Creation methods:
- public Connection ()
Creates a new Connection object with no Setting objects.
- public Connection.from_hash (HashTable<string,HashTable<void*,void*>> hash) throws Error
Creates a new Connection from a hash table describing the connection.
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 bool compare (Connection b, SettingCompareFlags flags)
Compares two Connection objects for similarity, with comparison behavior modified by a set of flags.
- public bool diff (Connection b, SettingCompareFlags flags, HashTable<string,HashTable<void*,void*>> out_settings)
Compares two Connection objects for similarity, with comparison behavior modified by a set of flags.
- public void dump ()
Print the connection to stdout.
- public Connection duplicate ()
Duplicates a Connection.
- 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 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 SettingOlpcMesh get_setting_olpc_mesh ()
A shortcut to return any SettingOlpcMesh 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 SettingSerial get_setting_serial ()
A shortcut to return any SettingSerial 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 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 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 string get_uuid ()
A shortcut to return the UUID from the connection's SettingConnection.
- public string get_virtual_device_description ()
Returns the name that
nm_device_disambiguate_names
would return for the virtual device that would be created for this. - public unowned string get_virtual_iface_name ()
Returns the name of the virtual kernel interface which the connection needs to use if specified in the settings.
- 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 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 (HashTable<string,HashTable<void*,void*>> new_settings) throws Error
- public bool replace_settings_from_connection (Connection new_connection) throws Error
Deep-copies the settings of
new_conenction
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 HashTable<string,HashTable<void*,void*>> to_hash (SettingHashFlags flags)
Converts the Connection into a GenericSet describing the connection, suitable for marshalling over D-Bus or serializing.
- public bool update_secrets (string setting_name, HashTable<string,Value?> secrets) throws Error
Update the specified setting's secrets, given a hash table of secrets intended for that setting (deserialized from D-Bus for example).
- public bool verify () throws Error
Validates the connection and all its settings.
Signals:
- public signal void changed ()
The changed signal is emitted when any property of any property (including secrets) of any setting of the connection is modified, or when settings are added or removed.
- public 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