gi-secret-0.0.14: Libsecret bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Secret.Interfaces.Retrievable

Description

An object representing a read-only view of a secret item in the Secret Service.

Since: 0.19.0

Synopsis

Exported types

class (GObject o, IsDescendantOf Retrievable o) => IsRetrievable o Source #

Type class for types which can be safely cast to Retrievable, for instance with toRetrievable.

Instances

Instances details
(GObject o, IsDescendantOf Retrievable o) => IsRetrievable o Source # 
Instance details

Defined in GI.Secret.Interfaces.Retrievable

toRetrievable :: (MonadIO m, IsRetrievable o) => o -> m Retrievable Source #

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

Methods

getAttributes

retrievableGetAttributes Source #

Arguments

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

self: a retrievable object

-> m (Map Text Text)

Returns: a new reference to the attributes, which should not be modified, and released with hashTableUnref

Get the attributes of this object.

The attributes are a mapping of string keys to string values. Attributes are used to search for items. Attributes are not stored or transferred securely by the secret service.

Do not modify the attribute returned by this method.

Since: 0.19.0

getCreated

retrievableGetCreated Source #

Arguments

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

self: a retrievable object

-> m Word64

Returns: the created date and time

Get the created date and time of the object. The return value is the number of seconds since the unix epoch, January 1st 1970.

Since: 0.19.0

getLabel

retrievableGetLabel Source #

Arguments

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

self: a retrievable object

-> m Text

Returns: the label, which should be freed with free

Get the label of this item.

Since: 0.19.0

getModified

retrievableGetModified Source #

Arguments

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

self: a retrievable object

-> m Word64

Returns: the modified date and time

Get the modified date and time of the object. The return value is the number of seconds since the unix epoch, January 1st 1970.

Since: 0.19.0

retrieveSecret

retrievableRetrieveSecret Source #

Arguments

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

self: a retrievable object

-> Maybe b

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Retrieve the secret value of this object.

Each retrievable object has a single secret which might be a password or some other secret binary value.

This function returns immediately and completes asynchronously.

Since: 0.19.0

retrieveSecretFinish

retrievableRetrieveSecretFinish Source #

Arguments

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

self: a retrievable object

-> b

result: asynchronous result passed to callback

-> m (Maybe Value)

Returns: the secret value which should be released with valueUnref, or Nothing (Can throw GError)

Complete asynchronous operation to retrieve the secret value of this object.

Since: 0.19.0

retrieveSecretSync

retrievableRetrieveSecretSync Source #

Arguments

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

self: a retrievable object

-> Maybe b

cancellable: optional cancellation object

-> m (Maybe Value)

Returns: the secret value which should be released with valueUnref, or Nothing (Can throw GError)

Retrieve the secret value of this object synchronously.

Each retrievable object has a single secret which might be a password or some other secret binary value.

This method may block indefinitely and should not be used in user interface threads.

Since: 0.19.0

Properties

attributes

created

The date and time (in seconds since the UNIX epoch) that this item was created.

Since: 0.19.0

constructRetrievableCreated :: (IsRetrievable o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #

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

getRetrievableCreated :: (MonadIO m, IsRetrievable o) => o -> m Word64 Source #

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

get retrievable #created

setRetrievableCreated :: (MonadIO m, IsRetrievable o) => o -> Word64 -> m () Source #

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

set retrievable [ #created := value ]

label

The human readable label for the item.

Since: 0.19.0

clearRetrievableLabel :: (MonadIO m, IsRetrievable o) => o -> m () Source #

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

clear #label

constructRetrievableLabel :: (IsRetrievable o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getRetrievableLabel :: (MonadIO m, IsRetrievable o) => o -> m (Maybe Text) Source #

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

get retrievable #label

setRetrievableLabel :: (MonadIO m, IsRetrievable o) => o -> Text -> m () Source #

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

set retrievable [ #label := value ]

modified

The date and time (in seconds since the UNIX epoch) that this item was last modified.

Since: 0.19.0

constructRetrievableModified :: (IsRetrievable o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #

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

getRetrievableModified :: (MonadIO m, IsRetrievable o) => o -> m Word64 Source #

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

get retrievable #modified

setRetrievableModified :: (MonadIO m, IsRetrievable o) => o -> Word64 -> m () Source #

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

set retrievable [ #modified := value ]