hueplusplus 1.2.0
Loading...
Searching...
No Matches
NewDeviceList.h
Go to the documentation of this file.
1
22#ifndef INCLUDE_HUEPLUSPLUS_NEW_DEVICE_LIST_H
23#define INCLUDE_HUEPLUSPLUS_NEW_DEVICE_LIST_H
24
25#include <map>
26#include <string>
27
28#include "TimePattern.h"
29
30#include <nlohmann/json.hpp>
31
32namespace hueplusplus
33{
36{
37public:
39 NewDeviceList(const std::string& lastScan, const std::map<int, std::string>& devices);
40
42 const std::map<int, std::string>& getNewDevices() const;
43
48 bool hasLastScanTime() const;
52 bool isScanActive();
57
61 static NewDeviceList parse(const nlohmann::json& json);
62
63private:
64 std::string lastScan;
65 std::map<int, std::string> devices;
66};
67} // namespace hueplusplus
68
69#endif
List of new devices found during the last scan.
Definition NewDeviceList.h:36
time::AbsoluteTime getLastScanTime() const
Get time when last scan was completed.
Definition NewDeviceList.cpp:41
static NewDeviceList parse(const nlohmann::json &json)
Parse from json response.
Definition NewDeviceList.cpp:45
bool hasLastScanTime() const
Get whether a last scan time is available.
Definition NewDeviceList.cpp:33
bool isScanActive()
Get whether scan is currently active.
Definition NewDeviceList.cpp:37
const std::map< int, std::string > & getNewDevices() const
Get a map of id and name of new devices.
Definition NewDeviceList.cpp:29
One-time, absolute time point.
Definition TimePattern.h:73
Namespace for the hueplusplus library.
Definition Action.h:28