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

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf VpnPluginInfo o) => IsVpnPluginInfo o Source #

Type class for types which can be safely cast to VpnPluginInfo, for instance with toVpnPluginInfo.

Instances

Instances details
(GObject o, IsDescendantOf VpnPluginInfo o) => IsVpnPluginInfo o Source # 
Instance details

Defined in GI.NM.Objects.VpnPluginInfo

toVpnPluginInfo :: (MonadIO m, IsVpnPluginInfo o) => o -> m VpnPluginInfo Source #

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

Methods

getAliases

vpnPluginInfoGetAliases Source #

Arguments

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

self: plugin info instance

-> m [Text]

Returns: the aliases from the name-file.

No description available in the introspection data.

Since: 1.4

getAuthDialog

vpnPluginInfoGetAuthDialog Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the absolute path to the auth-dialog helper or Nothing.

No description available in the introspection data.

Since: 1.4

getEditorPlugin

vpnPluginInfoGetEditorPlugin Source #

Arguments

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

self: plugin info instance

-> m VpnEditorPlugin

Returns: the cached VpnEditorPlugin instance.

No description available in the introspection data.

Since: 1.2

getFilename

vpnPluginInfoGetFilename Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the filename. Can be Nothing.

No description available in the introspection data.

Since: 1.2

getName

vpnPluginInfoGetName Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the name. Cannot be Nothing.

No description available in the introspection data.

Since: 1.2

getPlugin

vpnPluginInfoGetPlugin Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the plugin. Can be Nothing.

No description available in the introspection data.

Since: 1.2

getProgram

vpnPluginInfoGetProgram Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the program. Can be Nothing.

No description available in the introspection data.

Since: 1.2

getService

vpnPluginInfoGetService Source #

Arguments

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

self: plugin info instance

-> m Text

Returns: the service. Cannot be Nothing.

No description available in the introspection data.

Since: 1.4

listAdd

vpnPluginInfoListAdd Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a, IsVpnPluginInfo b) 
=> [a]

list: list of plugins

-> b

pluginInfo: instance to add

-> m ()

(Can throw GError)

No description available in the introspection data.

Since: 1.2

listFindByFilename

vpnPluginInfoListFindByFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a) 
=> [a]

list: list of plugins

-> Text

filename: filename to search

-> m VpnPluginInfo

Returns: the first plugin with a matching filename (or Nothing).

No description available in the introspection data.

Since: 1.2

listFindByName

vpnPluginInfoListFindByName Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a) 
=> [a]

list: list of plugins

-> Text

name: name to search

-> m VpnPluginInfo

Returns: the first plugin with a matching name (or Nothing).

No description available in the introspection data.

Since: 1.2

listFindByService

vpnPluginInfoListFindByService Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a) 
=> [a]

list: list of plugins

-> Text

service: service to search. This can be the main service-type or one of the provided aliases.

-> m VpnPluginInfo

Returns: the first plugin with a matching service (or Nothing).

No description available in the introspection data.

Since: 1.2

listFindServiceType

vpnPluginInfoListFindServiceType Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a) 
=> [a]

list: a possibly empty SList of VpnPluginInfo instances

-> Text

name: a name to lookup the service-type.

-> m Text

Returns: the resolved service-type or Nothing on failure.

A VPN plugin provides one or several service-types, like org.freedesktop.NetworkManager.libreswan Certain plugins provide more then one service type, via aliases (org.freedesktop.NetworkManager.openswan). This function looks up a service-type (or an alias) based on a name.

Preferably, the name can be a full service-type/alias of an installed plugin. Otherwise, it can be the name of a VPN plugin (in which case, the primary, non-aliased service-type is returned). Otherwise, it can be one of several well known short-names (which is a hard-coded list of types in libnm). On success, this returns a full qualified service-type (or an alias). It doesn't say, that such an plugin is actually available, but it could be retrieved via vpnPluginInfoListFindByService.

Since: 1.4

listGetServiceTypes

vpnPluginInfoListGetServiceTypes Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a) 
=> [a]

list: a possibly empty SList of VpnPluginInfo

-> Bool

onlyExisting: only include results that are actually in list. Otherwise, the result is extended with a hard-code list or well-known plugins

-> Bool

withAbbreviations: if False, only full service types are returned. Otherwise, this also includes abbreviated names that can be used with vpnPluginInfoListFindServiceType.

-> m [Text]

Returns: a Nothing terminated strv list of strings. The list itself and the values must be freed with strfreev.

