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

Description

VPN Settings

Synopsis

Exported types

newtype SettingVpn Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf SettingVpn o) => IsSettingVpn o Source #

Type class for types which can be safely cast to SettingVpn, for instance with toSettingVpn.

Instances

Instances details
(GObject o, IsDescendantOf SettingVpn o) => IsSettingVpn o Source # 
Instance details

Defined in GI.NM.Objects.SettingVpn

toSettingVpn :: (MonadIO m, IsSettingVpn o) => o -> m SettingVpn Source #

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

Methods

addDataItem

settingVpnAddDataItem Source #

Arguments

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

setting: the SettingVpn

-> Text

key: a name that uniquely identifies the given value item

-> Maybe Text

item: the value to be referenced by key

-> m () 

Establishes a relationship between key and item internally in the setting which may be retrieved later. Should not be used to store passwords or other secrets, which is what settingVpnAddSecret is for.

Before 1.24, item must not be Nothing and not an empty string. Since 1.24, item can be set to an empty string. It can also be set to Nothing to unset the key. In that case, the behavior is as if calling settingVpnRemoveDataItem.

addSecret

settingVpnAddSecret Source #

Arguments

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

setting: the SettingVpn

-> Text

key: a name that uniquely identifies the given secret secret

-> Maybe Text

secret: the secret to be referenced by key

-> m () 

Establishes a relationship between key and secret internally in the setting which may be retrieved later.

Before 1.24, secret must not be Nothing and not an empty string. Since 1.24, secret can be set to an empty string. It can also be set to Nothing to unset the key. In that case, the behavior is as if calling settingVpnRemoveSecret.

foreachDataItem

settingVpnForeachDataItem Source #

Arguments

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

setting: a SettingVpn

-> VpnIterFunc

func: an user provided function

-> m () 

Iterates all data items stored in this setting. It is safe to add, remove, and modify data items inside func, though any additions or removals made during iteration will not be part of the iteration.

foreachSecret

settingVpnForeachSecret Source #

Arguments

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

setting: a SettingVpn

-> VpnIterFunc

func: an user provided function

-> m () 

Iterates all secrets stored in this setting. It is safe to add, remove, and modify secrets inside func, though any additions or removals made during iteration will not be part of the iteration.

getDataItem

settingVpnGetDataItem Source #

Arguments

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

setting: the SettingVpn

-> Text

key: the name of the data item to retrieve

-> m Text

Returns: the data item, if any

Retrieves the data item of a key/value relationship previously established by settingVpnAddDataItem.

getDataKeys

settingVpnGetDataKeys Source #

Arguments

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

setting: the SettingVpn

-> m (Maybe [Text])

Returns: a Nothing-terminated array containing each data key or Nothing if there are no data items.

Retrieves every data key inside setting, as an array.

Since: 1.12

getNumDataItems

settingVpnGetNumDataItems Source #

Arguments

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

setting: the SettingVpn

-> m Word32

Returns: the number of VPN plugin specific configuration data items

Gets number of key/value pairs of VPN configuration data.

getNumSecrets

settingVpnGetNumSecrets Source #

Arguments

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

setting: the SettingVpn

-> m Word32

Returns: the number of VPN plugin specific secrets

Gets number of VPN plugin specific secrets in the setting.

getPersistent

settingVpnGetPersistent Source #

Arguments

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

setting: the SettingVpn

-> m Bool

Returns: the SettingVpn:persistent property of the setting

No description available in the introspection data.

Since: 1.42

getSecret

settingVpnGetSecret Source #

Arguments

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

setting: the SettingVpn

-> Text

key: the name of the secret to retrieve

-> m Text

Returns: the secret, if any

Retrieves the secret of a key/value relationship previously established by settingVpnAddSecret.

getSecretKeys

settingVpnGetSecretKeys Source #

Arguments

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

setting: the SettingVpn

-> m (Maybe [Text])

Returns: a Nothing-terminated array containing each secret key or Nothing if there are no secrets.

Retrieves every secret key inside setting, as an array.

Since: 1.12

getServiceType

settingVpnGetServiceType Source #

Arguments

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

setting: the SettingVpn

-> m Text

Returns: the VPN plugin's service name

Returns the service name of the VPN, which identifies the specific VPN plugin that should be used to connect to this VPN.

getTimeout

settingVpnGetTimeout Source #

Arguments

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

setting: the SettingVpn

-> m Word32

Returns: the SettingVpn:timeout property of the setting

No description available in the introspection data.

Since: 1.2

getUserName

settingVpnGetUserName Source #

