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.Setting
Contents
Description
No description available in the introspection data.
Synopsis
- newtype Setting = Setting (ManagedPtr Setting)
- class (GObject o, IsDescendantOf Setting o) => IsSetting o
- toSetting :: (MonadIO m, IsSetting o) => o -> m Setting
- settingCompare :: (HasCallStack, MonadIO m, IsSetting a, IsSetting b) => a -> b -> SettingCompareFlags -> m Bool
- settingDuplicate :: (HasCallStack, MonadIO m, IsSetting a) => a -> m Setting
- settingEnumerateValues :: (HasCallStack, MonadIO m, IsSetting a) => a -> SettingValueIterFn -> m ()
- settingGetDbusPropertyType :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> m VariantType
- settingGetEnumPropertyType :: (HasCallStack, MonadIO m) => GType -> Text -> m GType
- settingGetName :: (HasCallStack, MonadIO m, IsSetting a) => a -> m Text
- settingGetSecretFlags :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> [SettingSecretFlags] -> m ()
- settingLookupType :: (HasCallStack, MonadIO m) => Text -> m GType
- settingOptionClearByName :: (HasCallStack, MonadIO m, IsSetting a) => a -> Maybe UtilsPredicateStr -> m ()
- settingOptionGet :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> m GVariant
- settingOptionGetAllNames :: (HasCallStack, MonadIO m, IsSetting a) => a -> m (Maybe [Text], Word32)
- settingOptionGetBoolean :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> m (Bool, Bool)
- settingOptionGetUint32 :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> m (Bool, Word32)
- settingOptionSet :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> Maybe GVariant -> m ()
- settingOptionSetBoolean :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> Bool -> m ()
- settingOptionSetUint32 :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> Word32 -> m ()
- settingSetSecretFlags :: (HasCallStack, MonadIO m, IsSetting a) => a -> Text -> [SettingSecretFlags] -> m ()
- settingToString :: (HasCallStack, MonadIO m, IsSetting a) => a -> m Text
- settingVerify :: (HasCallStack, MonadIO m, IsSetting a, IsConnection b) => a -> Maybe b -> m ()
- settingVerifySecrets :: (HasCallStack, MonadIO m, IsSetting a, IsConnection b) => a -> Maybe b -> m ()
- getSettingName :: (MonadIO m, IsSetting o) => o -> m Text
Exported types
Memory-managed wrapper type.
Constructors
Setting (ManagedPtr Setting) |
Instances
Eq Setting Source # | |
GObject Setting Source # | |
Defined in GI.NM.Objects.Setting | |
ManagedPtrNewtype Setting Source # | |
Defined in GI.NM.Objects.Setting Methods toManagedPtr :: Setting -> ManagedPtr Setting # | |
TypedObject Setting Source # | |
Defined in GI.NM.Objects.Setting | |
HasParentTypes Setting Source # | |
Defined in GI.NM.Objects.Setting | |
IsGValue (Maybe Setting) Source # | Convert |
Defined in GI.NM.Objects.Setting | |
type ParentTypes Setting Source # | |
Defined in GI.NM.Objects.Setting |
class (GObject o, IsDescendantOf Setting o) => IsSetting o Source #
Instances
(GObject o, IsDescendantOf Setting o) => IsSetting o Source # | |
Defined in GI.NM.Objects.Setting |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, compare, diff, duplicate, enumerateValues, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, optionClearByName, optionGet, optionGetAllNames, optionGetBoolean, optionGetUint32, optionSet, optionSetBoolean, optionSetUint32, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toString, unref, verify, verifySecrets, watchClosure.
Getters
getData, getDbusPropertyType, getName, getProperty, getQdata, getSecretFlags.
Setters
compare
Arguments
:: (HasCallStack, MonadIO m, IsSetting a, IsSetting b) | |
=> a |
|
-> b |
|
-> SettingCompareFlags |
|
-> m Bool | Returns: |
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
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> m Setting | Returns: a new |
Duplicates a Setting
.
enumerateValues
settingEnumerateValues Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> SettingValueIterFn |
|
-> 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 |
|
-> Text |
|
-> m VariantType | Returns: the D-Bus marshalling type of |
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 |
|
-> Text |
|
-> m GType | Returns: the enum's GType, or |
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
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> m Text | Returns: a string containing the type name of the |
Returns the type name of the Setting
object
getSecretFlags
settingGetSecretFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> [SettingSecretFlags] |
|
-> m () | (Can throw |
For a given secret, retrieves the SettingSecretFlags
describing how to
handle that secret.
lookupType
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m GType | Returns: the |
Returns the GType
of the setting's class for a given setting name.
optionClearByName
settingOptionClearByName Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Maybe UtilsPredicateStr |
|
-> m () |
No description available in the introspection data.
Since: 1.26
optionGet
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> m GVariant |
No description available in the introspection data.
Since: 1.26
optionGetAllNames
settingOptionGetAllNames Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> m (Maybe [Text], Word32) | Returns:
A |
Gives the name of all set options.
Since: 1.26
optionGetBoolean
settingOptionGetBoolean Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> m (Bool, Bool) | Returns: |
No description available in the introspection data.
Since: 1.26
optionGetUint32
settingOptionGetUint32 Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> m (Bool, Word32) | Returns: |
No description available in the introspection data.
Since: 1.26
optionSet
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> 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 |
|
-> Text | |
-> Bool |
|
-> m () |
Like settingOptionSet
to set a boolean GVariant.
Since: 1.26
optionSetUint32
settingOptionSetUint32 Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text | |
-> Word32 |
|
-> m () |
Like settingOptionSet
to set a uint32 GVariant.
Since: 1.26
setSecretFlags
settingSetSecretFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> Text |
|
-> [SettingSecretFlags] |
|
-> m () | (Can throw |
For a given secret, stores the SettingSecretFlags
describing how to
handle that secret.
toString
Arguments
:: (HasCallStack, MonadIO m, IsSetting a) | |
=> a |
|
-> m Text | Returns: an allocated string containing a textual representation of the
setting's properties and values, which the caller should
free with |
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
Arguments
:: (HasCallStack, MonadIO m, IsSetting a, IsConnection b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
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
Arguments
:: (HasCallStack, MonadIO m, IsSetting a, IsConnection b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
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