1 /*
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 */
16 #ifndef ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H
17 #define ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H
19 #include <android/hardware/tests/extension/light/2.0/ILight.h>
20 #include <hidl/Status.h>
22 #include <hidl/MQDescriptor.h>
23 namespace android {
24 namespace hardware {
25 namespace tests {
26 namespace extension {
27 namespace light {
28 namespace V2_0 {
29 namespace implementation {
31 using ::android::hardware::tests::extension::light::V2_0::LightState;
32 using ::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.
35 using OldLightState = ::android::hardware::light::V2_0::LightState;
36 using ::android::hardware::light::V2_0::Status;
37 using ::android::hardware::light::V2_0::Type;
38 using ::android::hardware::Return;
39 using ::android::hardware::Void;
40 using ::android::hardware::hidl_vec;
41 using ::android::sp;
43 struct Light : public ILight {
44 // Methods from ::android::hardware::light::V2_0::ILight follow.
45 Return<Status> setLight(Type type, const OldLightState& state) override;
46 Return<void> getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
48 // Methods from ::android::hardware::example::extension::light::V2_0::ILight follow.
49 Return<Status> setLightExt(Type type, const LightState& state) override;
50 };
52 } // namespace implementation
53 } // namespace V2_0
54 } // namespace light
55 } // namespace extension
56 } // namespace tests
57 } // namespace hardware
58 } // namespace android
60 #endif // ANDROID_HARDWARE_TESTS_EXTENSION_LIGHT_V2_0_LIGHT_H