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

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf SecretAgentOld o) => IsSecretAgentOld o Source #

Type class for types which can be safely cast to SecretAgentOld, for instance with toSecretAgentOld.

Instances

Instances details
(GObject o, IsDescendantOf SecretAgentOld o) => IsSecretAgentOld o Source # 
Instance details

Defined in GI.NM.Objects.SecretAgentOld

toSecretAgentOld :: (MonadIO m, IsSecretAgentOld o) => o -> m SecretAgentOld Source #

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

Methods

deleteSecrets

secretAgentOldDeleteSecrets Source #

Arguments

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

self: a SecretAgentOld

-> b

connection: a Connection

-> SecretAgentOldDeleteSecretsFunc

callback: a callback, to be invoked when the operation is done

-> m () 

Asynchronously asks the agent to delete all saved secrets belonging to connection.

destroy

secretAgentOldDestroy Source #

Arguments

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

self: the SecretAgentOld instance.

-> m () 

Since 1.24, the instance will already register a D-Bus object on the D-Bus connection during initialization. That object will stay registered until self gets unrefed (destroyed) or this function is called. This function performs the necessary cleanup to tear down the instance. Afterwards, the function can not longer be used. This is optional, but necessary to ensure unregistering the D-Bus object at a define point, when other users might still have a reference on self.

You may call this function any time and repeatedly. However, after destroying the instance, it is a bug to still use the instance for other purposes. The instance becomes defunct and cannot re-register.

Since: 1.24

enable

secretAgentOldEnable Source #

Arguments

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

self: the SecretAgentOld instance

-> Bool

enable: whether to enable or disable the listener.

-> m () 

This has the same effect as setting SECRET_AGENT_OLD_AUTO_REGISTER property.

Unlike most other functions, you may already call this function before initialization completes.

Since: 1.24

getContextBusyWatcher

secretAgentOldGetContextBusyWatcher Source #

Arguments

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

self: the SecretAgentOld instance

-> m Object

Returns: a Object that you may register a weak pointer to know that the MainContext is still kept busy by self.

Returns a Object that stays alive as long as there are pending requests in the DBusConnection. Such requests keep the MainContext alive, and thus you may want to keep iterating the context as long until a weak reference indicates that this object is gone. This is useful because even when you destroy the instance right away (and all the internally pending requests get cancelled), any pending dBusConnectionCall requests will still invoke the result on the MainContext. Hence, this allows you to know how long you must iterate the context to know that all remains are cleaned up.

Since: 1.24

getDbusConnection

secretAgentOldGetDbusConnection Source #

Arguments

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

self: the SecretAgentOld instance

-> m DBusConnection

Returns: the DBusConnection used by the secret agent. You may either set this as construct property SECRET_AGENT_OLD_DBUS_CONNECTION, or it will automatically set during initialization.

No description available in the introspection data.

Since: 1.24

getDbusNameOwner

secretAgentOldGetDbusNameOwner Source #

Arguments

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

self: the SecretAgentOld instance

-> m Text

Returns: the current D-Bus name owner. While this property is set while registering, it really only makes sense when the secretAgentOldGetRegistered indicates that registration is successful.

No description available in the introspection data.

Since: 1.24

getMainContext

secretAgentOldGetMainContext Source #

Arguments

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

self: the SecretAgentOld instance

-> m MainContext

Returns: the MainContext instance associate with the instance. This is the mainContextGetThreadDefault at the time when creating the instance.

No description available in the introspection data.

Since: 1.24

getRegistered

secretAgentOldGetRegistered Source #

Arguments

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

self: a SecretAgentOld

-> m Bool

Returns: a True if the agent is registered, False if it is not.

Note that the secret agent transparently registers and re-registers as the D-Bus name owner appears. Hence, this property is not really useful. Also, to be graceful against races during registration, the instance will already accept requests while being in the process of registering. If you need to avoid races and want to wait until self is registered, call secretAgentOldRegisterAsync. If that function completes with success, you know the instance is registered.

getSecrets

secretAgentOldGetSecrets Source #

Arguments

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

self: a SecretAgentOld

-> b

connection: the Connection for which we're asked secrets

-> Text

settingName: the name of the secret setting

-> [Text]

hints: hints to the agent

-> [SecretAgentGetSecretsFlags]

flags: flags that modify the behavior of the request

-> SecretAgentOldGetSecretsFunc

callback: a callback, to be invoked when the operation is done

-> m () 

Asynchronously retrieves secrets belonging to connection for the setting settingName. flags indicate specific behavior that the secret agent should use when performing the request, for example returning only existing secrets without user interaction, or requesting entirely new secrets from the user.

register

secretAgentOldRegister Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsCancellable b) 
=> a

self: a SecretAgentOld

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.24)Use secretAgentOldEnable or secretAgentOldRegisterAsync.

Registers the SecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent is able to provide and save secrets for connections on behalf of its user.

registerAsync

secretAgentOldRegisterAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsCancellable b) 
=> a

self: a SecretAgentOld

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to call when the agent is registered

-> m () 

Asynchronously registers the SecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent is able to provide and save secrets for connections on behalf of its user.

