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

GI.Secret.Functions

Description

 
Synopsis

Methods

getSchema

getSchema Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SchemaType

type: type of schema to get

-> m Schema

Returns: schema type

Get a secret storage schema of the given type.

C code may access the schemas (such as SECRET_SCHEMA_NOTE) directly, but language bindings cannot, and must use this accessor.

Since: 0.18.6

passwordClear

passwordClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for the attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe a

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Remove unlocked matching passwords from the secret service.

The attributes should be a set of key and value string pairs.

All unlocked items that match the attributes will be deleted.

This method will return immediately and complete asynchronously.

passwordClearFinish

passwordClearFinish Source #

Arguments

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

result: the asynchronous result passed to the callback

-> m ()

(Can throw GError)

Finish an asynchronous operation to remove passwords from the secret service.

passwordClearSync

passwordClearSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for the attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe a

cancellable: optional cancellation object

-> m ()

(Can throw GError)

Remove unlocked matching passwords from the secret service.

The attributes should be a set of key and value string pairs.

All unlocked items that match the attributes will be deleted.

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

passwordLookup

passwordLookup Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe a

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Lookup a password in the secret service.

The attributes should be a set of key and value string pairs.

If no secret is found then Nothing is returned.

This method will return immediately and complete asynchronously.

passwordLookupFinish

passwordLookupFinish Source #

Arguments

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

result: the asynchronous result passed to the callback

-> m Text

Returns: a new password string which should be freed with [funcpasswordFree] or may be freed with free when done (Can throw GError)

Finish an asynchronous operation to lookup a password in the secret service.

passwordLookupSync

passwordLookupSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe a

cancellable: optional cancellation object

-> m Text

Returns: a new password string which should be freed with [funcpasswordFree] or may be freed with free when done (Can throw GError)

Lookup a password in the secret service.

The attributes should be a set of key and value string pairs.

If no secret is found then Nothing is returned.

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

passwordSearch

passwordSearch Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> [SearchFlags]

flags: search option flags

-> Maybe a

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Search for items in the secret service.

The attributes should be a set of key and value string pairs.

This method will return immediately and complete asynchronously.

Since: 0.19.0

passwordSearchFinish

passwordSearchFinish Source #

Arguments

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

result: the asynchronous result passed to the callback

-> m [Retrievable]

Returns: a list of [ifaceretrievable] containing attributes of the matched items (Can throw GError)

Finish an asynchronous operation to search for items in the secret service.

Since: 0.19.0

passwordSearchSync

passwordSearchSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> [SearchFlags]

flags: search option flags

-> Maybe a

cancellable: optional cancellation object

-> m [Retrievable]

Returns: a list of [ifaceretrievable] containing attributes of the matched items (Can throw GError)

Search for items in the secret service.

The attributes should be a set of key and value string pairs.

If no secret is found then Nothing is returned.

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

Since: 0.19.0

passwordStore

passwordStore Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe Text

collection: a collection alias, or D-Bus object path of the collection where to store the secret

-> Text

label: label for the secret

-> Text

password: the null-terminated password to store

-> Maybe a

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Store a password in the secret service.

The attributes should be a set of key and value string pairs.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If collection is Nothing, then the default collection will be used. Use [constcOLLECTIONSESSION] to store the password in the session collection, which doesn't get stored across login sessions.

This method will return immediately and complete asynchronously.

passwordStoreBinary

passwordStoreBinary Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe Text

collection: a collection alias, or D-Bus object path of the collection where to store the secret

-> Text

label: label for the secret

-> Value

value: a [structvalue]

-> Maybe a

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Store a password in the secret service.

This is similar to [funcpasswordStorev], but takes a [structvalue] as the argument instead of a null-terminated password.

This method will return immediately and complete asynchronously.

Since: 0.19.0

passwordStoreBinarySync

passwordStoreBinarySync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe Text

collection: a collection alias, or D-Bus object path of the collection where to store the secret

-> Text

label: label for the secret

-> Value

value: a [structvalue]

-> Maybe a

cancellable: optional cancellation object

-> m ()

(Can throw GError)

Store a password in the secret service.

This is similar to [funcpasswordStorevSync], but takes a [structvalue] as the argument instead of a null-terminated passwords.

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

Since: 0.19.0

passwordStoreFinish

passwordStoreFinish Source #

Arguments

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

result: the asynchronous result passed to the callback

-> m ()

(Can throw GError)

Finish asynchronous operation to store a password in the secret service.

passwordStoreSync

passwordStoreSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Maybe Schema

schema: the schema for attributes

-> Map Text Text

attributes: the attribute keys and values

-> Maybe Text

collection: a collection alias, or D-Bus object path of the collection where to store the secret

-> Text

label: label for the secret

-> Text

password: the null-terminated password to store

-> Maybe a

cancellable: optional cancellation object

-> m ()

(Can throw GError)

Store a password in the secret service.

The attributes should be a set of key and value string pairs.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If collection is Nothing, then the default collection will be used. Use [constcOLLECTIONSESSION] to store the password in the session collection, which doesn't get stored across login sessions.

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

passwordWipe

passwordWipe Source #

Arguments

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

password: password to clear

-> m () 

Clear the memory used by a password.