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

Description

Match settings

Since: 1.14

Synopsis

Exported types

class (GObject o, IsDescendantOf SettingMatch o) => IsSettingMatch o Source #

Type class for types which can be safely cast to SettingMatch, for instance with toSettingMatch.

Instances

Instances details
(GObject o, IsDescendantOf SettingMatch o) => IsSettingMatch o Source # 
Instance details

Defined in GI.NM.Objects.SettingMatch

toSettingMatch :: (MonadIO m, IsSettingMatch o) => o -> m SettingMatch Source #

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

Methods

addDriver

settingMatchAddDriver Source #

Arguments

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

setting: the SettingMatch

-> Text

driver: the driver to add

-> m () 

Adds a new driver to the setting.

Since: 1.26

addInterfaceName

settingMatchAddInterfaceName Source #

Arguments

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

setting: the SettingMatch

-> Text

interfaceName: the interface name to add

-> m () 

Adds a new interface name to the setting.

Since: 1.14

addKernelCommandLine

settingMatchAddKernelCommandLine Source #

Arguments

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

setting: the SettingMatch

-> Text

kernelCommandLine: the kernel command line argument to add

-> m () 

Adds a new kernel command line argument to the setting.

Since: 1.26

addPath

settingMatchAddPath Source #

Arguments

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

setting: the SettingMatch

-> Text

path: the path to add

-> m () 

Adds a new path to the setting.

Since: 1.26

clearDrivers

settingMatchClearDrivers Source #

Arguments

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

setting: the SettingMatch

-> m () 

Removes all configured drivers.

Since: 1.26

clearInterfaceNames

settingMatchClearInterfaceNames Source #

Arguments

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

setting: the SettingMatch

-> m () 

Removes all configured interface names.

Since: 1.14

clearKernelCommandLines

settingMatchClearKernelCommandLines Source #

Arguments

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

setting: the SettingMatch

-> m () 

Removes all configured kernel command line arguments.

Since: 1.26

clearPaths

settingMatchClearPaths Source #

Arguments

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

setting: the SettingMatch

-> m () 

Removes all configured paths.

Since: 1.26

getDriver

settingMatchGetDriver Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the DNS search domain to return

-> m Text

Returns: the driver at index idx

Since 1.46, access at index "len" is allowed and returns NULL.

Since: 1.26

getDrivers

settingMatchGetDrivers Source #

Arguments

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

setting: the SettingMatch

-> m [Text]

Returns: the configured drivers.

Returns all the drivers.

Since: 1.26

getInterfaceName

settingMatchGetInterfaceName Source #

Arguments

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

setting: the SettingMatch

-> Int32

idx: index number of the DNS search domain to return

-> m Text

Returns: the interface name at index idx

Since 1.46, access at index "len" is allowed and returns NULL.

Since: 1.14

getInterfaceNames

settingMatchGetInterfaceNames Source #

Arguments

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

setting: the SettingMatch

-> m [Text]

Returns: the NULL terminated list of configured interface names.

Before 1.26, the returned array was not Nothing terminated and you MUST provide a length.

Returns all the interface names.

Since: 1.14

getKernelCommandLine

settingMatchGetKernelCommandLine Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the kernel command line argument to return

-> m Text

Returns: the kernel command line argument at index idx

Since 1.46, access at index "len" is allowed and returns NULL.

Since: 1.26

getKernelCommandLines

settingMatchGetKernelCommandLines Source #

Arguments

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

setting: the SettingMatch

-> m [Text]

Returns: the configured interface names.

Returns all the interface names.

Since: 1.26

getNumDrivers

settingMatchGetNumDrivers Source #

Arguments

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

setting: the SettingMatch

-> m Word32

Returns: the number of configured drivers

No description available in the introspection data.

Since: 1.26

getNumInterfaceNames

settingMatchGetNumInterfaceNames Source #

Arguments

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

setting: the SettingMatch

-> m Word32

Returns: the number of configured interface names

No description available in the introspection data.

Since: 1.14

getNumKernelCommandLines

settingMatchGetNumKernelCommandLines Source #

Arguments

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

setting: the SettingMatch

-> m Word32

Returns: the number of configured kernel command line arguments

No description available in the introspection data.

Since: 1.26

getNumPaths

settingMatchGetNumPaths Source #

Arguments

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

setting: the SettingMatch

-> m Word32

Returns: the number of configured paths

No description available in the introspection data.

Since: 1.26

getPath

settingMatchGetPath Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the path to return

-> m Text

Returns: the path at index idx

Since 1.46, access at index "len" is allowed and returns NULL.

Since: 1.26

getPaths

settingMatchGetPaths Source #

Arguments

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

setting: the SettingMatch

-> m [Text]

Returns: the configured paths.

Returns all the paths.

Since: 1.26

new

settingMatchNew Source #

Arguments

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

Returns: the new empty SettingMatch object

Note that this function was present in header files since version 1.14. But due to a bug the symbol is only exposed and usable since version 1.32. As workaround, use g_object_new(NM_TYPE_SETTING_MATCH) which works with all versions since 1.14.

Creates a new SettingMatch object with default values.

Since: 1.32

removeDriver

settingMatchRemoveDriver Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the driver

-> m () 

Removes the driver at index idx.

Since: 1.26

removeDriverByValue

settingMatchRemoveDriverByValue Source #

Arguments

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

setting: the SettingMatch

-> Text

driver: the driver to remove

-> m Bool

Returns: True if the driver was found and removed; False if it was not.

Removes driver.

Since: 1.26

removeInterfaceName

settingMatchRemoveInterfaceName Source #

Arguments

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

setting: the SettingMatch

-> Int32

idx: index number of the interface name

-> m () 

Removes the interface name at index idx.

Since: 1.14

