1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef OHOS_HDI_COMMON_H 10 #define OHOS_HDI_COMMON_H 11 12 namespace OHOS { 13 namespace HDI { 14 constexpr const char *TAB = " "; 15 constexpr const char *TAG = "HDI-GEN"; 16 17 #ifndef __MINGW32__ 18 constexpr char SEPARATOR = '/'; 19 #else 20 constexpr char SEPARATOR = '\\'; 21 #endif 22 23 constexpr const char *MAX_BUFF_SIZE_MACRO = "HDI_BUFF_MAX_SIZE"; 24 constexpr const char *MAX_BUFF_SIZE_VALUE = "1024 * 200"; // 200KB 25 constexpr const char *CHECK_VALUE_RETURN_MACRO = "HDI_CHECK_VALUE_RETURN"; 26 constexpr const char *CHECK_VALUE_RET_GOTO_MACRO = "HDI_CHECK_VALUE_RET_GOTO"; 27 28 enum class SystemLevel { 29 /** mini system */ 30 MINI, 31 /** lite system */ 32 LITE, 33 /** std system */ 34 FULL, 35 }; 36 37 enum class GenMode { 38 /** generate hdi code of low mode, it is only supported by 'MINI' SystemLevel */ 39 LOW, 40 /** generate hdi code of pass through mode, it is only supported by 'LITE' or 'std' SystemLevel */ 41 PASSTHROUGH, 42 /** generate hdi code of ipc mode, it is only supported by 'std' SystemLevel */ 43 IPC, 44 /** generate hdi code of kernel mode, it is only supported by 'LITE' or 'std' SystemLevel */ 45 KERNEL, 46 }; 47 48 enum class Language { 49 C, 50 CPP, 51 JAVA, 52 }; 53 } // namespace HDI 54 } // namespace OHOS 55 #endif // OHOS_HDI_COMMON_H 56