1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_IDL_COMMON_H 17 #define OHOS_IDL_COMMON_H 18 19 namespace OHOS { 20 namespace Idl { 21 constexpr const char *TAB = " "; 22 constexpr const char *TAG = "IDL-GEN"; 23 24 #ifndef __MINGW32__ 25 constexpr char SEPARATOR = '/'; 26 #else 27 constexpr char SEPARATOR = '\\'; 28 #endif 29 30 enum class SystemLevel { 31 INIT, 32 /** mini system */ 33 MINI, 34 /** lite system */ 35 LITE, 36 /** std system */ 37 FULL, 38 }; 39 40 enum class GenMode { 41 INIT, 42 /** generate hdi code of low mode, it is only supported by 'MINI' SystemLevel */ 43 LOW, 44 /** generate hdi code of pass through mode, it is only supported by 'LITE' or 'std' SystemLevel */ 45 PASSTHROUGH, 46 /** generate hdi code of ipc mode, it is only supported by 'std' SystemLevel */ 47 IPC, 48 /** generate hdi code of kernel mode, it is only supported by 'LITE' or 'std' SystemLevel */ 49 KERNEL 50 }; 51 52 enum class Language { 53 C, 54 CPP, 55 JAVA, 56 RUST, 57 TS, 58 }; 59 60 enum class InterfaceType { 61 HDI, 62 SA, 63 SM, 64 SM_UDS, 65 SAM, 66 SAM_SM, 67 SAM_UDS, 68 }; 69 70 } // namespace Idl 71 } // namespace OHOS 72 #endif // OHOS_IDL_COMMON_H 73