Connection
Object Hierarchy:
NM.Connection
NM.Connection
NM.Connection
GLib.Object
GLib.Object
GLib.Object->NM.Connection
Description:
[ CCode ( type_cname = "NMConnectionInterface" , type_id = "nm_connection_get_type ()" ) ]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:
Content:
Static 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 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 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 (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 ()
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 SettingDummy get_setting_dummy ()
A shortcut to return any
SettingDummy 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 SettingIPTunnel get_setting_ip_tunnel ()
public unowned SettingMacsec get_setting_macsec ()
A shortcut to return any
SettingMacsec the connection might contain.
public unowned SettingMacvlan get_setting_macvlan ()
public unowned SettingOlpcMesh get_setting_olpc_mesh ()
public unowned SettingOvsBridge get_setting_ovs_bridge ()
public unowned SettingOvsInterface get_setting_ovs_interface ()
public unowned SettingOvsPatch get_setting_ovs_patch ()
public unowned SettingOvsPort get_setting_ovs_port ()
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 ()
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 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 ()
public unowned SettingWirelessSecurity get_setting_wireless_security ()
public (unowned Setting )[] get_settings ()
Retrieves the settings in this .
public unowned string get_uuid ()
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)
Removes the Setting
with the given Type from the Connection .
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
@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