blob: 14e7292b436539fa10b174c67ba3ab7c6c248bdc [file] [log] [blame]
Steven Morelandd44007e2019-10-24 18:12:46 -07001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <aidl/android/hardware/vibrator/BnVibrator.h>
20
21namespace aidl {
22namespace android {
23namespace hardware {
24namespace vibrator {
25
26class Vibrator : public BnVibrator {
27 ndk::ScopedAStatus getCapabilities(int32_t* _aidl_return) override;
28 ndk::ScopedAStatus off() override;
29 ndk::ScopedAStatus on(int32_t timeoutMs,
30 const std::shared_ptr<IVibratorCallback>& callback) override;
31 ndk::ScopedAStatus perform(Effect effect, EffectStrength strength,
32 const std::shared_ptr<IVibratorCallback>& callback,
33 int32_t* _aidl_return) override;
Steven Moreland2932b222019-11-05 14:30:17 -080034 ndk::ScopedAStatus getSupportedEffects(std::vector<Effect>* _aidl_return) override;
Steven Morelandd44007e2019-10-24 18:12:46 -070035 ndk::ScopedAStatus setAmplitude(int32_t amplitude) override;
36 ndk::ScopedAStatus setExternalControl(bool enabled) override;
37};
38
39} // namespace vibrator
40} // namespace hardware
41} // namespace android
42} // namespace aidl