1 /* 2 * Copyright (c) 2022-2023 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 NAPI_CONSTANTS_H 17#define NAPI_CONSTANTS_H 18 19#include <cstddef> 20#include <string_view> 21 22namespace OHOS { 23namespace Msdp { 24namespace DeviceStatus { 25inline constexpr std::string_view COOPERATE_NAME { "cooperate" }; 26inline constexpr std::string_view COOPERATE_MESSAGE_NAME { "cooperateMessage" }; 27inline constexpr std::string_view COOPERATE_MOUSE_NAME { "cooperateMouse" }; 28inline constexpr std::string_view DRAG_TYPE { "drag" }; 29inline const std::string DEV_INPUT_PATH { "/dev/input/" }; 30inline constexpr std::string_view CALL_FUNCTION { "napi_call_function" }; 31inline constexpr std::string_view CREATE_OBJECT { "napi_create_object" }; 32inline constexpr std::string_view CREATE_INT32 { "napi_create_int32" }; 33inline constexpr std::string_view CREATE_REFERENCE { "napi_create_reference" }; 34inline constexpr std::string_view DEFINE_PROPERTIES { "napi_define_properties" }; 35inline constexpr std::string_view DEFINE_CLASS { "napi_define_class" }; 36inline constexpr std::string_view GET_CB_INFO { "napi_get_cb_info" }; 37inline constexpr std::string_view GET_GLOBAL { "napi_get_global" }; 38inline constexpr std::string_view GET_REFERENCE_VALUE { "napi_get_reference_value" }; 39inline constexpr std::string_view GET_UV_EVENT_LOOP { "napi_get_uv_event_loop" }; 40inline constexpr std::string_view GET_NAMED_PROPERTY { "napi_get_named_property" }; 41inline constexpr std::string_view HAS_NAMED_PROPERTY { "napi_has_named_property" }; 42inline constexpr std::string_view NEW_INSTANCE { "napi_new_instance" }; 43inline constexpr std::string_view SET_NAMED_PROPERTY { "napi_set_named_property" }; 44inline constexpr std::string_view STRICT_EQUALS { "napi_strict_equals" }; 45inline constexpr std::string_view TYPEOF { "napi_typeof" }; 46inline constexpr std::string_view UNWRAP { "napi_unwrap" }; 47inline constexpr std::string_view WRAP { "napi_wrap" }; 48inline constexpr std::string_view CREATE_STRING_UTF8 { "napi_create_string_utf8" }; 49inline constexpr std::string_view CREATE_ARRAY { "napi_create_array" }; 50inline constexpr std::string_view CREATE_INT64 { "napi_create_int64" }; 51inline constexpr std::string_view SET_ELEMENT { "napi_set_element" }; 52inline constexpr int32_t ZERO_PARAM { 0 }; 53inline constexpr int32_t ONE_PARAM { 1 }; 54inline constexpr int32_t TWO_PARAM { 2 }; 55inline constexpr int32_t THREE_PARAM { 3 }; 56} // namespace DeviceStatus 57} // namespace Msdp 58} // namespace OHOS 59#endif // NAPI_CONSTANTS_H