* copy vendor drop to trunk
[lab.git] / Dev / utvpn / utvpn-unix-v101-7101-public / src / Mayaqua / cryptoki.h
1 /* cryptoki.h include file for PKCS #11. */\r
2 /* $Revision: 1.4 $ */\r
3 \r
4 /* License to copy and use this software is granted provided that it is\r
5  * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface\r
6  * (Cryptoki)" in all material mentioning or referencing this software.\r
7 \r
8  * License is also granted to make and use derivative works provided that\r
9  * such works are identified as "derived from the RSA Security Inc. PKCS #11\r
10  * Cryptographic Token Interface (Cryptoki)" in all material mentioning or \r
11  * referencing the derived work.\r
12 \r
13  * RSA Security Inc. makes no representations concerning either the \r
14  * merchantability of this software or the suitability of this software for\r
15  * any particular purpose. It is provided "as is" without express or implied\r
16  * warranty of any kind.\r
17  */\r
18 \r
19 /* This is a sample file containing the top level include directives\r
20  * for building Win32 Cryptoki libraries and applications.\r
21  */\r
22 \r
23 #ifndef ___CRYPTOKI_H_INC___\r
24 #define ___CRYPTOKI_H_INC___\r
25 \r
26 #pragma pack(push, cryptoki, 1)\r
27 \r
28 /* Specifies that the function is a DLL entry point. */\r
29 #define CK_IMPORT_SPEC __declspec(dllimport)\r
30 \r
31 /* Define CRYPTOKI_EXPORTS during the build of cryptoki libraries. Do\r
32  * not define it in applications.\r
33  */\r
34 #ifdef CRYPTOKI_EXPORTS\r
35 /* Specified that the function is an exported DLL entry point. */\r
36 #define CK_EXPORT_SPEC __declspec(dllexport) \r
37 #else\r
38 #define CK_EXPORT_SPEC CK_IMPORT_SPEC \r
39 #endif\r
40 \r
41 /* Ensures the calling convention for Win32 builds */\r
42 #define CK_CALL_SPEC __cdecl\r
43 \r
44 #define CK_PTR *\r
45 \r
46 #define CK_DEFINE_FUNCTION(returnType, name) \\r
47   returnType CK_EXPORT_SPEC CK_CALL_SPEC name\r
48 \r
49 #define CK_DECLARE_FUNCTION(returnType, name) \\r
50   returnType CK_EXPORT_SPEC CK_CALL_SPEC name\r
51 \r
52 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \\r
53   returnType CK_IMPORT_SPEC (CK_CALL_SPEC CK_PTR name)\r
54 \r
55 #define CK_CALLBACK_FUNCTION(returnType, name) \\r
56   returnType (CK_CALL_SPEC CK_PTR name)\r
57 \r
58 #ifndef NULL_PTR\r
59 #define NULL_PTR 0\r
60 #endif\r
61 \r
62 #include "pkcs11.h"\r
63 \r
64 #pragma pack(pop, cryptoki)\r
65 \r
66 #endif /* ___CRYPTOKI_H_INC___ */\r