Top |
Properties
GcrSystemPrompterMode | mode | Read / Write / Construct Only |
GType * | prompt-type | Read / Write / Construct Only |
gboolean | prompting | Read |
Description
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()
.
Functions
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.
gcr_system_prompter_register ()
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.
gcr_system_prompter_unregister ()
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.
gcr_system_prompter_get_mode ()
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
.
gcr_system_prompter_get_prompt_type ()
GType
gcr_system_prompter_get_prompt_type (GcrSystemPrompter *self
);
Get the GType for prompts created by this prompter.
The returned GType will be a GcrPrompt implementation.
gcr_system_prompter_get_prompting ()
gboolean
gcr_system_prompter_get_prompting (GcrSystemPrompter *self
);
Get whether prompting or not.
Types and Values
struct GcrSystemPrompter
struct GcrSystemPrompter;
A prompter used by implementations of system prompts.
struct GcrSystemPrompterClass
struct GcrSystemPrompterClass { GObjectClass parent_class; /* signals */ GcrPrompt * (* new_prompt) (GcrSystemPrompter *self); };
The class for GcrSystemPrompter.
enum GcrSystemPrompterMode
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.
Property Details
The “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
The “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
Signal Details
The “new-prompt”
signal
GcrPrompt* 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