1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 3 /* CMetrics 4 * ======== 5 * Copyright 2021 Eduardo Silva <eduardo@calyptia.com> 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 */ 19 20 #ifndef CMT_MPACK_UTILS_DEFS_H 21 #define CMT_MPACK_UTILS_DEFS_H 22 23 #define CMT_MPACK_SUCCESS 0 24 #define CMT_MPACK_INSUFFICIENT_DATA 1 25 #define CMT_MPACK_INVALID_ARGUMENT_ERROR 2 26 #define CMT_MPACK_ALLOCATION_ERROR 3 27 #define CMT_MPACK_CORRUPT_INPUT_DATA_ERROR 4 28 #define CMT_MPACK_CONSUME_ERROR 5 29 #define CMT_MPACK_ENGINE_ERROR 6 30 #define CMT_MPACK_PENDING_MAP_ENTRIES 7 31 #define CMT_MPACK_PENDING_ARRAY_ENTRIES 8 32 #define CMT_MPACK_UNEXPECTED_KEY_ERROR 9 33 #define CMT_MPACK_UNEXPECTED_DATA_TYPE_ERROR 10 34 #define CMT_MPACK_ERROR_CUTOFF 20 35 36 #define CMT_MPACK_MAX_ARRAY_ENTRY_COUNT 65535 37 #define CMT_MPACK_MAX_MAP_ENTRY_COUNT 10 38 #define CMT_MPACK_MAX_STRING_LENGTH 1024 39 40 #endif