Alexander Koskovich | 5bee99d | 2021-08-01 21:40:55 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * SPDX-License-Identifier: Apache-2.0 |
| 4 | */ |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <aidl/android/hardware/light/BnLights.h> |
| 9 | #include <hardware/hardware.h> |
| 10 | #include <hardware/lights.h> |
| 11 | #include <map> |
| 12 | |
| 13 | namespace aidl { |
| 14 | namespace android { |
| 15 | namespace hardware { |
| 16 | namespace light { |
| 17 | |
| 18 | class Lights : public BnLights { |
| 19 | public: |
| 20 | Lights(); |
| 21 | ndk::ScopedAStatus setLightState(int id, const HwLightState& state) override; |
| 22 | ndk::ScopedAStatus getLights(std::vector<HwLight>* types) override; |
| 23 | |
| 24 | private: |
| 25 | std::map<int, light_device_t*> mLights; |
| 26 | std::vector<HwLight> mAvailableLights; |
| 27 | int maxLights; |
| 28 | }; |
| 29 | |
| 30 | } // namespace light |
| 31 | } // namespace hardware |
| 32 | } // namespace android |
| 33 | } // namespace aidl |