No description available in the introspection data.

Since: 1.4

listLoad

vpnPluginInfoListLoad Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m [VpnPluginInfo]

Returns: list of plugins loaded from the default directories rejecting duplicates.

No description available in the introspection data.

Since: 1.2

listRemove

vpnPluginInfoListRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a, IsVpnPluginInfo b) 
=> [a]

list: list of plugins

-> b

pluginInfo: instance

-> m Bool

Returns: True if pluginInfo was in list and successfully removed.

Remove pluginInfo from list.

Since: 1.2

loadEditorPlugin

vpnPluginInfoLoadEditorPlugin Source #

Arguments

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

self: plugin info instance

-> m VpnEditorPlugin

Returns: loads the plugin and returns the newly created instance. The plugin is owned by self and can be later retrieved again via vpnPluginInfoGetEditorPlugin. You can load the plugin only once, unless you reset the state via vpnPluginInfoSetEditorPlugin. (Can throw GError)

No description available in the introspection data.

Since: 1.2

lookupProperty

vpnPluginInfoLookupProperty Source #

Arguments

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

self: plugin info instance

-> Text

group: group name

-> Text

key: name of the property

-> m Text

Returns: VpnPluginInfo is internally a KeyFile. Returns the matching property.

No description available in the introspection data.

Since: 1.2

newFromFile

vpnPluginInfoNewFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: filename to read.

-> m VpnPluginInfo

Returns: Nothing if there is any error or a newly created VpnPluginInfo instance. (Can throw GError)

Read the plugin info from file filename. Does not do any further verification on the file. You might want to check file permissions and ownership of the file.

Since: 1.2

newSearchFile

vpnPluginInfoNewSearchFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

name: the name to search for. Either name or service must be present.

-> Maybe Text

service: the service to search for. Either name or service must be present.

-> m (Maybe VpnPluginInfo)

Returns: a newly created instance of plugin info or Nothing if no matching value was found.

This has the same effect as doing a full vpnPluginInfoListLoad followed by a search for the first matching VPN plugin info that has the given name and/or service.

Since: 1.4

newWithData

vpnPluginInfoNewWithData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: optional filename.

-> KeyFile

keyfile: inject data for the plugin info instance.

-> m VpnPluginInfo

Returns: new plugin info instance. (Can throw GError)

This constructor does not read any data from file but takes instead a keyfile argument.

Since: 1.2

setEditorPlugin

vpnPluginInfoSetEditorPlugin Source #

Arguments

:: (HasCallStack, MonadIO m, IsVpnPluginInfo a, IsVpnEditorPlugin b) 
=> a

self: plugin info instance

-> Maybe b

plugin: plugin instance

-> m () 

Set the internal plugin instance. If Nothing, only clear the previous instance.

Since: 1.2

supportsHints

vpnPluginInfoSupportsHints Source #

Arguments

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

self: plugin info instance

-> m Bool

Returns: True if the supports hints for secret requests, otherwise False

No description available in the introspection data.

Since: 1.4

supportsMultiple

vpnPluginInfoSupportsMultiple Source #

Arguments

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

self: plugin info instance

-> m Bool

Returns: True if the service supports multiple instances with different bus names, otherwise False

No description available in the introspection data.

Since: 1.42

validateFilename

vpnPluginInfoValidateFilename Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: the filename to check

-> m Bool 

Regular name files have a certain pattern. That basically means they have the file extension "name". Check if filename is valid according to that pattern.

Since: 1.2

Properties

filename

The filename from which the info was loaded. Can be Nothing if the instance was not loaded from a file (i.e. the keyfile instance was passed to the constructor).

Since: 1.2

constructVpnPluginInfoFilename :: (IsVpnPluginInfo o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getVpnPluginInfoFilename :: (MonadIO m, IsVpnPluginInfo o) => o -> m Text Source #

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

get vpnPluginInfo #filename

keyfile

Initialize the instance with a different keyfile instance. When passing a keyfile instance, the constructor will not try to read from filename.

Since: 1.2

constructVpnPluginInfoKeyfile :: (IsVpnPluginInfo o, MonadIO m) => KeyFile -> m (GValueConstruct o) Source #

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

name

The name of the VPN plugin.

Since: 1.2

getVpnPluginInfoName :: (MonadIO m, IsVpnPluginInfo o) => o -> m Text Source #

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

get vpnPluginInfo #name