removeInterfaceNameByValue

settingMatchRemoveInterfaceNameByValue Source #

Arguments

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

setting: the SettingMatch

-> Text

interfaceName: the interface name to remove

-> m Bool

Returns: True if the interface name was found and removed; False if it was not.

Removes interfaceName.

Since: 1.14

removeKernelCommandLine

settingMatchRemoveKernelCommandLine Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the kernel command line argument

-> m () 

Removes the kernel command line argument at index idx.

Since: 1.26

removeKernelCommandLineByValue

settingMatchRemoveKernelCommandLineByValue Source #

Arguments

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

setting: the SettingMatch

-> Text

kernelCommandLine: the kernel command line argument name to remove

-> m Bool

Returns: True if the kernel command line argument was found and removed; False if it was not.

Removes kernelCommandLine.

Since: 1.26

removePath

settingMatchRemovePath Source #

Arguments

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

setting: the SettingMatch

-> Word32

idx: index number of the path

-> m () 

Removes the path at index idx.

Since: 1.26

removePathByValue

settingMatchRemovePathByValue Source #

Arguments

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

setting: the SettingMatch

-> Text

path: the path to remove

-> m Bool

Returns: True if the path was found and removed; False if it was not.

Removes path.

Since: 1.26

Properties

driver

A list of driver names to match. Each element is a shell wildcard pattern.

See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\' are used for optional and mandatory matches and inverting the pattern.

Since: 1.26

clearSettingMatchDriver :: (MonadIO m, IsSettingMatch o) => o -> m () Source #

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

clear #driver

constructSettingMatchDriver :: (IsSettingMatch o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

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

getSettingMatchDriver :: (MonadIO m, IsSettingMatch o) => o -> m (Maybe [Text]) Source #

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

get settingMatch #driver

setSettingMatchDriver :: (MonadIO m, IsSettingMatch o) => o -> [Text] -> m () Source #

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

set settingMatch [ #driver := value ]

interfaceName

A list of interface names to match. Each element is a shell wildcard pattern.

An element can be prefixed with a pipe symbol (|) or an ampersand (&). The former means that the element is optional and the latter means that it is mandatory. If there are any optional elements, than the match evaluates to true if at least one of the optional element matches (logical OR). If there are any mandatory elements, then they all must match (logical AND). By default, an element is optional. This means that an element "foo" behaves the same as "|foo". An element can also be inverted with exclamation mark (!) between the pipe symbol (or the ampersand) and before the pattern. Note that "!foo" is a shortcut for the mandatory match "&!foo". Finally, a backslash can be used at the beginning of the element (after the optional special characters) to escape the start of the pattern. For example, "&\!a" is an mandatory match for literally "!a".

Since: 1.14

clearSettingMatchInterfaceName :: (MonadIO m, IsSettingMatch o) => o -> m () Source #

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

clear #interfaceName

constructSettingMatchInterfaceName :: (IsSettingMatch o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

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

getSettingMatchInterfaceName :: (MonadIO m, IsSettingMatch o) => o -> m (Maybe [Text]) Source #

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

get settingMatch #interfaceName

setSettingMatchInterfaceName :: (MonadIO m, IsSettingMatch o) => o -> [Text] -> m () Source #

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

set settingMatch [ #interfaceName := value ]

kernelCommandLine

A list of kernel command line arguments to match. This may be used to check whether a specific kernel command line option is set (or unset, if prefixed with the exclamation mark). The argument must either be a single word, or an assignment (i.e. two words, joined by "="). In the former case the kernel command line is searched for the word appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is looked for with right and left hand side matching. Wildcard patterns are not supported.

See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\' are used for optional and mandatory matches and inverting the match.

Since: 1.26

clearSettingMatchKernelCommandLine :: (MonadIO m, IsSettingMatch o) => o -> m () Source #

Set the value of the “kernel-command-line” property to Nothing. When overloading is enabled, this is equivalent to

clear #kernelCommandLine

constructSettingMatchKernelCommandLine :: (IsSettingMatch o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

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

getSettingMatchKernelCommandLine :: (MonadIO m, IsSettingMatch o) => o -> m (Maybe [Text]) Source #

Get the value of the “kernel-command-line” property. When overloading is enabled, this is equivalent to

get settingMatch #kernelCommandLine

setSettingMatchKernelCommandLine :: (MonadIO m, IsSettingMatch o) => o -> [Text] -> m () Source #

Set the value of the “kernel-command-line” property. When overloading is enabled, this is equivalent to

set settingMatch [ #kernelCommandLine := value ]

path

A list of paths to match against the ID_PATH udev property of devices. ID_PATH represents the topological persistent path of a device. It typically contains a subsystem string (pci, usb, platform, etc.) and a subsystem-specific identifier.

For PCI devices the path has the form "pci-$domain:$bus:$device.$function", where each variable is an hexadecimal value; for example "pci-0000:0a:00.0".

The path of a device can be obtained with "udevadm info /sys/class/net/$dev | grep ID_PATH=" or by looking at the "path" property exported by NetworkManager ("nmcli -f general.path device show $dev").

Each element of the list is a shell wildcard pattern.

See NMSettingMatch:interface-name for how special characters '|', '&', '!' and '\' are used for optional and mandatory matches and inverting the pattern.

Since: 1.26

clearSettingMatchPath :: (MonadIO m, IsSettingMatch o) => o -> m () Source #

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

clear #path

constructSettingMatchPath :: (IsSettingMatch o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #

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

getSettingMatchPath :: (MonadIO m, IsSettingMatch o) => o -> m (Maybe [Text]) Source #

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

get settingMatch #path

setSettingMatchPath :: (MonadIO m, IsSettingMatch o) => o -> [Text] -> m () Source #

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

set settingMatch [ #path := value ]