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.Device

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Device Source #

Memory-managed wrapper type.

Constructors

Device (ManagedPtr Device) 

Instances

Instances details
Eq Device Source # 
Instance details

Defined in GI.NM.Objects.Device

Methods

(==) :: Device -> Device -> Bool #

(/=) :: Device -> Device -> Bool #

GObject Device Source # 
Instance details

Defined in GI.NM.Objects.Device

ManagedPtrNewtype Device Source # 
Instance details

Defined in GI.NM.Objects.Device

TypedObject Device Source # 
Instance details

Defined in GI.NM.Objects.Device

Methods

glibType :: IO GType #

HasParentTypes Device Source # 
Instance details

Defined in GI.NM.Objects.Device

IsGValue (Maybe Device) Source #

Convert Device to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.NM.Objects.Device

type ParentTypes Device Source # 
Instance details

Defined in GI.NM.Objects.Device

class (GObject o, IsDescendantOf Device o) => IsDevice o Source #

Type class for types which can be safely cast to Device, for instance with toDevice.

Instances

Instances details
(GObject o, IsDescendantOf Device o) => IsDevice o Source # 
Instance details

Defined in GI.NM.Objects.Device

toDevice :: (MonadIO m, IsDevice o) => o -> m Device Source #

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

Methods

connectionCompatible

deviceConnectionCompatible Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b) 
=> a

device: an Device to validate connection against

-> b

connection: an Connection to validate against device

-> m ()

(Can throw GError)

Validates a given connection for a given Device object and returns whether the connection may be activated with the device. For example if device is a Wi-Fi device that supports only WEP encryption, the connection will only be valid if it is a Wi-Fi connection which describes a WEP or open network, and will not be valid if it describes a WPA network, or if it is an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the device.

This function does the same as deviceConnectionValid, i.e. checking compatibility of the given device and connection. But, in addition, it sets GError when FALSE is returned.

connectionValid

deviceConnectionValid Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b) 
=> a

device: an Device to validate connection against

-> b

connection: an Connection to validate against device

-> m Bool

Returns: True if the connection may be activated with this device, False if is incompatible with the device's capabilities and characteristics.

Validates a given connection for a given Device object and returns whether the connection may be activated with the device. For example if device is a Wi-Fi device that supports only WEP encryption, the connection will only be valid if it is a Wi-Fi connection which describes a WEP or open network, and will not be valid if it describes a WPA network, or if it is an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the device.

delete

deviceDelete Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use deviceDeleteAsync or GDBusConnection.

Deletes the software device. Hardware devices can't be deleted.

deleteAsync

deviceDeleteAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when delete operation completes

-> m () 

Asynchronously begins deleting the software device. Hardware devices can't be deleted.

deleteFinish

deviceDeleteFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) 
=> a

device: a Device

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to deviceDeleteAsync.

disambiguateNames

deviceDisambiguateNames Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Device]

devices: an array of Device

-> m [Text]

Returns: the device names

Generates a list of short-ish unique presentation names for the devices in devices.

disconnect

deviceDisconnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use deviceDisconnectAsync or GDBusConnection.

Disconnects the device if currently connected, and prevents the device from automatically connecting to networks until the next manual network connection request.

disconnectAsync

deviceDisconnectAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the disconnect operation completes

-> m () 

Asynchronously begins disconnecting the device if currently connected, and prevents the device from automatically connecting to networks until the next manual network connection request.

disconnectFinish

deviceDisconnectFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) 
=> a

device: a Device

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to deviceDisconnectAsync.

filterConnections

deviceFilterConnections Source #

Arguments

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

device: an Device to filter connections for

-> [Connection]

connections: an array of NMConnections to filter

-> m [Connection]

Returns: an array of NMConnections that could be activated with the given device. The array should be freed with g_ptr_array_unref() when it is no longer required.

WARNING: the transfer annotation for this function may not work correctly with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305. You can filter the list yourself with deviceConnectionValid.

Filters a given array of connections for a given Device object and returns connections which may be activated with the device. For example if device is a Wi-Fi device that supports only WEP encryption, the returned array will contain any Wi-Fi connections in connections that allow connection to unencrypted or WEP-enabled SSIDs. The returned array will not contain Ethernet, Bluetooth, Wi-Fi WPA connections, or any other connection that is incompatible with the device. To get the full list of connections see clientGetConnections.

getActiveConnection

deviceGetActiveConnection Source #

Arguments

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

device: a Device

-> m ActiveConnection

