~hartmans/ubuntu/trusty/krb5/gss-infinite-loop

« back to all changes in this revision

Viewing changes to src/kim/lib/kim_ui_private.h

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-11-10 02:20:12 UTC
  • mfrom: (53.1.3 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131110022012-b8ojkqhcxos55kln
Tags: 1.11.3+dfsg-3ubuntu2
Add alternate dependency on libverto-libevent1 as that's the package
ABI name in ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* kim/lib/kim_ui_private.h */
2
 
/*
3
 
 * Copyright 2008 Massachusetts Institute of Technology.
4
 
 * All Rights Reserved.
5
 
 *
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.
10
 
 *
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.
24
 
 */
25
 
 
26
 
#ifndef KIM_UI_PRIVATE_H
27
 
#define KIM_UI_PRIVATE_H
28
 
 
29
 
#include <kim/kim.h>
30
 
 
31
 
enum kim_ui_type {
32
 
    kim_ui_type_gui_plugin,
33
 
    kim_ui_type_gui_builtin,
34
 
    kim_ui_type_cli,
35
 
    kim_ui_type_none
36
 
};
37
 
 
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
43
 
};
44
 
 
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;
49
 
    void *tcontext;
50
 
    kim_identity identity;
51
 
    kim_count prompt_count;
52
 
    kim_string password_to_save;
53
 
} kim_ui_context;
54
 
 
55
 
 
56
 
 
57
 
kim_error kim_ui_init (kim_ui_context *io_context);
58
 
 
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);
63
 
 
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);
68
 
 
69
 
krb5_error_code kim_ui_prompter (krb5_context  in_krb5_context,
70
 
                                 void         *in_context,
71
 
                                 const char   *in_name,
72
 
                                 const char   *in_banner,
73
 
                                 int           in_num_prompts,
74
 
                                 krb5_prompt   in_prompts[]);
75
 
 
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);
82
 
 
83
 
/* Helper function */
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,
87
 
                                   kim_error               in_error);
88
 
 
89
 
kim_error kim_ui_handle_error (kim_ui_context *in_context,
90
 
                               kim_identity    in_identity,
91
 
                               kim_error       in_error,
92
 
                               kim_string      in_error_message,
93
 
                               kim_string      in_error_description);
94
 
 
95
 
void kim_ui_free_string (kim_ui_context  *in_context,
96
 
                         char           **io_string);
97
 
 
98
 
kim_error kim_ui_fini (kim_ui_context *io_context);
99
 
 
100
 
#endif /* KIM_UI_PRIVATE_H */