Device.h 1.6 KB

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