xref: /freebsd/crypto/krb5/src/ccapi/server/ccs_types.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 /* ccapi/server/ccs_types.h */
2 /*
3  * Copyright 2006, 2007 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 CCS_TYPES_H
27 #define CCS_TYPES_H
28 
29 #ifdef WIN32
30 #pragma warning ( disable : 4068)
31 #endif
32 
33 #include "cci_types.h"
34 
35 struct cci_array_d;
36 
37 typedef struct cci_array_d *ccs_client_array_t;
38 
39 typedef struct cci_array_d *ccs_callback_array_t;
40 
41 typedef struct cci_array_d *ccs_callbackref_array_t;
42 
43 typedef struct cci_array_d *ccs_iteratorref_array_t;
44 
45 typedef struct cci_array_d *ccs_lock_array_t;
46 
47 #ifdef TARGET_OS_MAC
48 #pragma mark -
49 #endif
50 
51 /* ccs_os_pipe_t is IPC-specific so it's special cased here */
52 
53 #if TARGET_OS_MAC
54 #include <mach/mach_types.h>
55 typedef mach_port_t ccs_pipe_t;  /* Mach IPC port */
56 #define CCS_PIPE_NULL MACH_PORT_NULL
57 
58 #else
59 
60 #ifdef WIN32
61 /* On Windows, a pipe is s struct: */
62 #include "ccs_win_pipe.h"
63 typedef struct ccs_win_pipe_t* ccs_pipe_t;
64 #define CCS_PIPE_NULL (ccs_pipe_t)NULL
65 
66 #else
67 typedef int ccs_pipe_t; /* Unix domain socket */
68 #define CCS_PIPE_NULL -1
69 
70 #endif
71 #endif
72 
73 #ifdef TARGET_OS_MAC
74 #pragma mark -
75 #endif
76 
77 struct ccs_callback_d;
78 typedef struct ccs_callback_d *ccs_callback_t;
79 
80 struct ccs_list_d;
81 struct ccs_list_iterator_d;
82 
83 /* Used for iterator array invalidate function */
84 typedef struct ccs_list_iterator_d *ccs_generic_list_iterator_t;
85 
86 typedef struct ccs_list_d *ccs_cache_collection_list_t;
87 
88 typedef struct ccs_list_d *ccs_ccache_list_t;
89 typedef struct ccs_list_iterator_d *ccs_ccache_list_iterator_t;
90 
91 typedef struct ccs_list_d *ccs_credentials_list_t;
92 typedef struct ccs_list_iterator_d *ccs_credentials_list_iterator_t;
93 
94 #ifdef TARGET_OS_MAC
95 #pragma mark -
96 #endif
97 
98 struct ccs_client_d;
99 typedef struct ccs_client_d *ccs_client_t;
100 
101 struct ccs_lock_d;
102 typedef struct ccs_lock_d *ccs_lock_t;
103 
104 struct ccs_lock_state_d;
105 typedef struct ccs_lock_state_d *ccs_lock_state_t;
106 
107 struct ccs_credentials_d;
108 typedef struct ccs_credentials_d *ccs_credentials_t;
109 
110 typedef ccs_credentials_list_iterator_t ccs_credentials_iterator_t;
111 
112 struct ccs_ccache_d;
113 typedef struct ccs_ccache_d *ccs_ccache_t;
114 
115 typedef ccs_ccache_list_iterator_t ccs_ccache_iterator_t;
116 
117 struct ccs_cache_collection_d;
118 typedef struct ccs_cache_collection_d *ccs_cache_collection_t;
119 
120 #endif /* CCS_TYPES_H */
121