-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathDevices.h
57 lines (45 loc) · 1.3 KB
/
Devices.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <vector>
#include "BacklightDevice.h"
#include "IDumpable.h"
#include "LedDevice.h"
#include "RgbLedDevice.h"
#include "Utils.h"
namespace aidl {
namespace android {
namespace hardware {
namespace light {
class Devices : public IDumpable {
public:
Devices();
bool hasBacklightDevices() const;
bool hasButtonDevices() const;
bool hasKeyboardDevices() const;
bool hasNotificationDevices() const;
void setBacklightColor(rgb color);
void setButtonsColor(rgb color);
void setKeyboardColor(rgb color);
void setNotificationColor(rgb color, LightMode mode = LightMode::STATIC, uint32_t flashOnMs = 0,
uint32_t flashOffMs = 0);
void dump(int fd) const override;
private:
// Backlight
std::vector<BacklightDevice> mBacklightDevices;
std::vector<LedDevice> mBacklightLedDevices;
// Buttons
std::vector<LedDevice> mButtonLedDevices;
// Keyboard
std::vector<LedDevice> mKeyboardLedDevices;
// Notifications
std::vector<RgbLedDevice> mNotificationRgbLedDevices;
std::vector<LedDevice> mNotificationLedDevices;
};
} // namespace light
} // namespace hardware
} // namespace android
} // namespace aidl