blob: 3d0cac5a6af80f5c21dce12516a24d1f13b7e241 [file] [log] [blame]
Alexander Koskovich5bee99d2021-08-01 21:40:55 -07001/*
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
13namespace aidl {
14namespace android {
15namespace hardware {
16namespace light {
17
18class 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