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

Description

No description available in the introspection data.

Synopsis

Exported types

newtype DeviceWifi Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf DeviceWifi o) => IsDeviceWifi o Source #

Type class for types which can be safely cast to DeviceWifi, for instance with toDeviceWifi.

Instances

Instances details
(GObject o, IsDescendantOf DeviceWifi o) => IsDeviceWifi o Source # 
Instance details

Defined in GI.NM.Objects.DeviceWifi

toDeviceWifi :: (MonadIO m, IsDeviceWifi o) => o -> m DeviceWifi Source #

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

Methods

getAccessPointByPath

deviceWifiGetAccessPointByPath Source #

Arguments

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

device: a DeviceWifi

-> Text

path: the object path of the access point

-> m AccessPoint

Returns: the access point or Nothing if none is found.

Gets a AccessPoint by path.

getAccessPoints

deviceWifiGetAccessPoints Source #

Arguments

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

device: a DeviceWifi

-> m [AccessPoint]

Returns: a PtrArray containing all the scanned NMAccessPoints. The returned array is owned by the client and should not be modified.

Gets all the scanned access points of the DeviceWifi.

getActiveAccessPoint

deviceWifiGetActiveAccessPoint Source #

Arguments

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

device: a DeviceWifi

-> m AccessPoint

Returns: the access point or Nothing if none is active

Gets the active AccessPoint.

getBitrate

deviceWifiGetBitrate Source #

Arguments

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

device: a DeviceWifi

-> m Word32

Returns: the bit rate (kbit/s)

Gets the bit rate of the DeviceWifi in kbit/s.

getCapabilities

deviceWifiGetCapabilities Source #

Arguments

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

device: a DeviceWifi

-> m [DeviceWifiCapabilities]

Returns: the capabilities

Gets the Wi-Fi capabilities of the DeviceWifi.

getLastScan

deviceWifiGetLastScan Source #

Arguments

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

device: a DeviceWifi

-> m Int64

Returns: the last scan time in milliseconds (in clock_gettime(CLOCK_BOOTTIME) scale).

Returns the timestamp (in CLOCK_BOOTTIME milliseconds) for the last finished network scan. A value of -1 means the device never scanned for access points.

Use utilsGetTimestampMsec to obtain current time value suitable for comparing to this value.

Since: 1.12

getMode

deviceWifiGetMode Source #

Arguments

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

device: a DeviceWifi

-> m NM80211Mode

Returns: the mode

Gets the DeviceWifi mode.

getPermanentHwAddress

deviceWifiGetPermanentHwAddress Source #

Arguments

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

device: a DeviceWifi

-> m Text

Returns: the permanent hardware address. This is the internal string used by the device, and must not be modified.

Gets the permanent hardware (MAC) address of the DeviceWifi

requestScan

deviceWifiRequestScan Source #

Arguments

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

device: a DeviceWifi

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

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

Request NM to scan for access points on device. Note that the function returns immediately after requesting the scan, and it may take some time after that for the scan to complete.

requestScanAsync

deviceWifiRequestScanAsync Source #

Arguments

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

device: a DeviceWifi

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the scan has been requested

-> m () 

Request NM to scan for access points on device. Note that callback will be called immediately after requesting the scan, and it may take some time after that for the scan to complete.

requestScanFinish

deviceWifiRequestScanFinish Source #

Arguments

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

device: a DeviceWifi

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

requestScanOptions

deviceWifiRequestScanOptions Source #

Arguments

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

device: a DeviceWifi

-> GVariant

options: dictionary with options for RequestScan(), or Nothing

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

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

Request NM to scan for access points on device. Note that the function returns immediately after requesting the scan, and it may take some time after that for the scan to complete. This is the same as nmDeviceWifiRequestScan except it accepts options for the scanning. The argument is the dictionary passed to RequestScan() D-Bus call. Valid options inside the dictionary are: 'ssids' => array of SSIDs (saay)

Since: 1.2

requestScanOptionsAsync

deviceWifiRequestScanOptionsAsync Source #

Arguments

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

device: a DeviceWifi

-> GVariant

options: dictionary with options for RequestScan(), or Nothing

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to be called when the scan has been requested

-> m () 

Request NM to scan for access points on device. Note that callback will be called immediately after requesting the scan, and it may take some time after that for the scan to complete. This is the same as nmDeviceWifiRequestScanAsync except it accepts options for the scanning. The argument is the dictionary passed to RequestScan() D-Bus call. Valid options inside the dictionary are: 'ssids' => array of SSIDs (saay)

To complete the request call deviceWifiRequestScanFinish.

Since: 1.2

Properties

accessPoints

activeAccessPoint

The active AccessPoint of the device.

getDeviceWifiActiveAccessPoint :: (MonadIO m, IsDeviceWifi o) => o -> m AccessPoint Source #

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

get deviceWifi #activeAccessPoint

bitrate

The bit rate of the device in kbit/s.

getDeviceWifiBitrate :: (MonadIO m, IsDeviceWifi o) => o -> m Word32 Source #

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

get deviceWifi #bitrate

lastScan

The timestamp (in CLOCK_BOOTTIME seconds) for the last finished network scan. A value of -1 means the device never scanned for access points.

Since: 1.12

getDeviceWifiLastScan :: (MonadIO m, IsDeviceWifi o) => o -> m Int64 Source #

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

get deviceWifi #lastScan

mode

The mode of the device.

getDeviceWifiMode :: (MonadIO m, IsDeviceWifi o) => o -> m NM80211Mode Source #

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

get deviceWifi #mode

permHwAddress

The hardware (MAC) address of the device.

getDeviceWifiPermHwAddress :: (MonadIO m, IsDeviceWifi o) => o -> m (Maybe Text) Source #

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

get deviceWifi #permHwAddress

wirelessCapabilities

The wireless capabilities of the device.

getDeviceWifiWirelessCapabilities :: (MonadIO m, IsDeviceWifi o) => o -> m [DeviceWifiCapabilities] Source #

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

get deviceWifi #wirelessCapabilities

Signals

accessPointAdded

type DeviceWifiAccessPointAddedCallback Source #

Arguments

 = Object

ap: the new access point

-> IO () 

Notifies that a AccessPoint is added to the Wi-Fi device.

afterDeviceWifiAccessPointAdded :: (IsDeviceWifi a, MonadIO m) => a -> ((?self :: a) => DeviceWifiAccessPointAddedCallback) -> m SignalHandlerId Source #

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

after deviceWifi #accessPointAdded 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.

onDeviceWifiAccessPointAdded :: (IsDeviceWifi a, MonadIO m) => a -> ((?self :: a) => DeviceWifiAccessPointAddedCallback) -> m SignalHandlerId Source #

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

on deviceWifi #accessPointAdded callback

accessPointRemoved

type DeviceWifiAccessPointRemovedCallback Source #

Arguments

 = Object

ap: the removed access point

-> IO () 

Notifies that a AccessPoint is removed from the Wi-Fi device.

afterDeviceWifiAccessPointRemoved :: (IsDeviceWifi a, MonadIO m) => a -> ((?self :: a) => DeviceWifiAccessPointRemovedCallback) -> m SignalHandlerId Source #

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

after deviceWifi #accessPointRemoved 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.

onDeviceWifiAccessPointRemoved :: (IsDeviceWifi a, MonadIO m) => a -> ((?self :: a) => DeviceWifiAccessPointRemovedCallback) -> m SignalHandlerId Source #

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

on deviceWifi #accessPointRemoved callback