1
/* kim/lib/kim_ui_private.h */
3
* Copyright 2008 Massachusetts Institute of Technology.
6
* Export of this software from the United States of America may
7
* require a specific license from the United States Government.
8
* It is the responsibility of any person or organization contemplating
9
* export to obtain such a license before exporting.
11
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
12
* distribute this software and its documentation for any purpose and
13
* without fee is hereby granted, provided that the above copyright
14
* notice appear in all copies and that both that copyright notice and
15
* this permission notice appear in supporting documentation, and that
16
* the name of M.I.T. not be used in advertising or publicity pertaining
17
* to distribution of the software without specific, written prior
18
* permission. Furthermore if you modify this software you must label
19
* your software as modified software and not distribute it in such a
20
* fashion that it might be confused with the original M.I.T. software.
21
* M.I.T. makes no representations about the suitability of
22
* this software for any purpose. It is provided "as is" without express
23
* or implied warranty.
26
#ifndef KIM_UI_PRIVATE_H
27
#define KIM_UI_PRIVATE_H
32
kim_ui_type_gui_plugin,
33
kim_ui_type_gui_builtin,
38
enum kim_ui_error_type {
39
kim_ui_error_type_authentication,
40
kim_ui_error_type_change_password,
41
kim_ui_error_type_selection,
42
kim_ui_error_type_generic
45
/* declare struct on stack. Deep contents will be freed by kim_ui_fini. */
46
typedef struct kim_ui_context {
47
kim_boolean initialized;
48
enum kim_ui_type type;
50
kim_identity identity;
51
kim_count prompt_count;
52
kim_string password_to_save;
57
kim_error kim_ui_init (kim_ui_context *io_context);
59
kim_error kim_ui_enter_identity (kim_ui_context *in_context,
60
kim_options io_options,
61
kim_identity *out_identity,
62
kim_boolean *out_change_password);
64
kim_error kim_ui_select_identity (kim_ui_context *in_context,
65
kim_selection_hints io_hints,
66
kim_identity *out_identity,
67
kim_boolean *out_change_password);
69
krb5_error_code kim_ui_prompter (krb5_context in_krb5_context,
72
const char *in_banner,
74
krb5_prompt in_prompts[]);
76
kim_error kim_ui_change_password (kim_ui_context *in_context,
77
kim_identity in_identity,
78
kim_boolean in_old_password_expired,
79
char **out_old_password,
80
char **out_new_password,
81
char **out_verify_password);
84
kim_error kim_ui_handle_kim_error (kim_ui_context *in_context,
85
kim_identity in_identity,
86
enum kim_ui_error_type in_type,
89
kim_error kim_ui_handle_error (kim_ui_context *in_context,
90
kim_identity in_identity,
92
kim_string in_error_message,
93
kim_string in_error_description);
95
void kim_ui_free_string (kim_ui_context *in_context,
98
kim_error kim_ui_fini (kim_ui_context *io_context);
100
#endif /* KIM_UI_PRIVATE_H */