Device.h 658 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef DEVICE_DEVICE_H
  2. #define DEVICE_DEVICE_H
  3. #include <mutex>
  4. #include <string>
  5. namespace PresenceDetection {
  6. namespace Device {
  7. class Device
  8. {
  9. public:
  10. Device(int id, const std::string& wifiMacAddress, const std::string& bluetoothAddress);
  11. ~Device();
  12. Device(const Device& other);
  13. int ID() const;
  14. std::string WifiMacAddress() const;
  15. std::string BluetoothMacAddress() const;
  16. bool Online() const;
  17. void Online(bool online);
  18. private:
  19. int m_id;
  20. std::string m_wifiMacAddress;
  21. std::string m_bluetoothMacAddress;
  22. mutable std::mutex m_mutex;
  23. bool m_online;
  24. };
  25. } // namespace Device
  26. } // namespace PresenceDetection
  27. #endif // DEVICE_DEVICE_H