Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru_constants_c.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2018 - 2019 Virtru Corporation
3 *
4 * SPDX - License - Identifier: MIT
5 *
6 */
7 //
8 // Virtru TDF3 SDK
9 //
10 // Created by Sujan Reddy on 2019/10/24.
11 //
12 
13 #ifndef VIRTRU_TDF3_SRC_VIRTRU_CONSTANTS_C_H
14 #define VIRTRU_TDF3_SRC_VIRTRU_CONSTANTS_C_H
15 
16 #define LogDefaultError() LogError("Default exception!");
17 
18 #if defined _WIN32 || defined WIN32 || defined _WINDOWS || defined __CYGWIN__
19  #ifdef _DLL
20  #ifdef __GNUC__
21  #define DLL_PUBLIC __attribute__ ((dllexport))
22  #else
23  #define DLL_PUBLIC __declspec(dllexport)
24  #endif
25  #else
26  #ifdef __GNUC__
27  #define DLL_PUBLIC __attribute__ ((dllimport))
28  #else
29  #define DLL_PUBLIC __declspec(dllimport)
30  #endif
31  #endif
32  #define DLL_LOCAL
33 #else
34  #if __GNUC__ >= 4
35  #define DLL_PUBLIC __attribute__ ((visibility ("default")))
36  #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
37  #else
38  #define DLL_PUBLIC
39  #define DLL_LOCAL
40  #endif
41 #endif
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 // Status code
48 typedef enum {
50  VSTATUS_FAILURE = 1, // Generic failure
51  VSTATUS_INVALID_PARAMS = 2 // Check the input parameters if they are valid.
52 } VSTATUS;
53 
54 // TDF Protocol
55 typedef enum {
58 } VProtocol;
59 
61 typedef enum {
68 } VLogLevel;
69 
70 // Virtru client opaque object.
71 typedef void* VClientPtr;
72 
73 // Encrypt file params opaque object.
74 typedef void* VEncryptFileParamsPtr;
75 
76 // Encrypt string params opaque object.
78 
79 // Policy opaque object.
80 typedef void* VPolicyPtr;
81 
82 typedef unsigned char* VBytesPtr;
83 typedef const unsigned char* VCBytesPtr;
84 typedef unsigned int VBytesLength;
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif //VIRTRU_TDF3_SRC_VIRTRU_CONSTANTS_C_H
unsigned char * VBytesPtr
Definition: virtru_constants_c.h:82
Definition: virtru_constants_c.h:50
VSTATUS
Definition: virtru_constants_c.h:48
Definition: virtru_constants_c.h:57
void * VClientPtr
Definition: virtru_constants_c.h:71
Least detailed output.
Definition: virtru_constants_c.h:67
unsigned int VBytesLength
Definition: virtru_constants_c.h:84
const unsigned char * VCBytesPtr
Definition: virtru_constants_c.h:83
Definition: virtru_constants_c.h:49
Definition: virtru_constants_c.h:65
void * VPolicyPtr
Definition: virtru_constants_c.h:80
Definition: virtru_constants_c.h:62
Definition: virtru_constants_c.h:51
Definition: virtru_constants_c.h:66
VProtocol
Definition: virtru_constants_c.h:55
Definition: virtru_constants_c.h:64
void * VEncryptFileParamsPtr
Definition: virtru_constants_c.h:74
Definition: virtru_constants_c.h:56
VLogLevel
Defines a log level.
Definition: virtru_constants_c.h:61
Most detailed output.
Definition: virtru_constants_c.h:63
void * VEncryptStringParamsPtr
Definition: virtru_constants_c.h:77