Go to the documentation of this file. 16 #ifndef DEFINITIONS_H_ 17 #define DEFINITIONS_H_ 21 #define MCL_SIZE_MAX ((mcl_size_t) - 1) 24 #define MCL_NULL ((void *)0) 26 #define MCL_NULL_CHAR '\0' 27 #define MCL_NULL_CHAR_SIZE 1 33 #define DEFAULT_META_TYPE_SIZE 6 34 #define DEFAULT_PAYLOAD_TYPE_SIZE 20 35 #define DEFAULT_QUALITY_CODE_SIZE 9 36 #define DEFAULT_DATE_SIZE 23 37 #define DEFAULT_TIMESTAMP_SIZE 25 38 #define DEFAULT_ID_SIZE 37 39 #define DEFAULT_VALUES_COUNT 5 42 #define DEFAULT_VALUE_SIZE 11 44 #define MAXIMUM_HOST_NAME_LENGTH 256 45 #define MAXIMUM_PROXY_USER_NAME_LENGTH 32 46 #define MAXIMUM_PROXY_PASSWORD_LENGTH 32 47 #define MAXIMUM_PROXY_DOMAIN_LENGTH 256 48 #define MAXIMUM_USER_AGENT_LENGTH 512 51 #define MIN_HTTP_PAYLOAD_SIZE 400 54 #define DEFAULT_HTTP_PAYLOAD_SIZE 16384 57 #define DEFAULT_HTTP_REQUEST_TIMEOUT (300) 60 #define JWT_EXPIRATION_TIME 86400 62 #define MCL_FILE_EXCHANGE_ENABLED 1 64 #define MCL_ERROR_RETURN_POINTER(return_value, ...) \ 65 MCL_ERROR(__VA_ARGS__); \ 66 DEBUG_LEAVE("retVal = <%p>", (return_value)); \ 67 return (return_value); 69 #define MCL_ERROR_RETURN(return_value, ...) \ 70 MCL_ERROR(__VA_ARGS__); \ 71 DEBUG_LEAVE("retVal = <%d>", (return_value)); \ 72 return (return_value); 74 #define ASSERT(condition) \ 77 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 78 DEBUG_LEAVE("retVal = <%p>", MCL_NULL); \ 82 #define ASSERT_MESSAGE(condition, ...) \ 85 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 86 MCL_ERROR_RETURN_POINTER(MCL_NULL, __VA_ARGS__); \ 89 #define ASSERT_STATEMENT_MESSAGE(condition, statement, ...) \ 92 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 94 MCL_ERROR_RETURN_POINTER(MCL_NULL, __VA_ARGS__); \ 97 #define ASSERT_CODE(condition, return_code) \ 100 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 101 DEBUG_LEAVE("retVal = <%d>", (return_code)); \ 102 return (return_code); \ 105 #define ASSERT_CODE_MESSAGE(condition, return_code, ...) \ 108 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 109 MCL_ERROR_RETURN(return_code, __VA_ARGS__); \ 112 #define ASSERT_STATEMENT_CODE(condition, statement, return_code) \ 115 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 117 DEBUG_LEAVE("retVal = <%d>", (return_code)); \ 118 return (return_code); \ 121 #define ASSERT_STATEMENT_CODE_MESSAGE(condition, statement, return_code, ...) \ 124 MCL_ERROR_STRING("Assertion failed for condition = <" #condition ">."); \ 126 MCL_ERROR_RETURN(return_code, __VA_ARGS__); \ 129 #define ASSERT_NOT_NULL(argument) \ 130 if(MCL_NULL == argument) \ 132 MCL_ERROR_RETURN(MCL_TRIGGERED_WITH_NULL, "Null function argument (" #argument ")."); \ 135 #define STRING_CONSTANT(s) {s, sizeof(s)/sizeof(s[0]) - 1, MCL_STRING_NOT_COPY_NOT_DESTROY} 137 #endif //DEFINITIONS_H_