Since 1.24, registration cannot fail and is idempotent. It has the same effect as setting SECRET_AGENT_OLD_AUTO_REGISTER to True or secretAgentOldEnable.

Since 1.24, the asynchronous result indicates whether the instance is successfully registered. In any case, this call enables the agent and it will automatically try to register and handle secret requests. A failure of this function only indicates that currently the instance might not be ready (but since it will automatically try to recover, it might be ready in a moment afterwards). Use this function if you want to check and ensure that the agent is registered.

registerFinish

secretAgentOldRegisterFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsAsyncResult b) 
=> a

self: a SecretAgentOld

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Gets the result of a call to secretAgentOldRegisterAsync.

saveSecrets

secretAgentOldSaveSecrets Source #

Arguments

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

self: a SecretAgentOld

-> b

connection: a Connection

-> SecretAgentOldSaveSecretsFunc

callback: a callback, to be invoked when the operation is done

-> m () 

Asynchronously ensures that all secrets inside connection are stored to disk.

unregister

secretAgentOldUnregister Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsCancellable b) 
=> a

self: a SecretAgentOld

-> Maybe b

cancellable: a Cancellable, or Nothing

-> m ()

(Can throw GError)

Deprecated: (Since version 1.24)Use secretAgentOldEnable.

Unregisters the SecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent will no longer provide or store secrets on behalf of this user.

unregisterAsync

secretAgentOldUnregisterAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsCancellable b) 
=> a

self: a SecretAgentOld

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: callback to call when the agent is unregistered

-> m () 

Deprecated: (Since version 1.24)Use secretAgentOldEnable.

Asynchronously unregisters the SecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent will no longer provide or store secrets on behalf of this user.

Since 1.24, registration cannot fail and is idempotent. It has the same effect as setting SECRET_AGENT_OLD_AUTO_REGISTER to False or secretAgentOldEnable.

unregisterFinish

secretAgentOldUnregisterFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSecretAgentOld a, IsAsyncResult b) 
=> a

self: a SecretAgentOld

-> b

result: the result passed to the AsyncReadyCallback

-> m ()

(Can throw GError)

Deprecated: (Since version 1.24)Use secretAgentOldEnable.

Gets the result of a call to secretAgentOldUnregisterAsync.

Properties

autoRegister

If True (the default), the agent will always be registered when NetworkManager is running; if NetworkManager exits and restarts, the agent will re-register itself automatically.

In particular, if this property is True at construct time, then the agent will register itself with NetworkManager during construction/initialization and initialization will only complete after registration is completed (either successfully or unsuccessfully). Since 1.24, a failure to register will no longer cause initialization of SecretAgentOld to fail.

If the property is False, the agent will not automatically register with NetworkManager, and secretAgentOldEnable or secretAgentOldRegisterAsync must be called to register it.

Calling secretAgentOldEnable has the same effect as setting this property.

constructSecretAgentOldAutoRegister :: (IsSecretAgentOld o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getSecretAgentOldAutoRegister :: (MonadIO m, IsSecretAgentOld o) => o -> m Bool Source #

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

get secretAgentOld #autoRegister

setSecretAgentOldAutoRegister :: (MonadIO m, IsSecretAgentOld o) => o -> Bool -> m () Source #

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

set secretAgentOld [ #autoRegister := value ]

capabilities

A bitfield of NMSecretAgentCapabilities.

Changing this property is possible at any time. In case the secret agent is currently registered, this will cause a re-registration.

constructSecretAgentOldCapabilities :: (IsSecretAgentOld o, MonadIO m) => [SecretAgentCapabilities] -> m (GValueConstruct o) Source #

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

getSecretAgentOldCapabilities :: (MonadIO m, IsSecretAgentOld o) => o -> m [SecretAgentCapabilities] Source #

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

get secretAgentOld #capabilities

setSecretAgentOldCapabilities :: (MonadIO m, IsSecretAgentOld o) => o -> [SecretAgentCapabilities] -> m () Source #

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

set secretAgentOld [ #capabilities := value ]

dbusConnection

The DBusConnection used by the instance. You may either set this as construct-only property, or otherwise SecretAgentOld will choose a connection via busGet during initialization.

Since: 1.24

constructSecretAgentOldDbusConnection :: (IsSecretAgentOld o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o) Source #

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

getSecretAgentOldDbusConnection :: (MonadIO m, IsSecretAgentOld o) => o -> m DBusConnection Source #

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

get secretAgentOld #dbusConnection

identifier

Identifies this agent; only one agent in each user session may use the same identifier. Identifier formatting follows the same rules as D-Bus bus names with the exception that the ':' character is not allowed. The valid set of characters is "[A-Z][a-z][0-9]_-." and the identifier is limited in length to 255 characters with a minimum of 3 characters. An example valid identifier is 'org.gnome.nm-applet' (without quotes).

constructSecretAgentOldIdentifier :: (IsSecretAgentOld o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getSecretAgentOldIdentifier :: (MonadIO m, IsSecretAgentOld o) => o -> m (Maybe Text) Source #

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

get secretAgentOld #identifier

registered

True if the agent is registered with NetworkManager, False if not.

getSecretAgentOldRegistered :: (MonadIO m, IsSecretAgentOld o) => o -> m Bool Source #

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

get secretAgentOld #registered