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

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Setting Source #

Memory-managed wrapper type.

Constructors

Setting (ManagedPtr Setting) 

Instances

Instances details
Eq Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

Methods

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

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

GObject Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

ManagedPtrNewtype Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

TypedObject Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

Methods

glibType :: IO GType #

HasParentTypes Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

IsGValue (Maybe Setting) Source #

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

Instance details

Defined in GI.NM.Objects.Setting

type ParentTypes Setting Source # 
Instance details

Defined in GI.NM.Objects.Setting

class (GObject o, IsDescendantOf Setting o) => IsSetting o Source #

Type class for types which can be safely cast to Setting, for instance with toSetting.

Instances

Instances details
(GObject o, IsDescendantOf Setting o) => IsSetting o Source # 
Instance details

Defined in GI.NM.Objects.Setting

toSetting :: (MonadIO m, IsSetting o) => o -> m Setting Source #

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

Methods

compare

settingCompare Source #

Arguments

:: (HasCallStack, MonadIO m, IsSetting a, IsSetting b) 
=> a

a: a Setting

-> b

b: a second Setting to compare with the first

-> SettingCompareFlags

flags: compare flags, e.g. SettingCompareFlagsExact

-> m Bool

Returns: True if the comparison succeeds, False if it does not

Compares two Setting objects for similarity, with comparison behavior modified by a set of flags. See the documentation for SettingCompareFlags for a description of each flag's behavior.

duplicate

settingDuplicate Source #

Arguments

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

setting: the Setting to duplicate

-> m Setting

Returns: a new Setting containing the same properties and values as the source Setting

Duplicates a Setting.

enumerateValues

settingEnumerateValues Source #

Arguments

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

setting: the Setting

-> SettingValueIterFn

func: user-supplied function called for each property of the setting

-> m () 

Iterates over each property of the Setting object, calling the supplied user function for each property.

getDbusPropertyType

settingGetDbusPropertyType Source #

Arguments

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

setting: an Setting

-> Text

propertyName: the property of setting to get the type of

-> m VariantType

Returns: the D-Bus marshalling type of property on setting.

Gets the D-Bus marshalling type of a property. propertyName is a D-Bus property name, which may not necessarily be a Object property.

getEnumPropertyType

settingGetEnumPropertyType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

settingType: the GType of the NMSetting instance

-> Text

propertyName: the name of the property

-> m GType

Returns: the enum's GType, or G_TYPE_INVALID if the property is not of enum type

Get the type of the enum that defines the values that the property accepts. It is only useful for properties configured to accept values from certain enum type, otherwise it will return G_TYPE_INVALID. Note that flags (children of G_TYPE_FLAGS) are also considered enums.

Note that the GObject property might be implemented as an integer, actually, and not as enum. Find out what underlying type is used, checking the ParamSpec, before setting the GObject property.

Since: 1.46

getName

settingGetName Source #

Arguments

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

setting: the Setting

-> m Text

Returns: a string containing the type name of the Setting object, like 'ppp' or 'wireless' or 'wired'.

Returns the type name of the Setting object

getSecretFlags

settingGetSecretFlags Source #

Arguments

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

setting: the Setting

-> Text

secretName: the secret key name to get flags for

-> [SettingSecretFlags]

outFlags: on success, the SettingSecretFlags for the secret

-> m ()

(Can throw GError)

For a given secret, retrieves the SettingSecretFlags describing how to handle that secret.

lookupType

settingLookupType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: a setting name

-> m GType

Returns: the GType of the setting's class, or G_TYPE_INVALID if name is not recognized.

Returns the GType of the setting's class for a given setting name.

optionClearByName

settingOptionClearByName Source #

Arguments

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

setting: the Setting

-> Maybe UtilsPredicateStr

predicate: the predicate for which names should be clear. If the predicate returns True for an option name, the option gets removed. If Nothing, all options will be removed.

-> m () 

No description available in the introspection data.

Since: 1.26

optionGet

settingOptionGet Source #

Arguments

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

setting: the Setting

-> Text

optName: the option name to request.

-> m GVariant

Returns: the GVariant or Nothing if the option is not set.

No description available in the introspection data.

Since: 1.26

optionGetAllNames

settingOptionGetAllNames Source #

Arguments

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

setting: the Setting

-> m (Maybe [Text], Word32)

Returns: A Nothing terminated array of key names. If no names are present, this returns Nothing. The returned array and the names are owned by NMSetting and might be invalidated by the next operation.

Gives the name of all set options.

Since: 1.26

optionGetBoolean

settingOptionGetBoolean Source #

Arguments

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

setting: the Setting

-> Text

optName: the option to get

-> m (Bool, Bool)

Returns: True if optName is set to a boolean variant.

No description available in the introspection data.

Since: 1.26

optionGetUint32

settingOptionGetUint32 Source #

Arguments

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

setting: the Setting

-> Text

optName: the option to get

-> m (Bool, Word32)

Returns: True if optName is set to a uint32 variant.

No description available in the introspection data.

Since: 1.26

optionSet

settingOptionSet Source #

Arguments

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

setting: the Setting

-> Text

optName: the option name to set

-> Maybe GVariant

variant: the variant to set.

-> m () 

If variant is Nothing, this clears the option if it is set. Otherwise, variant is set as the option. If variant is a floating reference, it will be consumed.

Note that not all setting types support options. It is a bug setting a variant to a setting that doesn't support it. Currently, only SettingEthtool supports it.

Since: 1.26

optionSetBoolean

settingOptionSetBoolean Source #

Arguments

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

setting: the Setting

-> Text 
-> Bool

value: the value to set.

-> m () 

Like settingOptionSet to set a boolean GVariant.

Since: 1.26

optionSetUint32

settingOptionSetUint32 Source #

Arguments

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

setting: the Setting

-> Text 
-> Word32

value: the value to set.

-> m () 

Like settingOptionSet to set a uint32 GVariant.

Since: 1.26

setSecretFlags

settingSetSecretFlags Source #

Arguments

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

setting: the Setting

-> Text

secretName: the secret key name to set flags for

-> [SettingSecretFlags]

flags: the SettingSecretFlags for the secret

-> m ()

(Can throw GError)

For a given secret, stores the SettingSecretFlags describing how to handle that secret.

toString

settingToString Source #

Arguments

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

setting: the Setting

-> m Text

Returns: an allocated string containing a textual representation of the setting's properties and values, which the caller should free with free

Convert the setting (including secrets!) into a string. For debugging purposes ONLY, should NOT be used for serialization of the setting, or machine-parsed in any way. The output format is not guaranteed to be stable and may change at any time.

verify

settingVerify Source #

Arguments

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

setting: the Setting to verify

-> Maybe b

connection: the Connection that setting came from, or Nothing if setting is being verified in isolation.

-> m ()

(Can throw GError)

Validates the setting. Each setting's properties have allowed values, and some are dependent on other values (hence the need for connection). The returned GError contains information about which property of the setting failed validation, and in what way that property failed validation.

verifySecrets

settingVerifySecrets Source #

Arguments

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

setting: the Setting to verify secrets in

-> Maybe b

connection: the Connection that setting came from, or Nothing if setting is being verified in isolation.

-> m ()

(Can throw GError)

Verifies the secrets in the setting. The returned GError contains information about which secret of the setting failed validation, and in what way that secret failed validation. The secret validation is done separately from main setting validation, because in some cases connection failure is not desired just for the secrets.

Since: 1.2

Properties

name

The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "802-11-wireless" or "802-3-ethernet".

getSettingName :: (MonadIO m, IsSetting o) => o -> m Text Source #

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

get setting #name