Returns: the ActiveConnection or Nothing if the device is not part of an active connection

Gets the ActiveConnection object which owns this device during activation.

getAppliedConnection

deviceGetAppliedConnection Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Word32

flags: the flags argument. See DeviceReapplyFlags.

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m (Connection, Word64)

Returns: a NMConnection with the currently applied settings or Nothing on error.

The connection is as received from D-Bus and might not validate according to connectionVerify. (Can throw GError)

Deprecated: (Since version 1.22)Use deviceGetAppliedConnectionAsync or GDBusConnection.

Fetch the currently applied connection on the device.

Since: 1.2

getAppliedConnectionAsync

deviceGetAppliedConnectionAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) 
=> a

device: a Device

-> Word32

flags: the flags argument. See DeviceReapplyFlags.

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the reapply operation completes

-> m () 

Asynchronously begins and gets the currently applied connection.

Since: 1.2

getAppliedConnectionFinish

deviceGetAppliedConnectionFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) 
=> a

device: a Device

-> b

result: the result passed to the AsyncReadyCallback

-> m (Connection, Word64)

Returns: a currently applied NMConnection or Nothing in case of error.

The connection is as received from D-Bus and might not validate according to connectionVerify. (Can throw GError)

Gets the result of a call to deviceGetAppliedConnectionAsync.

Since: 1.2

getAutoconnect

deviceGetAutoconnect Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if the device is allowed to be autoconnected

Whether the Device can be autoconnected.

getAvailableConnections

deviceGetAvailableConnections Source #

Arguments

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

device: a Device

-> m [RemoteConnection]

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

Gets the NMRemoteConnections currently known to the daemon that could be activated on device.

getCapabilities

deviceGetCapabilities Source #

Arguments

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

device: a Device

-> m [DeviceCapabilities]

Returns: the capabilities

Gets the device' capabilities.

getConnectivity

deviceGetConnectivity Source #

Arguments

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

device: a Device

-> Int32

addrFamily: network address family

-> m ConnectivityState

Returns: the current connectivity state

The connectivity state of the device for given address family. Supported address families are AF_INET for IPv4, AF_INET6 for IPv6 or AF_UNSPEC for any.

Since: 1.16

getDescription

deviceGetDescription Source #

Arguments

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

device: an Device

-> m Text

Returns: a description of device. If either the vendor or the product name is unknown, this returns the interface name.

Gets a description of device, based on its vendor and product names.

getDeviceType

deviceGetDeviceType Source #

Arguments

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

device: a Device

-> m DeviceType

Returns: the device type

Returns the numeric type of the Device, ie Ethernet, Wi-Fi, etc.

getDhcp4Config

deviceGetDhcp4Config Source #

Arguments

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

device: a Device

-> m DhcpConfig

Returns: the IPv4 DhcpConfig, or Nothing if the device is not activated or not using DHCP.

Gets the current IPv4 DhcpConfig associated with the Device.

You can alternatively use activeConnectionGetDhcp4Config, which also works with VPN connections.

getDhcp6Config

deviceGetDhcp6Config Source #

Arguments

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

device: a Device

-> m DhcpConfig

Returns: the IPv6 DhcpConfig, or Nothing if the device is not activated or not using DHCPv6.

Gets the current IPv6 DhcpConfig associated with the Device.

You can alternatively use activeConnectionGetDhcp6Config, which also works with VPN connections.

getDriver

deviceGetDriver Source #

Arguments

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

device: a Device

-> m Text

Returns: the driver of the device. This is the internal string used by the device, and must not be modified.

Gets the driver of the Device.

getDriverVersion

deviceGetDriverVersion Source #

Arguments

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

device: a Device

-> m Text

Returns: the version of the device driver. This is the internal string used by the device, and must not be modified.

Gets the driver version of the Device.

getFirmwareMissing

deviceGetFirmwareMissing Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if firmware required for the device's operation is likely to be missing.

Indicates that firmware required for the device's operation is likely to be missing.

getFirmwareVersion

deviceGetFirmwareVersion Source #

Arguments

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

device: a Device

-> m Text

Returns: the firmware version of the device. This is the internal string used by the device, and must not be modified.

Gets the firmware version of the Device.

getHwAddress

deviceGetHwAddress Source #

Arguments

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

device: a Device

-> m Text

Returns: the current MAC of the device, or Nothing. This is the internal string used by the device, and must not be modified.

Gets the current a hardware address (MAC) for the device.

getIface

deviceGetIface Source #

Arguments

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

device: a Device

-> m Text

