gi-secret
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Secret.Objects.Prompt

Description

A prompt in the Service

A proxy object representing a prompt that the Secret Service will display to the user.

Certain actions on the Secret Service require user prompting to complete, such as creating a collection, or unlocking a collection. When such a prompt is necessary, then a Prompt object is created by this library, and passed to the [methodservice.prompt] method. In this way it is handled automatically.

In order to customize prompt handling, override the [vfuncservice.prompt_async] and [vfuncservice.prompt_finish] virtual methods of the [classservice] class.

Synopsis

Exported types

newtype Prompt Source #

Memory-managed wrapper type.

Constructors

Prompt (ManagedPtr Prompt) 

Instances

Instances details
Eq Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

(==) :: Prompt -> Prompt -> Bool #

(/=) :: Prompt -> Prompt -> Bool #

GObject Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

ManagedPtrNewtype Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

TypedObject Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

glibType :: IO GType #

HasParentTypes Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

HasAttributeList Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

(info ~ ResolvePromptMethod t Prompt, OverloadedMethod info Prompt p, HasField t Prompt p) => HasField (t :: Symbol) Prompt p Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

getField :: Prompt -> p #

(info ~ ResolvePromptMethod t Prompt, OverloadedMethodInfo info Prompt) => IsLabel t (MethodProxy info Prompt) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

fromLabel :: MethodProxy info Prompt #

(info ~ ResolvePromptMethod t Prompt, OverloadedMethod info Prompt p) => IsLabel t (Prompt -> p) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

fromLabel :: Prompt -> p #

IsGValue (Maybe Prompt) Source #

Convert Prompt to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Secret.Objects.Prompt

type AttributeList Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

type AttributeList Prompt
type ParentTypes Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

type ParentTypes Prompt = '[DBusProxy, Object, AsyncInitable, DBusInterface, Initable]
type SignalList Prompt Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

type SignalList Prompt

class (GObject o, IsDescendantOf Prompt o) => IsPrompt o Source #

Type class for types which can be safely cast to Prompt, for instance with toPrompt.

Instances

Instances details
(GObject o, IsDescendantOf Prompt o) => IsPrompt o Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

toPrompt :: (MonadIO m, IsPrompt o) => o -> m Prompt Source #

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

Methods

type family ResolvePromptMethod (t :: Symbol) o where ... Source #

Equations

ResolvePromptMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolvePromptMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolvePromptMethod "call" o = DBusProxyCallMethodInfo 
ResolvePromptMethod "callFinish" o = DBusProxyCallFinishMethodInfo 
ResolvePromptMethod "callSync" o = DBusProxyCallSyncMethodInfo 
ResolvePromptMethod "callWithUnixFdList" o = DBusProxyCallWithUnixFdListMethodInfo 
ResolvePromptMethod "callWithUnixFdListFinish" o = DBusProxyCallWithUnixFdListFinishMethodInfo 
ResolvePromptMethod "callWithUnixFdListSync" o = DBusProxyCallWithUnixFdListSyncMethodInfo 
ResolvePromptMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolvePromptMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolvePromptMethod "getv" o = ObjectGetvMethodInfo 
ResolvePromptMethod "init" o = InitableInitMethodInfo 
ResolvePromptMethod "initAsync" o = AsyncInitableInitAsyncMethodInfo 
ResolvePromptMethod "initFinish" o = AsyncInitableInitFinishMethodInfo 
ResolvePromptMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolvePromptMethod "notify" o = ObjectNotifyMethodInfo 
ResolvePromptMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolvePromptMethod "perform" o = PromptPerformMethodInfo 
ResolvePromptMethod "performFinish" o = PromptPerformFinishMethodInfo 
ResolvePromptMethod "performSync" o = PromptPerformSyncMethodInfo 
ResolvePromptMethod "ref" o = ObjectRefMethodInfo 
ResolvePromptMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolvePromptMethod "run" o = PromptRunMethodInfo 
ResolvePromptMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolvePromptMethod "stealData" o = ObjectStealDataMethodInfo 
ResolvePromptMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolvePromptMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolvePromptMethod "unref" o = ObjectUnrefMethodInfo 
ResolvePromptMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolvePromptMethod "getCachedProperty" o = DBusProxyGetCachedPropertyMethodInfo 
ResolvePromptMethod "getCachedPropertyNames" o = DBusProxyGetCachedPropertyNamesMethodInfo 
ResolvePromptMethod "getConnection" o = DBusProxyGetConnectionMethodInfo 
ResolvePromptMethod "getData" o = ObjectGetDataMethodInfo 
ResolvePromptMethod "getDefaultTimeout" o = DBusProxyGetDefaultTimeoutMethodInfo 
ResolvePromptMethod "getFlags" o = DBusProxyGetFlagsMethodInfo 
ResolvePromptMethod "getInfo" o = DBusInterfaceGetInfoMethodInfo 
ResolvePromptMethod "getInterfaceInfo" o = DBusProxyGetInterfaceInfoMethodInfo 
ResolvePromptMethod "getInterfaceName" o = DBusProxyGetInterfaceNameMethodInfo 
ResolvePromptMethod "getName" o = DBusProxyGetNameMethodInfo 
ResolvePromptMethod "getNameOwner" o = DBusProxyGetNameOwnerMethodInfo 
ResolvePromptMethod "getObject" o = DBusInterfaceGetObjectMethodInfo 
ResolvePromptMethod "getObjectPath" o = DBusProxyGetObjectPathMethodInfo 
ResolvePromptMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolvePromptMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolvePromptMethod "setCachedProperty" o = DBusProxySetCachedPropertyMethodInfo 
ResolvePromptMethod "setData" o = ObjectSetDataMethodInfo 
ResolvePromptMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolvePromptMethod "setDefaultTimeout" o = DBusProxySetDefaultTimeoutMethodInfo 
ResolvePromptMethod "setInterfaceInfo" o = DBusProxySetInterfaceInfoMethodInfo 
ResolvePromptMethod "setObject" o = DBusInterfaceSetObjectMethodInfo 
ResolvePromptMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolvePromptMethod l o = MethodResolutionFailed l o :: Type 

