00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef libuser_prompt_h
00020 #define libuser_prompt_h
00021
00024 #include <sys/types.h>
00025 #include <glib.h>
00026
00031 typedef struct lu_prompt {
00034 const char *key;
00036 const char *prompt;
00039 gboolean visible;
00041 const char *default_value;
00043 char *value;
00045 void(*free_value)(char *);
00046 } lu_prompt_t;
00047
00048 typedef gboolean (lu_prompt_fn)(struct lu_prompt *prompts,
00049 int count,
00050 gpointer callback_data,
00051 struct lu_error **error);
00052 gboolean lu_prompt_console(struct lu_prompt *prompts,
00053 int count, gpointer callback_data,
00054 struct lu_error **error);
00055 gboolean lu_prompt_console_quiet(struct lu_prompt *prompts,
00056 int count, gpointer callback_data,
00057 struct lu_error **error);
00058
00059 #endif