gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Objects.ActiveConnection

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf ActiveConnection o) => IsActiveConnection o Source #

Type class for types which can be safely cast to ActiveConnection, for instance with toActiveConnection.

Instances

Instances details
(GObject o, IsDescendantOf ActiveConnection o) => IsActiveConnection o Source # 
Instance details

Defined in GI.NM.Objects.ActiveConnection

toActiveConnection :: (MonadIO m, IsActiveConnection o) => o -> m ActiveConnection Source #

Cast to ActiveConnection, for types for which this is known to be safe. For general casts, use castTo.

Methods

getConnection

activeConnectionGetConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m RemoteConnection

Returns: the RemoteConnection which this ActiveConnection is an active instance of.

Gets the RemoteConnection associated with connection.

getConnectionType

activeConnectionGetConnectionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Text

Returns: the type of the Connection that backs the ActiveConnection. This is the internal string used by the connection, and must not be modified.

Gets the Connection's type.

getController

activeConnectionGetController Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m (Ptr ())

Returns: the controller Device of the ActiveConnection.

Gets the controller Device of the connection. This replaces the deprecated activeConnectionGetMaster method.

Since: 1.44

getDefault

activeConnectionGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Bool

Returns: True if the active connection is the default IPv4 connection

Whether the active connection is the default IPv4 one (that is, is used for the default IPv4 route and DNS information).

getDefault6

activeConnectionGetDefault6 Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Bool

Returns: True if the active connection is the default IPv6 connection

Whether the active connection is the default IPv6 one (that is, is used for the default IPv6 route and DNS information).

getDevices

activeConnectionGetDevices Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m [Device]

Returns: the PtrArray containing NMDevices. This is the internal copy used by the connection, and must not be modified.

Gets the NMDevices used for the active connections.

getDhcp4Config

activeConnectionGetDhcp4Config Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: an ActiveConnection

-> m DhcpConfig

Returns: the IPv4 DhcpConfig, or Nothing if the connection does not use DHCP, or is not in the ActiveConnectionStateActivated state.

Gets the current IPv4 DhcpConfig (if any) associated with the ActiveConnection.

getDhcp6Config

activeConnectionGetDhcp6Config Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: an ActiveConnection

-> m DhcpConfig

Returns: the IPv6 DhcpConfig, or Nothing if the connection does not use DHCPv6, or is not in the ActiveConnectionStateActivated state.

Gets the current IPv6 DhcpConfig (if any) associated with the ActiveConnection.

getId

activeConnectionGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Text

Returns: the ID of the Connection that backs the ActiveConnection. This is the internal string used by the connection, and must not be modified.

Gets the Connection's ID.

getIp4Config

activeConnectionGetIp4Config Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: an ActiveConnection

-> m IPConfig

Returns: the IPv4 IPConfig, or Nothing if the connection is not in the ActiveConnectionStateActivated state.

Gets the current IPv4 IPConfig associated with the ActiveConnection.

getIp6Config

activeConnectionGetIp6Config Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: an ActiveConnection

-> m IPConfig

Returns: the IPv6 IPConfig, or Nothing if the connection is not in the ActiveConnectionStateActivated state.

Gets the current IPv6 IPConfig associated with the ActiveConnection.

getMaster

activeConnectionGetMaster Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m (Ptr ())

Returns: the controller Device of the ActiveConnection.

Deprecated: (Since version 1.44)Use activeConnectionGetController instead.

Gets the controller Device of the connection.

getSpecificObjectPath

activeConnectionGetSpecificObjectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Text

Returns: the specific object's D-Bus path. This is the internal string used by the connection, and must not be modified.

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 Object; you need to know what kind of object it is based on other information. (Eg, if connection corresponds to a Wi-Fi connection, then the specific object will be an AccessPoint, and you can resolve it with deviceWifiGetAccessPointByPath.)

getState

activeConnectionGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m ActiveConnectionState

Returns: the state

Gets the active connection's state.

getStateFlags

activeConnectionGetStateFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m [ActivationStateFlags]

Returns: the state flags

Gets the active connection's state flags.

Since: 1.10

getStateReason

activeConnectionGetStateReason Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m ActiveConnectionStateReason

Returns: the reason

Gets the reason for active connection's state.

Since: 1.8

getUuid

activeConnectionGetUuid Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Text

Returns: the UUID of the Connection that backs the ActiveConnection. This is the internal string used by the connection, and must not be modified.

Gets the Connection's UUID.

getVpn

activeConnectionGetVpn Source #

Arguments

:: (HasCallStack, MonadIO m, IsActiveConnection a) 
=> a

connection: a ActiveConnection

-> m Bool

Returns: True if the active connection is a VPN connection

Whether the active connection is a VPN connection.

Properties

connection

The connection that this is an active instance of.

getActiveConnectionConnection :: (MonadIO m, IsActiveConnection o) => o -> m RemoteConnection Source #