Arguments

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

setting: the SettingVpn

-> m Text

Returns: the SettingVpn:userName property of the setting

No description available in the introspection data.

new

settingVpnNew Source #

Arguments

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

Returns: the new empty SettingVpn object

Creates a new SettingVpn object with default values.

removeDataItem

settingVpnRemoveDataItem Source #

Arguments

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

setting: the SettingVpn

-> Text

key: the name of the data item to remove

-> m Bool

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

Deletes a key/value relationship previously established by settingVpnAddDataItem.

removeSecret

settingVpnRemoveSecret Source #

Arguments

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

setting: the SettingVpn

-> Text

key: the name of the secret to remove

-> m Bool

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

Deletes a key/value relationship previously established by settingVpnAddSecret.

Properties

data

Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings.

clearSettingVpnData :: (MonadIO m, IsSettingVpn o) => o -> m () Source #

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

clear #data

constructSettingVpnData :: (IsSettingVpn o, MonadIO m) => Map Text Text -> m (GValueConstruct o) Source #

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

getSettingVpnData :: (MonadIO m, IsSettingVpn o) => o -> m (Maybe (Map Text Text)) Source #

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

get settingVpn #data

setSettingVpnData :: (MonadIO m, IsSettingVpn o) => o -> Map Text Text -> m () Source #

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

set settingVpn [ #data := value ]

persistent

If the VPN service supports persistence, and this property is True, the VPN will attempt to stay connected across link changes and outages, until explicitly disconnected.

constructSettingVpnPersistent :: (IsSettingVpn o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSettingVpnPersistent :: (MonadIO m, IsSettingVpn o) => o -> m Bool Source #

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

get settingVpn #persistent

setSettingVpnPersistent :: (MonadIO m, IsSettingVpn o) => o -> Bool -> m () Source #

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

set settingVpn [ #persistent := value ]

secrets

Dictionary of key/value pairs of VPN plugin specific secrets like passwords or private keys. Both keys and values must be strings.

clearSettingVpnSecrets :: (MonadIO m, IsSettingVpn o) => o -> m () Source #

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

clear #secrets

constructSettingVpnSecrets :: (IsSettingVpn o, MonadIO m) => Map Text Text -> m (GValueConstruct o) Source #

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

getSettingVpnSecrets :: (MonadIO m, IsSettingVpn o) => o -> m (Maybe (Map Text Text)) Source #

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

get settingVpn #secrets

setSettingVpnSecrets :: (MonadIO m, IsSettingVpn o) => o -> Map Text Text -> m () Source #

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

set settingVpn [ #secrets := value ]

serviceType

D-Bus service name of the VPN plugin that this setting uses to connect to its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin.

clearSettingVpnServiceType :: (MonadIO m, IsSettingVpn o) => o -> m () Source #

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

clear #serviceType

constructSettingVpnServiceType :: (IsSettingVpn o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSettingVpnServiceType :: (MonadIO m, IsSettingVpn o) => o -> m Text Source #

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

get settingVpn #serviceType

setSettingVpnServiceType :: (MonadIO m, IsSettingVpn o) => o -> Text -> m () Source #

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

set settingVpn [ #serviceType := value ]

timeout

Timeout for the VPN service to establish the connection. Some services may take quite a long time to connect. Value of 0 means a default timeout, which is 60 seconds (unless overridden by vpn.timeout in configuration file). Values greater than zero mean timeout in seconds.

Since: 1.2

constructSettingVpnTimeout :: (IsSettingVpn o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getSettingVpnTimeout :: (MonadIO m, IsSettingVpn o) => o -> m Word32 Source #

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

get settingVpn #timeout

setSettingVpnTimeout :: (MonadIO m, IsSettingVpn o) => o -> Word32 -> m () Source #

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

set settingVpn [ #timeout := value ]

userName

If the VPN connection requires a user name for authentication, that name should be provided here. If the connection is available to more than one user, and the VPN requires each user to supply a different name, then leave this property empty. If this property is empty, NetworkManager will automatically supply the username of the user which requested the VPN connection.

clearSettingVpnUserName :: (MonadIO m, IsSettingVpn o) => o -> m () Source #

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

clear #userName

constructSettingVpnUserName :: (IsSettingVpn o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSettingVpnUserName :: (MonadIO m, IsSettingVpn o) => o -> m Text Source #

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

get settingVpn #userName

setSettingVpnUserName :: (MonadIO m, IsSettingVpn o) => o -> Text -> m () Source #

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

set settingVpn [ #userName := value ]