prompt

Name

prompt -- Sample prompter functions for use with the libuser library.

Synopsis



gboolean    lu_prompt_console               (struct lu_prompt *prompts,
                                             int count,
                                             gpointer callback_data,
                                             struct lu_error **error);
gboolean    lu_prompt_console_quiet         (struct lu_prompt *prompts,
                                             int count,
                                             gpointer callback_data,
                                             struct lu_error **error);

Description

prompt.h declares two predefined prompter functions which applications can use instead of providing their own. These should suffice for most command-line applications. Authors of graphical applications are encouraged to supply graphical implementations.

Details

lu_prompt_console ()

gboolean    lu_prompt_console               (struct lu_prompt *prompts,
                                             int count,
                                             gpointer callback_data,
                                             struct lu_error **error);

Prompts the user using a text console.

prompts :

An array of lu_prompt structures.

count :

The number of elements in the prompts array.

callback_data :

Ignored.

error :

The location to store error information in the event of an error.

Returns :

A gboolean indicating success or failure.


lu_prompt_console_quiet ()

gboolean    lu_prompt_console_quiet         (struct lu_prompt *prompts,
                                             int count,
                                             gpointer callback_data,
                                             struct lu_error **error);

Prompts the user using a text console. Unlike lu_prompt_console(), this function will not prompt users for a question for which the calling application or module supplies a default, and will simply return the default.

prompts :

An array of lu_prompt structures.

count :

The number of elements in the prompts array.

callback_data :

Ignored.

error :

The location to store error information in the event of an error.

Returns :

A gboolean indicating success or failure.