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 SENSOR_SYSTEM_JS_H 16 #define SENSOR_SYSTEM_JS_H 17 #include "napi/native_api.h" 18 #include "napi/native_node_api.h" 19 namespace OHOS { 20 namespace Sensors { 21 napi_value SubscribeAccelerometer(napi_env env, napi_callback_info info); 22 napi_value UnsubscribeAccelerometer(napi_env env, napi_callback_info info); 23 napi_value SubscribeCompass(napi_env env, napi_callback_info info); 24 napi_value UnsubscribeCompass(napi_env env, napi_callback_info info); 25 napi_value SubscribeProximity(napi_env env, napi_callback_info info); 26 napi_value UnsubscribeProximity(napi_env env, napi_callback_info info); 27 napi_value SubscribeLight(napi_env env, napi_callback_info info); 28 napi_value UnsubscribeLight(napi_env env, napi_callback_info info); 29 napi_value SubscribeStepCounter(napi_env env, napi_callback_info info); 30 napi_value UnsubscribeStepCounter(napi_env env, napi_callback_info info); 31 napi_value SubscribeBarometer(napi_env env, napi_callback_info info); 32 napi_value UnsubscribeBarometer(napi_env env, napi_callback_info info); 33 napi_value SubscribeHeartRate(napi_env env, napi_callback_info info); 34 napi_value UnsubscribeHeartRate(napi_env env, napi_callback_info info); 35 napi_value SubscribeOnBodyState(napi_env env, napi_callback_info info); 36 napi_value UnsubscribeOnBodyState(napi_env env, napi_callback_info info); 37 napi_value GetOnBodyState(napi_env env, napi_callback_info info); 38 napi_value SubscribeDeviceOrientation(napi_env env, napi_callback_info info); 39 napi_value UnsubscribeDeviceOrientation(napi_env env, napi_callback_info info); 40 napi_value SubscribeGyroscope(napi_env env, napi_callback_info info); 41 napi_value UnsubscribeGyroscope(napi_env env, napi_callback_info info); 42 napi_value SubscribeGravity(napi_env env, napi_callback_info info); 43 napi_value UnsubscribeGravity(napi_env env, napi_callback_info info); 44 napi_value SubscribeMagnetic(napi_env env, napi_callback_info info); 45 napi_value UnsubscribeMagnetic(napi_env env, napi_callback_info info); 46 napi_value SubscribeHall(napi_env env, napi_callback_info info); 47 napi_value UnsubscribeHall(napi_env env, napi_callback_info info); 48 } // namespace Sensors 49 } // namespace OHOS 50 #endif // SENSOR_SYSTEM_JS_H