• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
22 namespace OHOS {
23 namespace Msdp {
24 namespace DeviceStatus {
25 constexpr std::string_view COOPERATE { "cooperate" };
26 constexpr std::string_view DRAG_TYPE { "drag" };
27 inline const std::string DEV_INPUT_PATH { "/dev/input/" };
28 inline constexpr std::string_view CALL_FUNCTION { "napi_call_function" };
29 inline constexpr std::string_view CREATE_OBJECT { "napi_create_object" };
30 inline constexpr std::string_view CREATE_INT32 { "napi_create_int32" };
31 inline constexpr std::string_view CREATE_REFERENCE { "napi_create_reference" };
32 inline constexpr std::string_view DEFINE_PROPERTIES { "napi_define_properties" };
33 inline constexpr std::string_view DEFINE_CLASS { "napi_define_class" };
34 inline constexpr std::string_view GET_CB_INFO { "napi_get_cb_info" };
35 inline constexpr std::string_view GET_GLOBAL { "napi_get_global" };
36 inline constexpr std::string_view GET_REFERENCE_VALUE { "napi_get_reference_value" };
37 inline constexpr std::string_view GET_UV_EVENT_LOOP { "napi_get_uv_event_loop" };
38 inline constexpr std::string_view GET_NAMED_PROPERTY { "napi_get_named_property" };
39 inline constexpr std::string_view HAS_NAMED_PROPERTY { "napi_has_named_property" };
40 inline constexpr std::string_view NEW_INSTANCE { "napi_new_instance" };
41 inline constexpr std::string_view SET_NAMED_PROPERTY { "napi_set_named_property" };
42 inline constexpr std::string_view STRICT_EQUALS { "napi_strict_equals" };
43 inline constexpr std::string_view TYPEOF { "napi_typeof" };
44 inline constexpr std::string_view UNWRAP { "napi_unwrap" };
45 inline constexpr std::string_view WRAP { "napi_wrap" };
46 inline constexpr std::string_view CREATE_STRING_UTF8 { "napi_create_string_utf8" };
47 constexpr int32_t ZERO_PARAM { 0 };
48 constexpr int32_t ONE_PARAM { 1 };
49 constexpr int32_t TWO_PARAM { 2 };
50 constexpr int32_t THREE_PARAM { 3 };
51 } // namespace DeviceStatus
52 } // namespace Msdp
53 } // namespace OHOS
54 #endif // NAPI_CONSTANTS_H