Returns: the interface of the device. This is the internal string used by the device, and must not be modified.

Gets the interface name of the Device.

getInterfaceFlags

deviceGetInterfaceFlags Source #

Arguments

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

device: a Device

-> m [DeviceInterfaceFlags]

Returns: the flags

Gets the interface flags of the device.

Since: 1.22

getIp4Config

deviceGetIp4Config Source #

Arguments

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

device: a Device

-> m IPConfig

Returns: the IPv4 IPConfig, or Nothing if the device is not activated.

Gets the current IPv4 IPConfig associated with the Device.

You can alternatively use activeConnectionGetIp4Config, which also works with VPN connections.

getIp6Config

deviceGetIp6Config Source #

Arguments

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

device: a Device

-> m IPConfig

Returns: the IPv6 IPConfig or Nothing if the device is not activated.

Gets the current IPv6 IPConfig associated with the Device.

You can alternatively use activeConnectionGetIp6Config, which also works with VPN connections.

getIpIface

deviceGetIpIface Source #

Arguments

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

device: a Device

-> m Text

Returns: the IP traffic interface of the device. This is the internal string used by the device, and must not be modified.

Gets the IP interface name of the Device over which IP traffic flows when the device is in the ACTIVATED state.

getLldpNeighbors

deviceGetLldpNeighbors Source #

Arguments

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

device: a Device

-> m [LldpNeighbor]

Returns: the PtrArray containing LldpNeighbors. This is the internal copy used by the device and must not be modified. The library never modifies the returned array and thus it is safe for callers to reference and keep using it.

Gets the list of neighbors discovered through LLDP.

Since: 1.2

getManaged

deviceGetManaged Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if the device is managed by NetworkManager

Whether the Device is managed by NetworkManager.

getMetered

deviceGetMetered Source #

Arguments

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

device: a Device

-> m Metered

Returns: the metered setting.

Gets the metered setting of a Device.

Since: 1.2

getMtu

deviceGetMtu Source #

Arguments

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

device: a Device

-> m Word32

Returns: the MTU of the device in bytes.

Gets the MTU of the Device.

getNmPluginMissing

deviceGetNmPluginMissing Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if the device plugin not installed.

Indicates that the NetworkManager plugin for the device is not installed.

Since: 1.2

getPath

deviceGetPath Source #

Arguments

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

device: a Device

-> m Text

Returns: the path of the device.

The string is backslash escaped (C escaping) for invalid characters. The escaping can be reverted with strcompress, however the result may not be valid UTF-8.

Gets the path of the Device as exposed by the udev property ID_PATH.

Since: 1.26

getPhysicalPortId

deviceGetPhysicalPortId Source #

Arguments

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

device: a Device

-> m Text

Returns: the physical port ID of the device, or Nothing if the port ID is unknown. This is the internal string used by the device and must not be modified.

Gets the physical port ID of the Device. If non-Nothing, this is an opaque string that can be used to recognize when seemingly-unrelated NMDevices are actually just different virtual ports on a single physical port. (Eg, NPAR / SR-IOV.)

getPorts

deviceGetPorts Source #

Arguments

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

device: a Device

-> m [Device]

Returns: the PtrArray containing NMDevices that are ports of device. This is the internal copy used by the device and must not be modified.

Gets the devices currently set as port of device.

Since: 1.34

getProduct

deviceGetProduct Source #

Arguments

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

device: a Device

-> m Text

Returns: the product name of the device. This is the internal string used by the device, and must not be modified.

The string is backslash escaped (C escaping) for invalid characters. The escaping can be reverted with strcompress, however the result may not be valid UTF-8.

Gets the product string of the Device.

getSettingType

deviceGetSettingType Source #

Arguments

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

device: an Device

-> m GType

Returns: device's associated Setting type

Gets the (primary) Setting subtype associated with connections that can be used on device.

getState

deviceGetState Source #

Arguments

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

device: a Device

-> m DeviceState

Returns: the current device state

Gets the current Device state.

getStateReason

deviceGetStateReason Source #

Arguments

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

device: a Device

-> m DeviceStateReason

Returns: the reason for entering the current device state

Gets the reason for entering the current Device state.

getTypeDescription

deviceGetTypeDescription Source #

Arguments

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

device: a Device

-> m Text

Returns: the type description of the device. This is the internal string used by the device, and must not be modified.

Gets a (non-localized) description of the type of device that device is.

getUdi

deviceGetUdi Source #

Arguments

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

device: a Device

-> m Text

