Add Static Devices, Timeout and UniFi Port Directive
This commit is contained in:
+5
-1
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "Util/Device.h"
|
||||
#include "Util/Timer.h"
|
||||
#include "Util/HttpClient.h"
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Bluetooth {
|
||||
class Device
|
||||
{
|
||||
public:
|
||||
Device(const std::string& inventoryURL, const std::string& target);
|
||||
Device(int timeout, const std::string& inventoryURL, const std::string& target, const std::vector<Util::Device>& devices);
|
||||
~Device();
|
||||
|
||||
void Start();
|
||||
@@ -21,6 +22,7 @@ public:
|
||||
void Wait();
|
||||
|
||||
private:
|
||||
void ClearDevices();
|
||||
void UpdateDevicesFromInventory();
|
||||
void UpdatePresentDevices();
|
||||
void SendStateChange(bool present, const std::string& macAddress);
|
||||
@@ -32,8 +34,10 @@ private:
|
||||
|
||||
std::vector<std::string> m_devices;
|
||||
|
||||
int m_timeout;
|
||||
std::string m_inventoryURL;
|
||||
std::string m_target;
|
||||
std::vector<Util::Device> m_staticDevices;
|
||||
|
||||
std::vector<std::string> m_presentDevices;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user