#ifndef BLUETOOTH_DEVICE_H #define BLUETOOTH_DEVICE_H #include "Util/DynamicDevice.h" #include "Util/StaticDevice.h" #include #include #include #include namespace PresenceDetection { namespace Bluetooth { class Device { public: Device(int timeout, const std::string& inventoryURL, const std::string& target, const std::vector& staticDevices); ~Device(); void Start(); void Stop(); void Wait(); private: void ClearDevices(); void UpdateDevicesFromInventory(); void UpdatePresentDevices(); void SendStateChange(bool present, const std::string& macAddress); private: Timer::Timer m_deviceTimer; Timer::Timer m_inventoryTimer; Http::HttpClient m_httpClient; std::vector m_dynamicDevices; int m_timeout; int m_checkInterval; std::string m_inventoryURL; std::string m_target; std::vector m_staticDevices; std::vector m_presentDevices; }; } // namespace Bluetooth } // namespace PresenceDetection #endif // BLUETOOTH_DEVICE_H