Connection
Object Hierarchy:
NM.Connection
NM.Connection
NM.Connection
GLib.Object
GLib.Object
GLib.Object->NM.Connection
Description:
[ CCode ( type_id = "nm_connection_get_type ()" ) ]public class Connection : Object
The NMConnection struct contains only private data.
It should only be accessed through the functions described below.
Content:
Properties:
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:
Methods:
public void add_setting (owned Setting setting)
Adds a Setting to
the connection, replacing any previous Setting of the same name which has
previously been added to the Connection .
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 ()
public unowned string get_id ()
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)
Gets the Setting
with the given Type , if one has been previously added to the Connection .
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 ()
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 ()
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 ()
public unowned SettingDcb get_setting_dcb ()
A shortcut to return any
SettingDcb the connection might contain.
public unowned SettingGeneric get_setting_generic ()
public unowned SettingGsm get_setting_gsm ()
A shortcut to return any
SettingGsm the connection might contain.
public unowned SettingInfiniband get_setting_infiniband ()
public unowned SettingIP4Config get_setting_ip4_config ()
public unowned SettingIP6Config get_setting_ip6_config ()
public unowned SettingOlpcMesh get_setting_olpc_mesh ()
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 ()
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 ()
public unowned SettingWirelessSecurity get_setting_wireless_security ()
public unowned string get_uuid ()
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)
Removes the Setting
with the given Type from the Connection .
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
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref