StaticDevice.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef UTIL_STATICDEVICE_H
  2. #define UTIL_STATICDEVICE_H
  3. #include "ProbeableDevice.h"
  4. #include <string>
  5. namespace PresenceDetection {
  6. namespace Util {
  7. class StaticDevice : public ProbeableDevice
  8. {
  9. public:
  10. StaticDevice(const std::string& wifiMac, const std::string& bluetoothMac);
  11. StaticDevice(const StaticDevice &other);
  12. ~StaticDevice();
  13. virtual int ProbeCounter() const override;
  14. virtual void IncrementProbeCounter() override;
  15. virtual void ResetProbeCounter() override;
  16. bool HasWifiMac() const;
  17. std::string WifiMac() const;
  18. void SetWifiState(bool present);
  19. bool GetWifiState() const;
  20. bool HasBluetoothMac() const;
  21. std::string BluetoothMac() const;
  22. void SetBluetoothState(bool present);
  23. bool GetBluetoothState() const;
  24. bool HasOnlineURL() const;
  25. void SetOnlineURL(const std::string& url);
  26. std::string OnlineURL() const;
  27. bool HasWifiOnlineURL() const;
  28. void SetWifiOnlineURL(const std::string& url);
  29. std::string WifiOnlineURL() const;
  30. bool HasBluetoothOnlineURL() const;
  31. void SetBluetoothOnlineURL(const std::string& url);
  32. std::string BluetoothOnlineURL() const;
  33. bool HasOfflineURL() const;
  34. void SetOfflineURL(const std::string& url);
  35. std::string OfflineURL() const;
  36. bool HasWifiOfflineURL() const;
  37. void SetWifiOfflineURL(const std::string& url);
  38. std::string WifiOfflineURL() const;
  39. bool HasBluetoothOfflineURL() const;
  40. void SetBluetoothOfflineURL(const std::string& url);
  41. std::string BluetoothOfflineURL() const;
  42. private:
  43. int m_probeCounter;
  44. std::string m_wifiMac;
  45. bool m_wifiState;
  46. std::string m_bluetoothMac;
  47. bool m_bluetoothState;
  48. std::string m_onlineURL;
  49. std::string m_wifiOnlineURL;
  50. std::string m_bluetoothOnlineURL;
  51. std::string m_offlineURL;
  52. std::string m_wifiOfflineURL;
  53. std::string m_bluetoothOfflineURL;
  54. };
  55. } // namespace Util
  56. } // namespace PresenceDetection
  57. #endif // UTIL_STATICDEVICE_H