2 * Copyright (c) 2005,2006 Secure Endpoints Inc.
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 /* this cell was added because it was listed in the identity
61 #define DLGROW_FLAG_CONFIG 0x00000080
63 /* the subitem indexes for each data field */
64 enum afs_ncwnd_subitems
{
70 #define DLG_TOOLTIP_TIMER_ID 1
71 #define DLG_TOOLTIP_TIMEOUT 5000
73 typedef struct tag_afs_cred_list
{
79 typedef struct tag_afs_dlg_data
{
84 khm_int32 afs_enabled
;
90 /* list view state image indices */
92 int idx_existing_token
;
97 /* used with configuration dialogs */
98 khm_boolean config_dlg
;
99 khui_config_init_data cfg
;
103 #define AFS_DLG_ROW_ALLOC 4
106 afs_dlg_proc(HWND hwnd
,
112 afs_dlg_update_rows(HWND hwnd
, afs_dlg_data
* d
);
115 afs_cred_flush_rows(afs_cred_list
* l
);
118 afs_cred_free_rows(afs_cred_list
* l
);
121 afs_cred_assert_rows(afs_cred_list
* l
, int n
);
124 afs_cred_delete_row(afs_cred_list
* l
, int i
);
127 afs_cred_get_new_row(afs_cred_list
* l
);
130 afs_cred_add_cred_proc(khm_handle cred
, void * rock
);
133 afs_cred_get_context_creds(afs_cred_list
*l
,
134 khui_action_context
* ctx
);
137 afs_cred_get_identity_creds(afs_cred_list
* l
,
139 khm_boolean
* enabled
);
142 afs_cred_write_ident_data(afs_dlg_data
* d
);
145 afs_msg_newcred(khm_int32 msg_subtype
,