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

Description

Bonding Settings

Synopsis

Exported types

newtype SettingBond Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf SettingBond o) => IsSettingBond o Source #

Type class for types which can be safely cast to SettingBond, for instance with toSettingBond.

Instances

Instances details
(GObject o, IsDescendantOf SettingBond o) => IsSettingBond o Source # 
Instance details

Defined in GI.NM.Objects.SettingBond

toSettingBond :: (MonadIO m, IsSettingBond o) => o -> m SettingBond Source #

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

Methods

addOption

settingBondAddOption Source #

Arguments

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

setting: the SettingBond

-> Text

name: name for the option

-> Text

value: value for the option

-> m Bool

Returns: returns False if either name or value is Nothing, in that case the option is not set. Otherwise, the function does not fail and does not validate the arguments. All validation happens via connectionVerify or do basic validation yourself with settingBondValidateOption.

Note: Before 1.30, libnm would perform basic validation of the name and the value via settingBondValidateOption and reject the request by returning FALSE. Since 1.30, libnm no longer rejects any values as the setter is not supposed to perform validation.

Add an option to the table. Adding a new name replaces any existing name/value pair that may already exist.

getNumOptions

settingBondGetNumOptions Source #

Arguments

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

setting: the SettingBond

-> m Word32

Returns: the number of bonding options

Returns the number of options that should be set for this bond when it is activated. This can be used to retrieve each option individually using settingBondGetOption.

getOption

settingBondGetOption Source #

Arguments

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

setting: the SettingBond

-> Word32

idx: index of the desired option, from 0 to settingBondGetNumOptions - 1

-> m (Bool, Text, Text)

Returns: True on success if the index was valid and an option was found, False if the index was invalid (ie, greater than the number of options currently held by the setting)

Given an index, return the value of the bonding option at that index. Indexes are *not* guaranteed to be static across modifications to options done by settingBondAddOption and settingBondRemoveOption, and should not be used to refer to options except for short periods of time such as during option iteration.

getOptionByName

settingBondGetOptionByName Source #

Arguments

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

setting: the SettingBond

-> Text

name: the option name for which to retrieve the value

-> m Text

Returns: the value, or Nothing if the key/value pair was never added to the setting; the value is owned by the setting and must not be modified

Returns the value associated with the bonding option specified by name, if it exists.

getOptionDefault

settingBondGetOptionDefault Source #

Arguments

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

setting: the SettingBond

-> Text

name: the name of the option

-> m Text

Returns: the value of the bond option if not overridden by an entry in the SettingBond:options property.

No description available in the introspection data.

getOptionNormalized

settingBondGetOptionNormalized Source #

Arguments

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

setting: the SettingBond

-> Text

name: the name of the option

-> m Text

Returns: the value of the bond option after normalization, which is what NetworkManager will actually apply when activating the connection. Nothing if the option won't be applied to the connection.

No description available in the introspection data.

Since: 1.24

getValidOptions

settingBondGetValidOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsSettingBond a) 
=> Maybe a

setting: the SettingBond

-> m (Maybe [Text])

Returns: a Nothing-terminated array of strings of valid bond options.

Returns a list of valid bond options.

The setting argument is unused and may be passed as Nothing.

new

settingBondNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m SettingBond

Returns: the new empty SettingBond object

Creates a new SettingBond object with default values.

removeOption

settingBondRemoveOption Source #

Arguments

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

setting: the SettingBond

-> Text

name: name of the option to remove

-> m Bool

Returns: True if the option was found and removed from the internal option list, False if it was not.

Remove the bonding option referenced by name from the internal option list.

validateOption

settingBondValidateOption Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the name of the option to validate

-> Maybe Text

value: the value of the option to validate.

-> m Bool

Returns: True, if the value is valid for the given name. If the name is not a valid option, False will be returned.

Checks whether name is a valid bond option and value is a valid value for the name. If value is Nothing, the function only validates the option name.

Properties

options

Dictionary of key/value pairs of bonding options. Both keys and values must be strings. Option names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).

clearSettingBondOptions :: (MonadIO m, IsSettingBond o) => o -> m () Source #

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

clear #options

constructSettingBondOptions :: (IsSettingBond o, MonadIO m) => Map Text Text -> m (GValueConstruct o) Source #

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

getSettingBondOptions :: (MonadIO m, IsSettingBond o) => o -> m (Maybe (Map Text Text)) Source #

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

get settingBond #options

setSettingBondOptions :: (MonadIO m, IsSettingBond o) => o -> Map Text Text -> m () Source #

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

set settingBond [ #options := value ]