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 OHOS_HDI_VIBRATOR_V1_1_VIBRATORINTERFACEIMPL_H
17#define OHOS_HDI_VIBRATOR_V1_1_VIBRATORINTERFACEIMPL_H
18
19#include "ivibrator_interface_vdi.h"
20#include "ivibrator_type_vdi.h"
21
22namespace OHOS {
23namespace HDI {
24namespace Vibrator {
25namespace V1_1 {
26class VibratorInterfaceImpl : public IVibratorInterfaceVdi {
27public:
28    VibratorInterfaceImpl() {}
29    ~VibratorInterfaceImpl() {}
30    int32_t Init(void) override;
31    int32_t StartOnce(uint32_t duration) override;
32    int32_t Start(const std::string &effectType) override;
33    int32_t Stop(HdfVibratorModeVdi mode) override;
34    int32_t GetVibratorInfo(std::vector<HdfVibratorInfoVdi> &vibratorInfo) override;
35    int32_t EnableVibratorModulation(uint32_t duration, uint16_t intensity, int16_t frequency) override;
36    int32_t EnableCompositeEffect(const HdfCompositeEffectVdi& effect) override;
37    int32_t GetEffectInfo(const std::string &effectType, HdfEffectInfoVdi &effectInfo) override;
38    int32_t IsVibratorRunning(bool& state) override;
39    int32_t PlayHapticPattern(const HapticPaketVdi& pkgVdi) override;
40    int32_t GetHapticCapacity(HapticCapacityVdi& hapticCapacityVdi) override;
41    int32_t GetHapticStartUpTime(int32_t mode, int32_t& startUpTime) override;
42    int32_t StartByIntensity(const std::string& effectType, uint16_t intensity) override;
43};
44} // V1_1
45} // Vibrator
46} // HDI
47} // OHOS
48
49#endif // OHOS_HDI_VIBRATOR_V1_1_VIBRATORINTERFACEIMPL_H