• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 OHOS_HDI_MOTION_V1_1_IMOTIONINTERFACE_VDI_H
17 #define OHOS_HDI_MOTION_V1_1_IMOTIONINTERFACE_VDI_H
18 
19 #include "hdf_load_vdi.h"
20 #include "imotion_callback_vdi.h"
21 
22 namespace OHOS {
23 namespace HDI {
24 namespace Motion {
25 namespace V1_1 {
26 
27 #define HDI_MOTION_VDI_LIBNAME "libhdi_motion_impl.z.so"
28 
29 class IMotionInterfaceVdi {
30 public:
31     virtual ~IMotionInterfaceVdi() = default;
32     virtual int32_t InitMotion();
33     virtual int32_t EnableMotion(int32_t motionType) = 0;
34     virtual int32_t DisableMotion(int32_t motionType) = 0;
35     virtual int32_t RegisterMotionCallback(const sptr<IMotionCallbackVdi> cb) = 0;
36     virtual int32_t UnregisterMotionCallback(const sptr<IMotionCallbackVdi> cb) = 0;
37     virtual int32_t SetMotionConfig(int32_t motionType, const std::vector<uint8_t>& data) = 0;
38 };
39 
40 struct WrapperMotionVdi {
41     struct HdfVdiBase base;
42     IMotionInterfaceVdi *motionModule;
43 };
44 } // V1_1
45 } // Motion
46 } // HDI
47 } // OHOS
48 
49 #endif // OHOS_HDI_MOTION_V1_1_IMOTIONINTERFACE_VDI_H
50