Returns: the Unique Device Identifier of the device. This identifier may be used to gather more information about the device from various operating system services like udev or sysfs.

Gets the Unique Device Identifier of the Device.

getVendor

deviceGetVendor Source #

Arguments

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

device: a Device

-> m Text

Returns: the vendor name of the device. This is the internal string used by the device, and must not be modified.

The string is backslash escaped (C escaping) for invalid characters. The escaping can be reverted with strcompress, however the result may not be valid UTF-8.

Gets the vendor string of the Device.

isReal

deviceIsReal Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if the device exists, or False if it is a placeholder device that could be automatically created by NetworkManager if one of its Device:availableConnections was activated.

No description available in the introspection data.

Since: 1.2

isSoftware

deviceIsSoftware Source #

Arguments

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

device: a Device

-> m Bool

Returns: True if device is a software device, False if it is a hardware device.

Whether the device is a software device.

reapply

deviceReapply Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) 
=> a

device: a Device

-> Maybe b

connection: the Connection to replace the applied settings with or Nothing to reuse existing

-> Word64

versionId: zero or the expected version id of the applied connection. If specified and the version id mismatches, the call fails without modification. This allows to catch concurrent accesses.

-> Word32

flags: always set this to zero

-> Maybe c

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.22)Use deviceReapplyAsync or GDBusConnection.

Attempts to update device with changes to the currently active connection made since it was last applied.

Since: 1.2

reapplyAsync

deviceReapplyAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) 
=> a

device: a Device

-> Maybe b

connection: the Connection to replace the applied settings with or Nothing to reuse existing

-> Word64

versionId: zero or the expected version id of the applied connection. If specified and the version id mismatches, the call fails without modification. This allows to catch concurrent accesses.

-> Word32

flags: always set this to zero

-> Maybe c

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the reapply operation completes

-> m () 

Asynchronously begins an attempt to update device with changes to the currently active connection made since it was last applied.

Since: 1.2

reapplyFinish

deviceReapplyFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) 
=> a

device: a Device

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to deviceReapplyAsync.

Since: 1.2

setAutoconnect

deviceSetAutoconnect Source #

Arguments

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

device: a Device

-> Bool

autoconnect: True to enable autoconnecting

-> m () 

Deprecated: (Since version 1.22)Use the async command clientDbusSetProperty onobjectGetPath, NM_DBUS_INTERFACE_DEVICE to set "Autoconnect" property to a "(b)" value.This function is deprecated because it calls a synchronous D-Bus methodand modifies the content of the NMClient cache client side.

Enables or disables automatic activation of the Device.

setManaged

deviceSetManaged Source #

Arguments

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

device: a Device

-> Bool

managed: True to make the device managed by NetworkManager.

-> m () 

Deprecated: (Since version 1.22)Use the async command clientDbusSetProperty onobjectGetPath, interface NM_DBUS_INTERFACE_DEVICE to set the"Managed" property to a "(b)" boolean value.This function is deprecated because it calls a synchronous D-Bus methodand modifies the content of the NMClient cache client side. Also, it doesnot emit a property changed signal.

Enables or disables management of Device by NetworkManager.

Since: 1.2

Properties

activeConnection

The ActiveConnection object that "owns" this device during activation.

getDeviceActiveConnection :: (MonadIO m, IsDevice o) => o -> m ActiveConnection Source #

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

get device #activeConnection

autoconnect

Whether the device can auto-activate a connection.

The property setter is a synchronous D-Bus call. This is deprecated since 1.22.

