Top | ![]() |
![]() |
![]() |
![]() |
GcrSystemPrompterMode | mode | Read / Write / Construct Only |
GType * | prompt-type | Read / Write / Construct Only |
gboolean | prompting | Read |
This is a DBus service which is rarely implemented. Use GcrSystemPrompt to display system prompts.
The GcrSystemPrompter service responds to dbus requests to create system prompts and creates GcrPrompt type objects to display those prompts.
Pass the GType of the implementation of GcrPrompt to gcr_system_prompter_new()
.
GcrSystemPrompter * gcr_system_prompter_new (GcrSystemPrompterMode mode
,GType prompt_type
);
Create a new system prompter service. This prompter won't do anything unless you connect to its signals and show appropriate prompts.
If prompt_type
is zero, then the new-prompt signal must be handled and
return a valid prompt object implementing the GcrPrompt interface.
If prompt_type
is non-zero then the GType must implement the GcrPrompt
interface.
void gcr_system_prompter_register (GcrSystemPrompter *self
,GDBusConnection *connection
);
Register this system prompter on the DBus connection
.
This makes the prompter available for clients to call. The prompter will
remain registered until gcr_system_prompter_unregister()
is called, or the
prompter is unreferenced.
void gcr_system_prompter_unregister (GcrSystemPrompter *self
,gboolean wait
);
Unregister this system prompter on the DBus connection
.
The prompter must have previously been registered with gcr_system_prompter_register()
.
If wait
is set then this function will wait until all prompts have been closed
or cancelled. This is usually only used by tests.
GcrSystemPrompterMode
gcr_system_prompter_get_mode (GcrSystemPrompter *self
);
Get the mode for this prompter.
Most system prompters only display one prompt at a time and therefore
return GCR_SYSTEM_PROMPTER_SINGLE
.
GType
gcr_system_prompter_get_prompt_type (GcrSystemPrompter *self
);
Get the GType for prompts created by this prompter.
gboolean
gcr_system_prompter_get_prompting (GcrSystemPrompter *self
);
Get whether prompting or not.
struct GcrSystemPrompter;
A prompter used by implementations of system prompts.
struct GcrSystemPrompterClass { GObjectClass parent_class; /* signals */ GcrPrompt * (* new_prompt) (GcrSystemPrompter *self); };
The class for GcrSystemPrompter.
The mode for the system prompter. Most system prompters can only show
one prompt at a time and would use the GCR_SYSTEM_PROMPTER_SINGLE
mode.
“mode”
property“mode” GcrSystemPrompterMode
The mode for this prompter.
Most system prompters only display one prompt at a time and therefore
return GCR_SYSTEM_PROMPTER_SINGLE
.
Flags: Read / Write / Construct Only
Default value: GCR_SYSTEM_PROMPTER_SINGLE
“prompt-type”
property“prompt-type” GType *
The GType for prompts created by this prompter. This must be a GcrPrompt implementation.
Flags: Read / Write / Construct Only
Allowed values: GcrPrompt
“prompting”
property“prompting” gboolean
Whether the prompter is prompting or not.
Flags: Read
Default value: FALSE
“new-prompt”
signalGcrPrompt* user_function (GcrSystemPrompter *Returns, gpointer user_data)
Signal emitted to create a new prompt when needed.
The default implementation of this signal creates a prompt of the type
gcr_system_prompter_get_prompt_type()
.
Flags: Run Last