1 /* 2 * Copyright (c) 2022 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 #ifndef NAPI_CONSTANTS_H 16 #define NAPI_CONSTANTS_H 17 18 namespace OHOS { 19 namespace AppExecFwk { 20 namespace { 21 constexpr size_t ARGS_SIZE_ZERO = 0; 22 constexpr size_t ARGS_SIZE_ONE = 1; 23 constexpr size_t ARGS_SIZE_TWO = 2; 24 constexpr size_t ARGS_SIZE_THREE = 3; 25 constexpr size_t ARGS_SIZE_FOUR = 4; 26 constexpr size_t ARGS_SIZE_FIVE = 5; 27 28 constexpr size_t ARGS_POS_ZERO = 0; 29 constexpr size_t ARGS_POS_ONE = 1; 30 constexpr size_t ARGS_POS_TWO = 2; 31 constexpr size_t ARGS_POS_THREE = 3; 32 constexpr size_t ARGS_POS_FOUR = 4; 33 34 constexpr size_t NAPI_RETURN_ONE = 1; 35 constexpr size_t CALLBACK_PARAM_SIZE = 2; 36 37 constexpr const char* TYPE_NUMBER = "number"; 38 constexpr const char* TYPE_STRING = "string"; 39 constexpr const char* TYPE_OBJECT = "object"; 40 constexpr const char* TYPE_BOOLEAN = "boolean"; 41 constexpr const char* TYPE_FUNCTION = "function"; 42 constexpr const char* TYPE_ARRAY = "array"; 43 } 44 } 45 } 46 #endif