constructDeviceAutoconnect :: (IsDevice o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “autoconnect” property. This is rarely needed directly, but it is used by new.

getDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> m Bool Source #

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

get device #autoconnect

setDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> Bool -> m () Source #

Set the value of the “autoconnect” property. When overloading is enabled, this is equivalent to

set device [ #autoconnect := value ]

availableConnections

capabilities

The capabilities of the device.

getDeviceCapabilities :: (MonadIO m, IsDevice o) => o -> m [DeviceCapabilities] Source #

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

get device #capabilities

deviceType

The numeric type of the device.

getDeviceDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType Source #

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

get device #deviceType

dhcp4Config

The IPv4 DhcpConfig of the device.

getDeviceDhcp4Config :: (MonadIO m, IsDevice o) => o -> m DhcpConfig Source #

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

get device #dhcp4Config

dhcp6Config

The IPv6 DhcpConfig of the device.

getDeviceDhcp6Config :: (MonadIO m, IsDevice o) => o -> m DhcpConfig Source #

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

get device #dhcp6Config

driver

The driver of the device.

getDeviceDriver :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #driver

driverVersion

The version of the device driver.

getDeviceDriverVersion :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #driverVersion

firmwareMissing

When True indicates the device is likely missing firmware required for its operation.

getDeviceFirmwareMissing :: (MonadIO m, IsDevice o) => o -> m Bool Source #

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

get device #firmwareMissing

firmwareVersion

The firmware version of the device.

getDeviceFirmwareVersion :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #firmwareVersion

hwAddress

The hardware address of the device.

Since: 1.24

getDeviceHwAddress :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #hwAddress

interface

The interface of the device.

getDeviceInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #

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

get device #interface

interfaceFlags

The interface flags.

Since: 1.22

getDeviceInterfaceFlags :: (MonadIO m, IsDevice o) => o -> m Word32 Source #

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

get device #interfaceFlags

ip4Config

The NMIP4Config of the device.

getDeviceIp4Config :: (MonadIO m, IsDevice o) => o -> m IPConfig Source #

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

get device #ip4Config

ip4Connectivity

The IPv4 connectivity state of the device.

Since: 1.16

getDeviceIp4Connectivity :: (MonadIO m, IsDevice o) => o -> m ConnectivityState Source #

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

get device #ip4Connectivity

ip6Config

The IPv6 IPConfig of the device.

getDeviceIp6Config :: (MonadIO m, IsDevice o) => o -> m IPConfig Source #

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

get device #ip6Config

ip6Connectivity

The IPv6 connectivity state of the device.

Since: 1.16

getDeviceIp6Connectivity :: (MonadIO m, IsDevice o) => o -> m ConnectivityState Source #

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

get device #ip6Connectivity

ipInterface

The IP interface of the device which should be used for all IP-related operations like addressing and routing.

getDeviceIpInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #

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

get device #ipInterface

lldpNeighbors

managed

Whether the device is managed by NetworkManager.

getDeviceManaged :: (MonadIO m, IsDevice o) => o -> m Bool Source #

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

get device #managed

metered

Whether the device is metered.

Since: 1.2

getDeviceMetered :: (MonadIO m, IsDevice o) => o -> m Word32 Source #

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

get device #metered

mtu

The MTU of the device.

getDeviceMtu :: (MonadIO m, IsDevice o) => o -> m Word32 Source #

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

get device #mtu

nmPluginMissing

When True indicates that the NetworkManager plugin for the device is not installed.

Since: 1.2

getDeviceNmPluginMissing :: (MonadIO m, IsDevice o) => o -> m Bool Source #

Get the value of the “nm-plugin-missing” property. When overloading is enabled, this is equivalent to

get device #nmPluginMissing

path

The device path as exposed by the udev property ID_PATH.

The string is backslash escaped (C escaping) for invalid characters. The escaping can be reverted with strcompress, however the result may not be valid UTF-8.

Since: 1.26

getDevicePath :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #path

physicalPortId

The physical port ID of the device. (See deviceGetPhysicalPortId.)

getDevicePhysicalPortId :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #physicalPortId

ports

product

The product string of the device.

getDeviceProduct :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #product

real

Whether the device is real or is a placeholder device that could be created automatically by NetworkManager if one of its Device:availableConnections was activated.

Since: 1.2

getDeviceReal :: (MonadIO m, IsDevice o) => o -> m Bool Source #

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

get device #real

state

The state of the device.

getDeviceState :: (MonadIO m, IsDevice o) => o -> m DeviceState Source #

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

get device #state

stateReason

The reason for the device state.

getDeviceStateReason :: (MonadIO m, IsDevice o) => o -> m Word32 Source #

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

get device #stateReason

udi

An operating-system specific device hardware identifier; this is not unique to a specific hardware device across reboots or hotplugs. It is an opaque string which for some device types (Bluetooth, Modem) contains an identifier provided by the underlying hardware service daemon such as Bluez or ModemManager, and clients can use this property to request more information about the device from those services.

getDeviceUdi :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #udi

vendor

The vendor string of the device.

getDeviceVendor :: (MonadIO m, IsDevice o) => o -> m Text Source #

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

get device #vendor

Signals

stateChanged

type DeviceStateChangedCallback Source #

Arguments

 = Word32

newState: the new state of the device

-> Word32

oldState: the previous state of the device

-> Word32

reason: the reason describing the state change

-> IO () 

Notifies the state change of a Device.

afterDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> 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 device #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.

onDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> 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 device #stateChanged callback