6#ifndef MONGO_CRYPT_SUPPORT_H
7#define MONGO_CRYPT_SUPPORT_H
12#pragma push_macro("MONGO_API_CALL")
15#pragma push_macro("MONGO_API_IMPORT")
16#undef MONGO_API_IMPORT
18#pragma push_macro("MONGO_API_EXPORT")
19#undef MONGO_API_EXPORT
21#pragma push_macro("MONGO_CRYPT_SUPPORT_API")
22#undef MONGO_CRYPT_SUPPORT_API
25#define MONGO_API_CALL __cdecl
26#define MONGO_API_IMPORT __declspec(dllimport)
27#define MONGO_API_EXPORT __declspec(dllexport)
30#define MONGO_API_IMPORT __attribute__((visibility("default")))
31#define MONGO_API_EXPORT __attribute__((used, visibility("default")))
34#if defined(MONGO_CRYPT_SUPPORT_STATIC)
35#define MONGO_CRYPT_API
37#if defined(MONGO_CRYPT_SUPPORT_COMPILING)
38#define MONGO_CRYPT_API MONGO_API_EXPORT
40#define MONGO_CRYPT_API MONGO_API_IMPORT
70typedef struct mongo_crypt_v1_status mongo_crypt_v1_status;
79MONGO_CRYPT_API mongo_crypt_v1_status* MONGO_API_CALL mongo_crypt_v1_status_create(
void);
98MONGO_CRYPT_API
void MONGO_API_CALL mongo_crypt_v1_status_destroy(mongo_crypt_v1_status* status);
109 MONGO_CRYPT_V1_ERROR_IN_REPORTING_ERROR = -2,
110 MONGO_CRYPT_V1_ERROR_UNKNOWN = -1,
112 MONGO_CRYPT_V1_SUCCESS = 0,
114 MONGO_CRYPT_V1_ERROR_ENOMEM = 1,
115 MONGO_CRYPT_V1_ERROR_EXCEPTION = 2,
116 MONGO_CRYPT_V1_ERROR_LIBRARY_ALREADY_INITIALIZED = 3,
117 MONGO_CRYPT_V1_ERROR_LIBRARY_NOT_INITIALIZED = 4,
118 MONGO_CRYPT_V1_ERROR_INVALID_LIB_HANDLE = 5,
119 MONGO_CRYPT_V1_ERROR_REENTRANCY_NOT_ALLOWED = 6,
120} mongo_crypt_v1_error;
134MONGO_CRYPT_API
int MONGO_API_CALL
135mongo_crypt_v1_status_get_error(
const mongo_crypt_v1_status* status);
151MONGO_CRYPT_API
const char* MONGO_API_CALL
152mongo_crypt_v1_status_get_explanation(
const mongo_crypt_v1_status* status);
165MONGO_CRYPT_API
int MONGO_API_CALL
166mongo_crypt_v1_status_get_code(
const mongo_crypt_v1_status* status);
181typedef struct mongo_crypt_v1_lib mongo_crypt_v1_lib;
189MONGO_CRYPT_API mongo_crypt_v1_lib* MONGO_API_CALL
190mongo_crypt_v1_lib_create(mongo_crypt_v1_status* status);
207MONGO_CRYPT_API
int MONGO_API_CALL mongo_crypt_v1_lib_destroy(mongo_crypt_v1_lib* lib,
208 mongo_crypt_v1_status* status);
222MONGO_CRYPT_API uint64_t MONGO_API_CALL mongo_crypt_v1_get_version(
void);
231MONGO_CRYPT_API
const char* MONGO_API_CALL mongo_crypt_v1_get_version_str(
void);
244typedef struct mongo_crypt_v1_query_analyzer mongo_crypt_v1_query_analyzer;
253MONGO_CRYPT_API mongo_crypt_v1_query_analyzer* MONGO_API_CALL
254mongo_crypt_v1_query_analyzer_create(mongo_crypt_v1_lib* lib, mongo_crypt_v1_status* status);
265MONGO_CRYPT_API
void MONGO_API_CALL
266mongo_crypt_v1_query_analyzer_destroy(mongo_crypt_v1_query_analyzer* analyzer);
286MONGO_CRYPT_API uint8_t* MONGO_API_CALL
287mongo_crypt_v1_analyze_query(mongo_crypt_v1_query_analyzer* analyzer,
288 const uint8_t* documentBSON,
292 mongo_crypt_v1_status* status);
301MONGO_CRYPT_API
void MONGO_API_CALL mongo_crypt_v1_bson_free(uint8_t* bson);
307#undef MONGO_CRYPT_SUPPORT_API
308#pragma pop_macro("MONGO_CRYPT_SUPPORT_API")
310#undef MONGO_API_EXPORT
311#pragma push_macro("MONGO_API_EXPORT")
313#undef MONGO_API_IMPORT
314#pragma push_macro("MONGO_API_IMPORT")
317#pragma pop_macro("MONGO_API_CALL")