2 * Copyright (c) 2004 Massachusetts Institute of Technology
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 #ifndef __AFS_NEWCREDS_H
28 #define __AFS_NEWCREDS_H
30 typedef struct tag_afs_cred_row {
37 /* we checked whether this cell exists */
38 #define DLGROW_FLAG_CHECKED 0x00000001
40 /* cell was checked and was found to be valid */
41 #define DLGROW_FLAG_VALID 0x00000002
43 /* cell was deleted */
44 #define DLGROW_FLAG_DELETED 0x00000004
46 /* tokens obtained for cell */
47 #define DLGROW_FLAG_DONE 0x00000008
49 /* tokens for this cell already exist */
50 #define DLGROW_FLAG_EXISTS 0x00000010
52 /* tokens for this cell exist and is listed under a different
54 #define DLGROW_FLAG_NOTOWNED 0x00000020
56 /* tokens for this cell exist and are expired */
57 #define DLGROW_FLAG_EXPIRED 0x00000040
59 /* the subitem indexes for each data field */
60 enum afs_ncwnd_subitems {
66 #define DLG_TOOLTIP_TIMER_ID 1
67 #define DLG_TOOLTIP_TIMEOUT 5000
69 typedef struct tag_afs_cred_list {
75 typedef struct tag_afs_dlg_data {
80 khm_int32 afs_enabled;
86 /* list view state image indices */
88 int idx_existing_token;
93 /* used with configuration dialogs */
94 khm_boolean config_dlg;
95 khui_config_init_data cfg;
99 #define AFS_DLG_ROW_ALLOC 4
102 afs_dlg_proc(HWND hwnd,
108 afs_dlg_update_rows(HWND hwnd, afs_dlg_data * d);
111 afs_cred_flush_rows(afs_cred_list * l);
114 afs_cred_free_rows(afs_cred_list * l);
117 afs_cred_assert_rows(afs_cred_list * l, int n);
120 afs_cred_delete_row(afs_cred_list * l, int i);
123 afs_cred_get_new_row(afs_cred_list * l);
126 afs_cred_add_cred_proc(khm_handle cred, void * rock);
129 afs_cred_get_context_creds(afs_cred_list *l,
130 khui_action_context * ctx);
133 afs_cred_get_identity_creds(afs_cred_list * l,
135 khm_boolean * enabled);
138 afs_cred_write_ident_data(afs_dlg_data * d);
141 afs_msg_newcred(khm_int32 msg_subtype,