Get the value of the “connection” property. When overloading is enabled, this is equivalent to

get activeConnection #connection

controller

The controller device if one exists. This replaces the deprecated "master" property.

Since: 1.44

getActiveConnectionController :: (MonadIO m, IsActiveConnection o) => o -> m (Maybe Device) Source #

Get the value of the “controller” property. When overloading is enabled, this is equivalent to

get activeConnection #controller

default

Whether the active connection is the default IPv4 one.

getActiveConnectionDefault :: (MonadIO m, IsActiveConnection o) => o -> m Bool Source #

Get the value of the “default” property. When overloading is enabled, this is equivalent to

get activeConnection #default

default6

Whether the active connection is the default IPv6 one.

getActiveConnectionDefault6 :: (MonadIO m, IsActiveConnection o) => o -> m Bool Source #

Get the value of the “default6” property. When overloading is enabled, this is equivalent to

get activeConnection #default6

devices

dhcp4Config

The IPv4 DhcpConfig of the connection.

getActiveConnectionDhcp4Config :: (MonadIO m, IsActiveConnection o) => o -> m DhcpConfig Source #

Get the value of the “dhcp4-config” property. When overloading is enabled, this is equivalent to

get activeConnection #dhcp4Config

dhcp6Config

The IPv6 DhcpConfig of the connection.

getActiveConnectionDhcp6Config :: (MonadIO m, IsActiveConnection o) => o -> m DhcpConfig Source #

Get the value of the “dhcp6-config” property. When overloading is enabled, this is equivalent to

get activeConnection #dhcp6Config

id

The active connection's ID

getActiveConnectionId :: (MonadIO m, IsActiveConnection o) => o -> m Text Source #

Get the value of the “id” property. When overloading is enabled, this is equivalent to

get activeConnection #id

ip4Config

The IPv4 IPConfig of the connection.

getActiveConnectionIp4Config :: (MonadIO m, IsActiveConnection o) => o -> m IPConfig Source #

Get the value of the “ip4-config” property. When overloading is enabled, this is equivalent to

get activeConnection #ip4Config

ip6Config

The IPv6 IPConfig of the connection.

getActiveConnectionIp6Config :: (MonadIO m, IsActiveConnection o) => o -> m IPConfig Source #

Get the value of the “ip6-config” property. When overloading is enabled, this is equivalent to

get activeConnection #ip6Config

master

The controller device if one exists. Replaced by the "controller" property.

getActiveConnectionMaster :: (MonadIO m, IsActiveConnection o) => o -> m (Maybe Device) Source #

Get the value of the “master” property. When overloading is enabled, this is equivalent to

get activeConnection #master

specificObjectPath

The path to the "specific object" of the active connection; see activeConnectionGetSpecificObjectPath for more details.

getActiveConnectionSpecificObjectPath :: (MonadIO m, IsActiveConnection o) => o -> m Text Source #

Get the value of the “specific-object-path” property. When overloading is enabled, this is equivalent to

get activeConnection #specificObjectPath

state

The state of the active connection.

getActiveConnectionState :: (MonadIO m, IsActiveConnection o) => o -> m ActiveConnectionState Source #

Get the value of the “state” property. When overloading is enabled, this is equivalent to

get activeConnection #state

stateFlags

The state flags of the active connection.

Since: 1.10

getActiveConnectionStateFlags :: (MonadIO m, IsActiveConnection o) => o -> m Word32 Source #

Get the value of the “state-flags” property. When overloading is enabled, this is equivalent to

get activeConnection #stateFlags

type

The active connection's type

getActiveConnectionType :: (MonadIO m, IsActiveConnection o) => o -> m (Maybe Text) Source #

Get the value of the “type” property. When overloading is enabled, this is equivalent to

get activeConnection #type

uuid

The active connection's UUID

getActiveConnectionUuid :: (MonadIO m, IsActiveConnection o) => o -> m Text Source #

Get the value of the “uuid” property. When overloading is enabled, this is equivalent to

get activeConnection #uuid

vpn

Whether the active connection is a VPN connection.

getActiveConnectionVpn :: (MonadIO m, IsActiveConnection o) => o -> m Bool Source #

Get the value of the “vpn” property. When overloading is enabled, this is equivalent to

get activeConnection #vpn

Signals

stateChanged

type ActiveConnectionStateChangedCallback Source #

Arguments

 = Word32

state: the new state number (tActiveConnectionState)

-> Word32

reason: the state change reason (tActiveConnectionStateReason)

-> IO () 

No description available in the introspection data.

afterActiveConnectionStateChanged :: (IsActiveConnection a, MonadIO m) => a -> ((?self :: a) => ActiveConnectionStateChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stateChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after activeConnection #stateChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onActiveConnectionStateChanged :: (IsActiveConnection a, MonadIO m) => a -> ((?self :: a) => ActiveConnectionStateChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stateChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on activeConnection #stateChanged callback