Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Unsupported methods
- clear
- clearFinish
- clearSync
- decodeDbusSecret
- disconnect
- encodeDbusSecret
- ensureSession
- ensureSessionFinish
- ensureSessionSync
- get
- getCollectionGtype
- getCollections
- getFinish
- getFlags
- getItemGtype
- getSessionAlgorithms
- getSessionDbusPath
- getSync
- loadCollections
- loadCollectionsFinish
- loadCollectionsSync
- lock
- lockFinish
- lockSync
- lookup
- lookupFinish
- lookupSync
- open
- openFinish
- openSync
- prompt
- promptFinish
- promptSync
- search
- searchFinish
- searchSync
- setAlias
- setAliasFinish
- setAliasSync
- store
- storeFinish
- storeSync
- unlock
- unlockFinish
- unlockSync
A proxy object representing the Secret Service.
- newtype Service = Service (ManagedPtr Service)
- class GObject o => IsService o
- toService :: IsService o => o -> IO Service
- noService :: Maybe Service
- data ServiceCreateItemDbusPathSyncMethodInfo
- data ServiceClearMethodInfo
- serviceClear :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceClearFinishMethodInfo
- serviceClearFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ()
- data ServiceClearSyncMethodInfo
- serviceClearSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> m ()
- data ServiceDecodeDbusSecretMethodInfo
- serviceDecodeDbusSecret :: (HasCallStack, MonadIO m, IsService a) => a -> GVariant -> m Value
- serviceDisconnect :: (HasCallStack, MonadIO m) => m ()
- data ServiceEncodeDbusSecretMethodInfo
- serviceEncodeDbusSecret :: (HasCallStack, MonadIO m, IsService a) => a -> Value -> m GVariant
- data ServiceEnsureSessionMethodInfo
- serviceEnsureSession :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceEnsureSessionFinishMethodInfo
- serviceEnsureSessionFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ()
- data ServiceEnsureSessionSyncMethodInfo
- serviceEnsureSessionSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> m ()
- serviceGet :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- data ServiceGetCollectionGtypeMethodInfo
- serviceGetCollectionGtype :: (HasCallStack, MonadIO m, IsService a) => a -> m GType
- data ServiceGetCollectionsMethodInfo
- serviceGetCollections :: (HasCallStack, MonadIO m, IsService a) => a -> m [Collection]
- serviceGetFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Service
- data ServiceGetFlagsMethodInfo
- serviceGetFlags :: (HasCallStack, MonadIO m, IsService a) => a -> m [ServiceFlags]
- data ServiceGetItemGtypeMethodInfo
- serviceGetItemGtype :: (HasCallStack, MonadIO m, IsService a) => a -> m GType
- data ServiceGetSessionAlgorithmsMethodInfo
- serviceGetSessionAlgorithms :: (HasCallStack, MonadIO m, IsService a) => a -> m (Maybe Text)
- data ServiceGetSessionDbusPathMethodInfo
- serviceGetSessionDbusPath :: (HasCallStack, MonadIO m, IsService a) => a -> m (Maybe Text)
- serviceGetSync :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe a -> m Service
- data ServiceLoadCollectionsMethodInfo
- serviceLoadCollections :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceLoadCollectionsFinishMethodInfo
- serviceLoadCollectionsFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ()
- data ServiceLoadCollectionsSyncMethodInfo
- serviceLoadCollectionsSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> m ()
- data ServiceLockMethodInfo
- serviceLock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data ServiceLockFinishMethodInfo
- serviceLockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m (Int32, [DBusProxy])
- data ServiceLockSyncMethodInfo
- serviceLockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> m (Int32, [DBusProxy])
- data ServiceLookupMethodInfo
- serviceLookup :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceLookupFinishMethodInfo
- serviceLookupFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m Value
- data ServiceLookupSyncMethodInfo
- serviceLookupSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> m Value
- serviceOpen :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe Text -> [ServiceFlags] -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- serviceOpenFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Service
- serviceOpenSync :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe Text -> [ServiceFlags] -> Maybe a -> m Service
- data ServicePromptMethodInfo
- servicePrompt :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe VariantType -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data ServicePromptFinishMethodInfo
- servicePromptFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m GVariant
- data ServicePromptSyncMethodInfo
- servicePromptSync :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe c -> VariantType -> m GVariant
- data ServiceSearchMethodInfo
- serviceSearch :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceSearchFinishMethodInfo
- serviceSearchFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m [Item]
- data ServiceSearchSyncMethodInfo
- serviceSearchSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> m [Item]
- data ServiceSetAliasMethodInfo
- serviceSetAlias :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data ServiceSetAliasFinishMethodInfo
- serviceSetAliasFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ()
- data ServiceSetAliasSyncMethodInfo
- serviceSetAliasSync :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe b -> Maybe c -> m ()
- data ServiceStoreMethodInfo
- serviceStore :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ServiceStoreFinishMethodInfo
- serviceStoreFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ()
- data ServiceStoreSyncMethodInfo
- serviceStoreSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe b -> m ()
- data ServiceUnlockMethodInfo
- serviceUnlock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data ServiceUnlockFinishMethodInfo
- serviceUnlockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m (Int32, [DBusProxy])
- data ServiceUnlockSyncMethodInfo
- serviceUnlockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> m (Int32, [DBusProxy])
Exported types
GObject Service Source # | |
IsAsyncInitable Service Source # | |
IsDBusInterface Service Source # | |
IsInitable Service Source # | |
IsDBusProxy Service Source # | |
IsObject Service Source # | |
IsService Service Source # | |
((~) * info (ResolveServiceMethod t Service), MethodInfo * info Service p) => IsLabel t (Service -> p) Source # | |
((~) * info (ResolveServiceMethod t Service), MethodInfo * info Service p) => IsLabelProxy t (Service -> p) Source # | |
HasAttributeList * Service Source # | |
type AttributeList Service Source # | |
type SignalList Service Source # | |
Methods
Unsupported methods
data ServiceCreateItemDbusPathSyncMethodInfo Source #
((~) * p (), (~) * o (MethodResolutionFailed * "createItemDbusPathSync" Service)) => MethodInfo * ServiceCreateItemDbusPathSyncMethodInfo o p Source # | |
clear
data ServiceClearMethodInfo Source #
((~) * signature (Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceClearMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Remove unlocked items which match the attributes from the secret service.
The attributes
should be a set of key and value string pairs.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
This method will return immediately and complete asynchronously.
clearFinish
data ServiceClearFinishMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceClearFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish asynchronous operation to remove items from the secret service.
clearSync
data ServiceClearSyncMethodInfo Source #
((~) * signature (Maybe Schema -> Map Text Text -> Maybe b -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceClearSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Remove unlocked items which match the attributes from the secret service.
The attributes
should be a set of key and value string pairs.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user interface threads.
decodeDbusSecret
data ServiceDecodeDbusSecretMethodInfo Source #
((~) * signature (GVariant -> m Value), MonadIO m, IsService a) => MethodInfo * ServiceDecodeDbusSecretMethodInfo a signature Source # | |
serviceDecodeDbusSecret Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> GVariant |
|
-> m Value | Returns: the decoded secret value |
disconnect
serviceDisconnect :: (HasCallStack, MonadIO m) => m () Source #
Disconnect the default Service
proxy returned by serviceGet
and serviceGetSync
.
It is not necessary to call this function, but you may choose to do so at program exit. It is useful for testing that memory is not leaked.
This function is safe to call at any time. But if other objects in this library are still referenced, then this will not result in all memory being freed.
encodeDbusSecret
data ServiceEncodeDbusSecretMethodInfo Source #
((~) * signature (Value -> m GVariant), MonadIO m, IsService a) => MethodInfo * ServiceEncodeDbusSecretMethodInfo a signature Source # | |
serviceEncodeDbusSecret Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> Value |
|
-> m GVariant | Returns: the encoded secret |
ensureSession
data ServiceEnsureSessionMethodInfo Source #
((~) * signature (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceEnsureSessionMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Ensure that the Service
proxy has established a session with the
Secret Service. This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is
established as necessary. You can also pass the ServiceFlagsOpenSession
to serviceGet
in order to ensure that a session has been established
by the time you get the Service
proxy.
This method will return immediately and complete asynchronously.
ensureSessionFinish
data ServiceEnsureSessionFinishMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceEnsureSessionFinishMethodInfo a signature Source # | |
serviceEnsureSessionFinish Source #
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish an asynchronous operation to ensure that the Service
proxy
has established a session with the Secret Service.
ensureSessionSync
data ServiceEnsureSessionSyncMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceEnsureSessionSyncMethodInfo a signature Source # | |
serviceEnsureSessionSync Source #
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Ensure that the Service
proxy has established a session with the
Secret Service. This session is used to transfer secrets.
It is not normally necessary to call this method, as the session is
established as necessary. You can also pass the ServiceFlagsOpenSession
to serviceGetSync
in order to ensure that a session has been
established by the time you get the Service
proxy.
This method may block indefinitely and should not be used in user interface threads.
get
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> [ServiceFlags] |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Get a Service
proxy for the Secret Service. If such a proxy object
already exists, then the same proxy is returned.
If flags
contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before completing.
This method will return immediately and complete asynchronously.
getCollectionGtype
data ServiceGetCollectionGtypeMethodInfo Source #
((~) * signature (m GType), MonadIO m, IsService a) => MethodInfo * ServiceGetCollectionGtypeMethodInfo a signature Source # | |
serviceGetCollectionGtype Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m GType | Returns: the gobject type for collections |
Get the GObject type for collections instantiated by this service.
This will always be either Collection
or derived from it.
getCollections
data ServiceGetCollectionsMethodInfo Source #
((~) * signature (m [Collection]), MonadIO m, IsService a) => MethodInfo * ServiceGetCollectionsMethodInfo a signature Source # | |
serviceGetCollections Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m [Collection] | Returns: a list of the collections in the secret service |
Get a list of Collection
objects representing all the collections
in the secret service.
If the ServiceFlagsLoadCollections
flag was not specified when
initializing Service
proxy object, then this method will return
Nothing
. Use serviceLoadCollections
to load the collections.
getFinish
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m Service | Returns: a new reference to a |
Complete an asynchronous operation to get a Service
proxy for the
Secret Service.
getFlags
data ServiceGetFlagsMethodInfo Source #
((~) * signature (m [ServiceFlags]), MonadIO m, IsService a) => MethodInfo * ServiceGetFlagsMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m [ServiceFlags] | Returns: the flags for features initialized |
Get the flags representing what features of the Service
proxy
have been initialized.
Use serviceEnsureSession
or serviceLoadCollections
to initialize further features and change the flags.
getItemGtype
data ServiceGetItemGtypeMethodInfo Source #
((~) * signature (m GType), MonadIO m, IsService a) => MethodInfo * ServiceGetItemGtypeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m GType | Returns: the gobject type for items |
Get the GObject type for items instantiated by this service.
This will always be either Item
or derived from it.
getSessionAlgorithms
data ServiceGetSessionAlgorithmsMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsService a) => MethodInfo * ServiceGetSessionAlgorithmsMethodInfo a signature Source # | |
serviceGetSessionAlgorithms Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m (Maybe Text) | Returns: a string representing the algorithms for transferring secrets |
Get the set of algorithms being used to transfer secrets between this secret service proxy and the Secret Service itself.
This will be Nothing
if no session has been established. Use
serviceEnsureSession
to establish a session.
getSessionDbusPath
data ServiceGetSessionDbusPathMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsService a) => MethodInfo * ServiceGetSessionDbusPathMethodInfo a signature Source # | |
serviceGetSessionDbusPath Source #
:: (HasCallStack, MonadIO m, IsService a) | |
=> a |
|
-> m (Maybe Text) | Returns: a string representing the D-Bus object path of the session |
Get the D-Bus object path of the session object being used to transfer secrets between this secret service proxy and the Secret Service itself.
This will be Nothing
if no session has been established. Use
serviceEnsureSession
to establish a session.
getSync
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> [ServiceFlags] |
|
-> Maybe a |
|
-> m Service | Returns: a new reference to a |
Get a Service
proxy for the Secret Service. If such a proxy object
already exists, then the same proxy is returned.
If flags
contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
This method may block indefinitely and should not be used in user interface threads.
loadCollections
data ServiceLoadCollectionsMethodInfo Source #
((~) * signature (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceLoadCollectionsMethodInfo a signature Source # | |
serviceLoadCollections Source #
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Ensure that the Service
proxy has loaded all the collections present
in the Secret Service. This affects the result of
serviceGetCollections
.
You can also pass the ServiceFlagsLoadCollections
to
serviceGetSync
in order to ensure that the collections have been
loaded by the time you get the Service
proxy.
This method will return immediately and complete asynchronously.
loadCollectionsFinish
data ServiceLoadCollectionsFinishMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceLoadCollectionsFinishMethodInfo a signature Source # | |
serviceLoadCollectionsFinish Source #
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Complete an asynchronous operation to ensure that the Service
proxy
has loaded all the collections present in the Secret Service.
loadCollectionsSync
data ServiceLoadCollectionsSyncMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceLoadCollectionsSyncMethodInfo a signature Source # | |
serviceLoadCollectionsSync Source #
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Ensure that the Service
proxy has loaded all the collections present
in the Secret Service. This affects the result of
serviceGetCollections
.
You can also pass the ServiceFlagsLoadCollections
to
serviceGetSync
in order to ensure that the collections have been
loaded by the time you get the Service
proxy.
This method may block indefinitely and should not be used in user interface threads.
lock
data ServiceLockMethodInfo Source #
((~) * signature ([b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => MethodInfo * ServiceLockMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) | |
=> a |
|
-> [b] |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
This method returns immediately and completes asynchronously. The secret
service may prompt the user. servicePrompt
will be used to handle
any prompts that show up.
lockFinish
data ServiceLockFinishMethodInfo Source #
((~) * signature (b -> m (Int32, [DBusProxy])), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceLockFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (Int32, [DBusProxy]) | Returns: the number of items or collections that were locked (Can throw |
Complete asynchronous operation to lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
lockSync
data ServiceLockSyncMethodInfo Source #
((~) * signature ([b] -> Maybe c -> m (Int32, [DBusProxy])), MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => MethodInfo * ServiceLockSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) | |
=> a |
|
-> [b] |
|
-> Maybe c |
|
-> m (Int32, [DBusProxy]) | Returns: the number of items or collections that were locked (Can throw |
Lock items or collections in the secret service.
The secret service may not be able to lock items individually, and may lock an entire collection instead.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
servicePrompt
will be used to handle any prompts that show up.
lookup
data ServiceLookupMethodInfo Source #
((~) * signature (Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceLookupMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Lookup a secret value in the secret service.
The attributes
should be a set of key and value string pairs.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
This method will return immediately and complete asynchronously.
lookupFinish
data ServiceLookupFinishMethodInfo Source #
((~) * signature (b -> m Value), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceLookupFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m Value | Returns: a newly allocated |
Finish asynchronous operation to lookup a secret value in the secret service.
If no secret is found then Nothing
is returned.
lookupSync
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe b |
|
-> m Value | Returns: a newly allocated |
Lookup a secret value in the secret service.
The attributes
should be a set of key and value string pairs.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user interface threads.
open
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> GType |
|
-> Maybe Text |
|
-> [ServiceFlags] |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Create a new Service
proxy for the Secret Service.
This function is rarely used, see serviceGet
instead.
The serviceGtype
argument should be set to SECRET_TYPE_SERVICE
or a the type
of a derived class.
If flags
contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
If serviceBusName
is Nothing
then the default is used.
This method will return immediately and complete asynchronously.
openFinish
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m Service | Returns: a new reference to a |
Complete an asynchronous operation to create a new Service
proxy for
the Secret Service.
openSync
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> GType |
|
-> Maybe Text |
|
-> [ServiceFlags] |
|
-> Maybe a |
|
-> m Service | Returns: a new reference to a |
Create a new Service
proxy for the Secret Service.
This function is rarely used, see serviceGetSync
instead.
The serviceGtype
argument should be set to SECRET_TYPE_SERVICE
or a the
type of a derived class.
If flags
contains any flags of which parts of the secret service to
ensure are initialized, then those will be initialized before returning.
If serviceBusName
is Nothing
then the default is used.
This method may block indefinitely and should not be used in user interface threads.
prompt
data ServicePromptMethodInfo Source #
((~) * signature (b -> Maybe VariantType -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsPrompt b, IsCancellable c) => MethodInfo * ServicePromptMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe VariantType |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Perform prompting for a Prompt
.
This function is called by other parts of this library to handle prompts for the various actions that can require prompting.
Override the ServiceClass
<literal>prompt_async</literal> virtual method
to change the behavior of the prompting. The default behavior is to simply
run promptPerform
on the prompt.
promptFinish
data ServicePromptFinishMethodInfo Source #
((~) * signature (b -> m GVariant), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServicePromptFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m GVariant | Returns: |
Complete asynchronous operation to perform prompting for a Prompt
.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
promptSync
data ServicePromptSyncMethodInfo Source #
((~) * signature (b -> Maybe c -> VariantType -> m GVariant), MonadIO m, IsService a, IsPrompt b, IsCancellable c) => MethodInfo * ServicePromptSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> VariantType |
|
-> m GVariant | Returns: |
Perform prompting for a Prompt
.
Runs a prompt and performs the prompting. Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
This function is called by other parts of this library to handle prompts for the various actions that can require prompting.
Override the ServiceClass
<literal>prompt_sync</literal> virtual method
to change the behavior of the prompting. The default behavior is to simply
run promptPerformSync
on the prompt with a Nothing
<literal>window_id</literal>.
search
data ServiceSearchMethodInfo Source #
((~) * signature (Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceSearchMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> [SearchFlags] |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Search for items matching the attributes
. All collections are searched.
The attributes
should be a table of string keys and string values.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
If SearchFlagsAll
is set in flags
, then all the items matching the
search will be returned. Otherwise only the first item will be returned.
This is almost always the unlocked item that was most recently stored.
If SearchFlagsUnlock
is set in flags
, then items will be unlocked
if necessary. In either case, locked and unlocked items will match the
search and be returned. If the unlock fails, the search does not fail.
If SearchFlagsLoadSecrets
is set in flags
, then the items will have
their secret values loaded and available via itemGetSecret
.
This function returns immediately and completes asynchronously.
searchFinish
data ServiceSearchFinishMethodInfo Source #
((~) * signature (b -> m [Item]), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceSearchFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m [Item] | Returns:
a list of items that matched the search (Can throw |
Complete asynchronous operation to search for items.
searchSync
data ServiceSearchSyncMethodInfo Source #
((~) * signature (Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> m [Item]), MonadIO m, IsService a, IsCancellable b) => MethodInfo * ServiceSearchSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> [SearchFlags] |
|
-> Maybe b |
|
-> m [Item] | Returns:
a list of items that matched the search (Can throw |
Search for items matching the attributes
. All collections are searched.
The attributes
should be a table of string keys and string values.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
If SearchFlagsAll
is set in flags
, then all the items matching the
search will be returned. Otherwise only the first item will be returned.
This is almost always the unlocked item that was most recently stored.
If SearchFlagsUnlock
is set in flags
, then items will be unlocked
if necessary. In either case, locked and unlocked items will match the
search and be returned. If the unlock fails, the search does not fail.
If SearchFlagsLoadSecrets
is set in flags
, then the items' secret
values will be loaded for any unlocked items. Loaded item secret values
are available via itemGetSecret
. If the load of a secret values
fail, then the
This function may block indefinetely. Use the asynchronous version in user interface threads.
setAlias
data ServiceSetAliasMethodInfo Source #
((~) * signature (Text -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsCollection b, IsCancellable c) => MethodInfo * ServiceSetAliasMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Assign a collection to this alias. Aliases help determine well known collections, such as 'default'.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
This method will return immediately and complete asynchronously.
setAliasFinish
data ServiceSetAliasFinishMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceSetAliasFinishMethodInfo a signature Source # | |
serviceSetAliasFinish Source #
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish an asynchronous operation to assign a collection to an alias.
setAliasSync
data ServiceSetAliasSyncMethodInfo Source #
((~) * signature (Text -> Maybe b -> Maybe c -> m ()), MonadIO m, IsService a, IsCollection b, IsCancellable c) => MethodInfo * ServiceSetAliasSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
Assign a collection to this alias. Aliases help determine well known collections, such as 'default'.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block and should not be used in user interface threads.
store
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Value |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Store a secret value 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 service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
If collection
is not specified, then the default collection will be
used. Use COLLECTION_SESSION
to store the password in the session
collection, which doesn't get stored across login sessions.
This method will return immediately and complete asynchronously.
storeFinish
data ServiceStoreFinishMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceStoreFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish asynchronous operation to store a secret value in the secret service.
storeSync
:: (HasCallStack, MonadIO m, IsService a, IsCancellable b) | |
=> a |
|
-> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Value |
|
-> Maybe b |
|
-> m () | (Can throw |
Store a secret value 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 COLLECTION_SESSION
to store the password in the session
collection, which doesn't get stored across login sessions.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user interface threads.
unlock
data ServiceUnlockMethodInfo Source #
((~) * signature ([b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => MethodInfo * ServiceUnlockMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) | |
=> a |
|
-> [b] |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
If service
is NULL, then serviceGet
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
servicePrompt
will be used to handle any prompts that show up.
unlockFinish
data ServiceUnlockFinishMethodInfo Source #
((~) * signature (b -> m (Int32, [DBusProxy])), MonadIO m, IsService a, IsAsyncResult b) => MethodInfo * ServiceUnlockFinishMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (Int32, [DBusProxy]) | Returns: the number of items or collections that were unlocked (Can throw |
Complete asynchronous operation to unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
unlockSync
data ServiceUnlockSyncMethodInfo Source #
((~) * signature ([b] -> Maybe c -> m (Int32, [DBusProxy])), MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => MethodInfo * ServiceUnlockSyncMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) | |
=> a |
|
-> [b] |
|
-> Maybe c |
|
-> m (Int32, [DBusProxy]) | Returns: the number of items or collections that were unlocked (Can throw |
Unlock items or collections in the secret service.
The secret service may not be able to unlock items individually, and may unlock an entire collection instead.
If service
is NULL, then serviceGetSync
will be called to get
the default Service
proxy.
This method may block indefinitely and should not be used in user
interface threads. The secret service may prompt the user.
servicePrompt
will be used to handle any prompts that show up.