KFW Network Identity Manager (Beta 2)
[krb5.git] / src / windows / identity / kcreddb / credtype.h
1 /*\r
2  * Copyright (c) 2005 Massachusetts Institute of Technology\r
3  *\r
4  * Permission is hereby granted, free of charge, to any person\r
5  * obtaining a copy of this software and associated documentation\r
6  * files (the "Software"), to deal in the Software without\r
7  * restriction, including without limitation the rights to use, copy,\r
8  * modify, merge, publish, distribute, sublicense, and/or sell copies\r
9  * of the Software, and to permit persons to whom the Software is\r
10  * furnished to do so, subject to the following conditions:\r
11  *\r
12  * The above copyright notice and this permission notice shall be\r
13  * included in all copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
18  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
19  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
20  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
22  * SOFTWARE.\r
23  */\r
24 \r
25 /* $Id$ */\r
26 \r
27 #ifndef __KHIMAIRA_KCDB_CREDTYPE_H\r
28 #define __KHIMAIRA_KCDB_CREDTYPE_H \r
29 \r
30 /* credtype */\r
31 typedef struct kcdb_credtype_i_t {\r
32     kcdb_credtype ct;\r
33     khm_int32 refcount;\r
34     khm_int32 flags;\r
35 \r
36     struct kcdb_credtype_i_t * next;\r
37     struct kcdb_credtype_i_t * prev;\r
38 } kcdb_credtype_i;\r
39 \r
40 #define KCDB_CTI_FLAG_DELETED 8\r
41 \r
42 extern CRITICAL_SECTION cs_credtype;\r
43 extern kcdb_credtype_i * kcdb_credtypes;\r
44 extern kcdb_credtype_i ** kcdb_credtype_tbl;\r
45 \r
46 void kcdb_credtype_init(void);\r
47 void kcdb_credtype_exit(void);\r
48 void kcdb_credtype_check_and_delete(khm_int32 id);\r
49 khm_int32 kcdb_credtype_hold(kcdb_credtype_i * ict);\r
50 khm_int32 kcdb_credtype_release(kcdb_credtype_i * ict);\r
51 void kcdb_credtype_msg_completion(kmq_message * m);\r
52 void kcdb_credtype_post_message(khm_int32 op, kcdb_credtype * type);\r
53 khm_int32 kcdb_credtype_get_next_free_id(khm_int32 * id);\r
54 \r
55 #endif\r