NM.ActiveConnection¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|
||
r |
|||
r |
|||
r |
|||
r |
|||
r |
|||
r |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class NM.ActiveConnection(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- get_connection()¶
- Returns:
the
NM.RemoteConnection
which thisNM.ActiveConnection
is an active instance of.- Return type:
Gets the
NM.RemoteConnection
associated with self.
- get_connection_type()¶
- Returns:
the type of the
NM.Connection
that backs theNM.ActiveConnection
. This is the internal string used by the connection, and must not be modified.- Return type:
Gets the
NM.Connection
's type.
- get_controller()¶
- Returns:
the controller
NM.Device
of theNM.ActiveConnection
.- Return type:
Gets the controller
NM.Device
of the connection. This replaces the deprecatedNM.ActiveConnection.get_master
() method.New in version 1.44.
- get_default()¶
-
Whether the active connection is the default IPv4 one (that is, is used for the default IPv4 route and DNS information).
- get_default6()¶
-
Whether the active connection is the default IPv6 one (that is, is used for the default IPv6 route and DNS information).
- get_devices()¶
- Returns:
the
GLib.PtrArray
containingNM.Devices
. This is the internal copy used by the connection, and must not be modified.- Return type:
Gets the
NM.Devices
used for the active connections.
- get_dhcp4_config()¶
- Returns:
the IPv4
NM.DhcpConfig
, orNone
if the connection does not use DHCP, or is not in theNM.ActiveConnectionState.ACTIVATED
state.- Return type:
Gets the current IPv4
NM.DhcpConfig
(if any) associated with theNM.ActiveConnection
.
- get_dhcp6_config()¶
- Returns:
the IPv6
NM.DhcpConfig
, orNone
if the connection does not use DHCPv6, or is not in theNM.ActiveConnectionState.ACTIVATED
state.- Return type:
Gets the current IPv6
NM.DhcpConfig
(if any) associated with theNM.ActiveConnection
.
- get_id()¶
- Returns:
the ID of the
NM.Connection
that backs theNM.ActiveConnection
. This is the internal string used by the connection, and must not be modified.- Return type:
Gets the
NM.Connection
's ID.
- get_ip4_config()¶
- Returns:
the IPv4
NM.IPConfig
, orNone
if the connection is not in theNM.ActiveConnectionState.ACTIVATED
state.- Return type:
Gets the current IPv4
NM.IPConfig
associated with theNM.ActiveConnection
.
- get_ip6_config()¶
- Returns:
the IPv6
NM.IPConfig
, orNone
if the connection is not in theNM.ActiveConnectionState.ACTIVATED
state.- Return type:
Gets the current IPv6
NM.IPConfig
associated with theNM.ActiveConnection
.
- get_master()¶
- Returns:
the master
NM.Device
of theNM.ActiveConnection
.- Return type:
Gets the master
NM.Device
of the connection.Deprecated since version 1.44: Use
NM.ActiveConnection.get_controller
() instead.
- get_specific_object_path()¶
- Returns:
the specific object’s D-Bus path. This is the internal string used by the connection, and must not be modified.
- Return type:
Gets the path of the “specific object” used at activation.
Currently, there is no single method that will allow you to automatically turn this into an appropriate
NM.Object
; you need to know what kind of object it is based on other information. (Eg, if self corresponds to a Wi-Fi connection, then the specific object will be anNM.AccessPoint
, and you can resolve it withNM.DeviceWifi.get_access_point_by_path
().)
- get_state()¶
- Returns:
the state
- Return type:
Gets the active connection’s state.
- get_state_flags()¶
- Returns:
the state flags
- Return type:
Gets the active connection’s state flags.
New in version 1.10.
- get_state_reason()¶
- Returns:
the reason
- Return type:
Gets the reason for active connection’s state.
New in version 1.8.
- get_uuid()¶
- Returns:
the UUID of the
NM.Connection
that backs theNM.ActiveConnection
. This is the internal string used by the connection, and must not be modified.- Return type:
Gets the
NM.Connection
's UUID.
Signal Details¶
- NM.ActiveConnection.signals.state_changed(active_connection, state, reason)¶
- Signal Name:
state-changed
- Flags:
- Parameters:
active_connection (
NM.ActiveConnection
) – The object which received the signalstate (
int
) – the new state number (NM.ActiveConnectionState
)reason (
int
) – the state change reason (NM.ActiveConnectionStateReason
)
Property Details¶
- NM.ActiveConnection.props.connection¶
- Name:
connection
- Type:
- Default Value:
- Flags:
The connection that this is an active instance of.
- NM.ActiveConnection.props.controller¶
-
The controller device if one exists. This replaces the deprecated “master” property.
New in version 1.44.
- NM.ActiveConnection.props.default¶
-
Whether the active connection is the default IPv4 one.
- NM.ActiveConnection.props.default6¶
-
Whether the active connection is the default IPv6 one.
- NM.ActiveConnection.props.devices¶
- Name:
devices
- Type:
- Default Value:
- Flags:
The devices of the active connection.
- NM.ActiveConnection.props.dhcp4_config¶
- Name:
dhcp4-config
- Type:
- Default Value:
- Flags:
The IPv4
NM.DhcpConfig
of the connection.
- NM.ActiveConnection.props.dhcp6_config¶
- Name:
dhcp6-config
- Type:
- Default Value:
- Flags:
The IPv6
NM.DhcpConfig
of the connection.
- NM.ActiveConnection.props.id¶
-
The active connection’s ID
- NM.ActiveConnection.props.ip4_config¶
- Name:
ip4-config
- Type:
- Default Value:
- Flags:
The IPv4
NM.IPConfig
of the connection.
- NM.ActiveConnection.props.ip6_config¶
- Name:
ip6-config
- Type:
- Default Value:
- Flags:
The IPv6
NM.IPConfig
of the connection.
- NM.ActiveConnection.props.master¶
-
The master device if one exists. Replaced by the “controller” property.
Deprecated since version 1.44.
- NM.ActiveConnection.props.specific_object_path¶
-
The path to the “specific object” of the active connection; see
NM.ActiveConnection.get_specific_object_path
() for more details.
- NM.ActiveConnection.props.state¶
- Name:
state
- Type:
- Default Value:
- Flags:
The state of the active connection.
- NM.ActiveConnection.props.state_flags¶
-
The state flags of the active connection.
New in version 1.10.
- NM.ActiveConnection.props.type¶
-
The active connection’s type
- NM.ActiveConnection.props.uuid¶
-
The active connection’s UUID