blob: d178e75cbcf11db514b24e757c9ef1ecd0313bcf [file] [log] [blame]
Steven Moreland9f8b5c72016-11-29 15:03:38 -08001/*
2 * Copyright (C) 2016 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 */
Steven Moreland21a1c582017-02-15 10:54:01 -080016#ifndef ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H
17#define ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H
Steven Moreland08484f82016-10-14 12:27:48 -070018
Steven Moreland6f5459d2017-10-16 18:29:46 -070019#include <android/hardware/tests/extension/light/2.0/ILight.h>
Steven Moreland08484f82016-10-14 12:27:48 -070020#include <hidl/Status.h>
21
22#include <hidl/MQDescriptor.h>
23namespace android {
24namespace hardware {
Steven Moreland21a1c582017-02-15 10:54:01 -080025namespace tests {
Steven Moreland08484f82016-10-14 12:27:48 -070026namespace extension {
27namespace light {
28namespace V2_0 {
29namespace implementation {
30
Steven Moreland6f5459d2017-10-16 18:29:46 -070031using ::android::hardware::tests::extension::light::V2_0::LightState;
32using ::android::hardware::tests::extension::light::V2_0::ILight;
33// If using a minor version upgrade, we could just reference these as
34// V2_0::LightState vs. V2_1::LightState, but this makes things easier.
35using OldLightState = ::android::hardware::light::V2_0::LightState;
Steven Moreland08484f82016-10-14 12:27:48 -070036using ::android::hardware::light::V2_0::Status;
37using ::android::hardware::light::V2_0::Type;
38using ::android::hardware::Return;
39using ::android::hardware::Void;
40using ::android::hardware::hidl_vec;
Steven Moreland08484f82016-10-14 12:27:48 -070041using ::android::sp;
42
Steven Moreland6f5459d2017-10-16 18:29:46 -070043struct Light : public ILight {
Steven Moreland08484f82016-10-14 12:27:48 -070044 // Methods from ::android::hardware::light::V2_0::ILight follow.
Steven Moreland6f5459d2017-10-16 18:29:46 -070045 Return<Status> setLight(Type type, const OldLightState& state) override;
Steven Moreland08484f82016-10-14 12:27:48 -070046 Return<void> getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
47
48 // Methods from ::android::hardware::example::extension::light::V2_0::ILight follow.
Steven Moreland6f5459d2017-10-16 18:29:46 -070049 Return<Status> setLightExt(Type type, const LightState& state) override;
Steven Moreland08484f82016-10-14 12:27:48 -070050};
51
52} // namespace implementation
53} // namespace V2_0
54} // namespace light
55} // namespace extension
Steven Moreland21a1c582017-02-15 10:54:01 -080056} // namespace tests
Steven Moreland08484f82016-10-14 12:27:48 -070057} // namespace hardware
58} // namespace android
59
Steven Moreland21a1c582017-02-15 10:54:01 -080060#endif // ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H