hueplusplus 1.2.0
Loading...
Searching...
No Matches
HueDeviceTypes.h
Go to the documentation of this file.
1
23#ifndef INCLUDE_HUEPLUSPLUS_HUEDEVICETYPES_H
24#define INCLUDE_HUEPLUSPLUS_HUEDEVICETYPES_H
25
26#include <memory>
27#include <string>
28
29#include "Light.h"
30
31namespace hueplusplus
32{
34{
35public:
39 LightFactory(const HueCommandAPI& commands, std::chrono::steady_clock::duration refreshDuration);
40
50 Light createLight(const nlohmann::json& lightState, int id, const std::shared_ptr<APICache>& baseCache = {});
51
52private:
59 ColorType getColorType(const nlohmann::json& lightState, bool hasCt) const;
60
61private:
62 HueCommandAPI commands;
63 std::chrono::steady_clock::duration refreshDuration;
64 std::shared_ptr<BrightnessStrategy> simpleBrightness;
65 std::shared_ptr<ColorTemperatureStrategy> simpleColorTemperature;
66 std::shared_ptr<ColorTemperatureStrategy> extendedColorTemperature;
67 std::shared_ptr<ColorHueStrategy> simpleColorHue;
68 std::shared_ptr<ColorHueStrategy> extendedColorHue;
69};
70} // namespace hueplusplus
71
72#endif
Definition HueCommandAPI.h:38
Definition HueDeviceTypes.h:34
Light createLight(const nlohmann::json &lightState, int id, const std::shared_ptr< APICache > &baseCache={})
Create a Light with the correct type from the JSON state.
Definition HueDeviceTypes.cpp:72
Class for Hue Light fixtures.
Definition Light.h:61
Namespace for the hueplusplus library.
Definition Action.h:28
ColorType
enum that specifies the color type of all HueLights
Definition Light.h:43