Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.NM.Objects.Device
Contents
- Exported types
- Methods
- connectionCompatible
- connectionValid
- delete
- deleteAsync
- deleteFinish
- disambiguateNames
- disconnect
- disconnectAsync
- disconnectFinish
- filterConnections
- getActiveConnection
- getAppliedConnection
- getAppliedConnectionAsync
- getAppliedConnectionFinish
- getAutoconnect
- getAvailableConnections
- getCapabilities
- getConnectivity
- getDescription
- getDeviceType
- getDhcp4Config
- getDhcp6Config
- getDriver
- getDriverVersion
- getFirmwareMissing
- getFirmwareVersion
- getHwAddress
- getIface
- getInterfaceFlags
- getIp4Config
- getIp6Config
- getIpIface
- getLldpNeighbors
- getManaged
- getMetered
- getMtu
- getNmPluginMissing
- getPath
- getPhysicalPortId
- getPorts
- getProduct
- getSettingType
- getState
- getStateReason
- getTypeDescription
- getUdi
- getVendor
- isReal
- isSoftware
- reapply
- reapplyAsync
- reapplyFinish
- setAutoconnect
- setManaged
- Properties
- activeConnection
- autoconnect
- availableConnections
- capabilities
- deviceType
- dhcp4Config
- dhcp6Config
- driver
- driverVersion
- firmwareMissing
- firmwareVersion
- hwAddress
- interface
- interfaceFlags
- ip4Config
- ip4Connectivity
- ip6Config
- ip6Connectivity
- ipInterface
- lldpNeighbors
- managed
- metered
- mtu
- nmPluginMissing
- path
- physicalPortId
- ports
- product
- real
- state
- stateReason
- udi
- vendor
- Signals
Description
No description available in the introspection data.
Synopsis
- newtype Device = Device (ManagedPtr Device)
- class (GObject o, IsDescendantOf Device o) => IsDevice o
- toDevice :: (MonadIO m, IsDevice o) => o -> m Device
- deviceConnectionCompatible :: (HasCallStack, MonadIO m, IsDevice a, IsConnection b) => a -> b -> m ()
- deviceConnectionValid :: (HasCallStack, MonadIO m, IsDevice a, IsConnection b) => a -> b -> m Bool
- deviceDelete :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Maybe b -> m ()
- deviceDeleteAsync :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- deviceDeleteFinish :: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) => a -> b -> m ()
- deviceDisambiguateNames :: (HasCallStack, MonadIO m) => [Device] -> m [Text]
- deviceDisconnect :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Maybe b -> m ()
- deviceDisconnectAsync :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- deviceDisconnectFinish :: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) => a -> b -> m ()
- deviceFilterConnections :: (HasCallStack, MonadIO m, IsDevice a) => a -> [Connection] -> m [Connection]
- deviceGetActiveConnection :: (HasCallStack, MonadIO m, IsDevice a) => a -> m ActiveConnection
- deviceGetAppliedConnection :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Word32 -> Maybe b -> m (Connection, Word64)
- deviceGetAppliedConnectionAsync :: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) => a -> Word32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- deviceGetAppliedConnectionFinish :: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) => a -> b -> m (Connection, Word64)
- deviceGetAutoconnect :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetAvailableConnections :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [RemoteConnection]
- deviceGetCapabilities :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [DeviceCapabilities]
- deviceGetConnectivity :: (HasCallStack, MonadIO m, IsDevice a) => a -> Int32 -> m ConnectivityState
- deviceGetDescription :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetDeviceType :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceType
- deviceGetDhcp4Config :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DhcpConfig
- deviceGetDhcp6Config :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DhcpConfig
- deviceGetDriver :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetDriverVersion :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetFirmwareMissing :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetFirmwareVersion :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetHwAddress :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetIface :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetInterfaceFlags :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [DeviceInterfaceFlags]
- deviceGetIp4Config :: (HasCallStack, MonadIO m, IsDevice a) => a -> m IPConfig
- deviceGetIp6Config :: (HasCallStack, MonadIO m, IsDevice a) => a -> m IPConfig
- deviceGetIpIface :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetLldpNeighbors :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [LldpNeighbor]
- deviceGetManaged :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetMetered :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Metered
- deviceGetMtu :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Word32
- deviceGetNmPluginMissing :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetPath :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetPhysicalPortId :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetPorts :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [Device]
- deviceGetProduct :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetSettingType :: (HasCallStack, MonadIO m, IsDevice a) => a -> m GType
- deviceGetState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceState
- deviceGetStateReason :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceStateReason
- deviceGetTypeDescription :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetUdi :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetVendor :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceIsReal :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceIsSoftware :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceReapply :: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) => a -> Maybe b -> Word64 -> Word32 -> Maybe c -> m ()
- deviceReapplyAsync :: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) => a -> Maybe b -> Word64 -> Word32 -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- deviceReapplyFinish :: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) => a -> b -> m ()
- deviceSetAutoconnect :: (HasCallStack, MonadIO m, IsDevice a) => a -> Bool -> m ()
- deviceSetManaged :: (HasCallStack, MonadIO m, IsDevice a) => a -> Bool -> m ()
- getDeviceActiveConnection :: (MonadIO m, IsDevice o) => o -> m ActiveConnection
- constructDeviceAutoconnect :: (IsDevice o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> m Bool
- setDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> Bool -> m ()
- getDeviceCapabilities :: (MonadIO m, IsDevice o) => o -> m [DeviceCapabilities]
- getDeviceDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType
- getDeviceDhcp4Config :: (MonadIO m, IsDevice o) => o -> m DhcpConfig
- getDeviceDhcp6Config :: (MonadIO m, IsDevice o) => o -> m DhcpConfig
- getDeviceDriver :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceDriverVersion :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceFirmwareMissing :: (MonadIO m, IsDevice o) => o -> m Bool
- getDeviceFirmwareVersion :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceHwAddress :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- getDeviceInterfaceFlags :: (MonadIO m, IsDevice o) => o -> m Word32
- getDeviceIp4Config :: (MonadIO m, IsDevice o) => o -> m IPConfig
- getDeviceIp4Connectivity :: (MonadIO m, IsDevice o) => o -> m ConnectivityState
- getDeviceIp6Config :: (MonadIO m, IsDevice o) => o -> m IPConfig
- getDeviceIp6Connectivity :: (MonadIO m, IsDevice o) => o -> m ConnectivityState
- getDeviceIpInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- getDeviceManaged :: (MonadIO m, IsDevice o) => o -> m Bool
- getDeviceMetered :: (MonadIO m, IsDevice o) => o -> m Word32
- getDeviceMtu :: (MonadIO m, IsDevice o) => o -> m Word32
- getDeviceNmPluginMissing :: (MonadIO m, IsDevice o) => o -> m Bool
- getDevicePath :: (MonadIO m, IsDevice o) => o -> m Text
- getDevicePhysicalPortId :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceProduct :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceReal :: (MonadIO m, IsDevice o) => o -> m Bool
- getDeviceState :: (MonadIO m, IsDevice o) => o -> m DeviceState
- getDeviceStateReason :: (MonadIO m, IsDevice o) => o -> m Word32
- getDeviceUdi :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceVendor :: (MonadIO m, IsDevice o) => o -> m Text
- type DeviceStateChangedCallback = Word32 -> Word32 -> Word32 -> IO ()
- afterDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
- onDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Constructors
Device (ManagedPtr Device) |
Instances
Eq Device Source # | |
GObject Device Source # | |
Defined in GI.NM.Objects.Device | |
ManagedPtrNewtype Device Source # | |
Defined in GI.NM.Objects.Device Methods toManagedPtr :: Device -> ManagedPtr Device # | |
TypedObject Device Source # | |
Defined in GI.NM.Objects.Device | |
HasParentTypes Device Source # | |
Defined in GI.NM.Objects.Device | |
IsGValue (Maybe Device) Source # | Convert |
Defined in GI.NM.Objects.Device | |
type ParentTypes Device Source # | |
Defined in GI.NM.Objects.Device |
class (GObject o, IsDescendantOf Device o) => IsDevice o Source #
Instances
(GObject o, IsDescendantOf Device o) => IsDevice o Source # | |
Defined in GI.NM.Objects.Device |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, connectionCompatible, connectionValid, delete, deleteAsync, deleteFinish, disconnect, disconnectAsync, disconnectFinish, filterConnections, forceFloating, freezeNotify, getv, isFloating, isReal, isSoftware, notify, notifyByPspec, reapply, reapplyAsync, reapplyFinish, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActiveConnection, getAppliedConnection, getAppliedConnectionAsync, getAppliedConnectionFinish, getAutoconnect, getAvailableConnections, getCapabilities, getClient, getConnectivity, getData, getDescription, getDeviceType, getDhcp4Config, getDhcp6Config, getDriver, getDriverVersion, getFirmwareMissing, getFirmwareVersion, getHwAddress, getIface, getInterfaceFlags, getIp4Config, getIp6Config, getIpIface, getLldpNeighbors, getManaged, getMetered, getMtu, getNmPluginMissing, getPath, getPhysicalPortId, getPorts, getProduct, getProperty, getQdata, getSettingType, getState, getStateReason, getTypeDescription, getUdi, getVendor.
Setters
setAutoconnect, setData, setDataFull, setManaged, setProperty.
connectionCompatible
deviceConnectionCompatible Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
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 |
|
-> b |
|
-> m Bool | Returns: |
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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Deprecated: (Since version 1.22)Use deviceDeleteAsync
or GDBusConnection.
Deletes the software device. Hardware devices can't be deleted.
deleteAsync
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously begins deleting the software device. Hardware devices can't be deleted.
deleteFinish
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Gets the result of a call to deviceDeleteAsync
.
disambiguateNames
deviceDisambiguateNames Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Device] |
|
-> m [Text] | Returns: the device names |
Generates a list of short-ish unique presentation names for the
devices in devices
.
disconnect
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
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 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> 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 |
|
-> b |
|
-> m () | (Can throw |
Gets the result of a call to deviceDisconnectAsync
.
filterConnections
deviceFilterConnections Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> [Connection] |
|
-> m [Connection] | Returns: an array of
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 |
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 |
|
-> m ActiveConnection | Returns: the |
Gets the ActiveConnection
object which owns this device during activation.
getAppliedConnection
deviceGetAppliedConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsCancellable b) | |
=> a |
|
-> Word32 |
|
-> Maybe b |
|
-> m (Connection, Word64) | Returns: a The connection is as received from D-Bus and might not validate according
to |
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 |
|
-> Word32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously begins and gets the currently applied connection.
Since: 1.2
getAppliedConnectionFinish
deviceGetAppliedConnectionFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (Connection, Word64) | Returns: a currently applied The connection is as received from D-Bus and might not validate according
to |
Gets the result of a call to deviceGetAppliedConnectionAsync
.
Since: 1.2
getAutoconnect
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Bool | Returns: |
Whether the Device
can be autoconnected.
getAvailableConnections
deviceGetAvailableConnections Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [RemoteConnection] | Returns: the |
Gets the NMRemoteConnections
currently known to the daemon that could
be activated on device
.
getCapabilities
deviceGetCapabilities Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [DeviceCapabilities] | Returns: the capabilities |
Gets the device' capabilities.
getConnectivity
deviceGetConnectivity Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Int32 |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: a description of |
Gets a description of device
, based on its vendor and product names.
getDeviceType
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DeviceType | Returns: the device type |
Returns the numeric type of the Device
, ie Ethernet, Wi-Fi, etc.
getDhcp4Config
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DhcpConfig | Returns: the IPv4 |
Gets the current IPv4 DhcpConfig
associated with the Device
.
You can alternatively use activeConnectionGetDhcp4Config
, which also
works with VPN connections.
getDhcp6Config
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DhcpConfig | Returns: the IPv6 |
Gets the current IPv6 DhcpConfig
associated with the Device
.
You can alternatively use activeConnectionGetDhcp6Config
, which also
works with VPN connections.
getDriver
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
|
-> 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 |
|
-> m Bool | Returns: |
Indicates that firmware required for the device's operation is likely to be missing.
getFirmwareVersion
deviceGetFirmwareVersion Source #
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: the current MAC of the device, or |
Gets the current a hardware address (MAC) for the device
.
getIface
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
|
-> m [DeviceInterfaceFlags] | Returns: the flags |
Gets the interface flags of the device.
Since: 1.22
getIp4Config
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m IPConfig | Returns: the IPv4 |
Gets the current IPv4 IPConfig
associated with the Device
.
You can alternatively use activeConnectionGetIp4Config
, which also
works with VPN connections.
getIp6Config
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m IPConfig | Returns: the IPv6 |
Gets the current IPv6 IPConfig
associated with the Device
.
You can alternatively use activeConnectionGetIp6Config
, which also
works with VPN connections.
getIpIface
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
|
-> m [LldpNeighbor] | Returns: the |
Gets the list of neighbors discovered through LLDP.
Since: 1.2
getManaged
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Bool | Returns: |
Whether the Device
is managed by NetworkManager.
getMetered
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Metered | Returns: the metered setting. |
Gets the metered setting of a Device
.
Since: 1.2
getMtu
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
|
-> m Bool | Returns: |
Indicates that the NetworkManager plugin for the device is not installed.
Since: 1.2
getPath
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: the path of the device. The string is backslash escaped (C escaping) for invalid characters. The escaping
can be reverted with |
Gets the path of the Device
as exposed by the udev property ID_PATH.
Since: 1.26
getPhysicalPortId
getPorts
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [Device] | Returns: the |
Gets the devices currently set as port of device
.
Since: 1.34
getProduct
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
Gets the product string of the Device
.
getSettingType
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m GType | Returns: |
Gets the (primary) Setting
subtype associated with connections
that can be used on device
.
getState
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DeviceState | Returns: the current device state |
Gets the current Device
state.
getStateReason
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> 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 |
Gets the vendor string of the Device
.
isReal
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Bool | Returns: |
No description available in the introspection data.
Since: 1.2
isSoftware
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Bool | Returns: |
Whether the device is a software device.
reapply
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> Word64 |
|
-> Word32 |
|
-> Maybe c |
|
-> m () | (Can throw |
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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsConnection b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> Word64 |
|
-> Word32 |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Gets the result of a call to deviceReapplyAsync
.
Since: 1.2
setAutoconnect
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Bool |
|
-> 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
Arguments
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Bool |
|
-> 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 |
|
-> Word32 |
|
-> Word32 |
|
-> 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