perform

data PromptPerformMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe Text -> VariantType -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsPrompt a, IsCancellable b) => OverloadedMethod PromptPerformMethodInfo a signature Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethod :: a -> signature

OverloadedMethodInfo PromptPerformMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethodInfo :: Maybe ResolvedSymbolInfo

promptPerform Source #

Arguments

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

self: a prompt

-> Maybe Text

windowId: string form of XWindow id for parent window to be transient for

-> VariantType

returnType: the variant type of the prompt result

-> Maybe b

cancellable: optional cancellation object

-> Maybe AsyncReadyCallback

callback: called when the operation completes

-> m () 

Runs a prompt and performs the prompting.

Returns True if the prompt was completed and not dismissed.

If windowId is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the %d printf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.

This method will return immediately and complete asynchronously.

performFinish

data PromptPerformFinishMethodInfo Source #

Instances

Instances details
(signature ~ (b -> m GVariant), MonadIO m, IsPrompt a, IsAsyncResult b) => OverloadedMethod PromptPerformFinishMethodInfo a signature Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethod :: a -> signature

OverloadedMethodInfo PromptPerformFinishMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethodInfo :: Maybe ResolvedSymbolInfo

promptPerformFinish Source #

Arguments

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

self: a prompt

-> b

result: the asynchronous result passed to the callback

-> m GVariant

Returns: Nothing if the prompt was dismissed or an error occurred, a variant result if the prompt was successful (Can throw GError)

Complete asynchronous operation to run a prompt and perform 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.

performSync

data PromptPerformSyncMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe Text -> Maybe b -> VariantType -> m GVariant), MonadIO m, IsPrompt a, IsCancellable b) => OverloadedMethod PromptPerformSyncMethodInfo a signature Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethod :: a -> signature

OverloadedMethodInfo PromptPerformSyncMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethodInfo :: Maybe ResolvedSymbolInfo

promptPerformSync Source #

Arguments

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

self: a prompt

-> Maybe Text

windowId: string form of XWindow id for parent window to be transient for

-> Maybe b

cancellable: optional cancellation object

-> VariantType

returnType: the variant type of the prompt result

-> m GVariant

Returns: Nothing if the prompt was dismissed or an error occurred (Can throw GError)

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.

If windowId is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the %d printf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.

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

run

data PromptRunMethodInfo Source #

Instances

Instances details
(signature ~ (Maybe Text -> Maybe b -> VariantType -> m GVariant), MonadIO m, IsPrompt a, IsCancellable b) => OverloadedMethod PromptRunMethodInfo a signature Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethod :: a -> signature

OverloadedMethodInfo PromptRunMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Secret.Objects.Prompt

Methods

overloadedMethodInfo :: Maybe ResolvedSymbolInfo

promptRun Source #

Arguments

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

self: a prompt

-> Maybe Text

windowId: string form of XWindow id for parent window to be transient for

-> Maybe b

cancellable: optional cancellation object

-> VariantType

returnType: the variant type of the prompt result

-> m GVariant

Returns: Nothing if the prompt was dismissed or an error occurred (Can throw GError)

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.

If windowId is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the %d printf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.

This runs the dialog in a recursive mainloop. When run from a user interface thread, this means the user interface will remain responsive. Care should be taken that appropriate user interface actions are disabled while running the prompt.