BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
AbstractHotplugMonitor.h
1 #pragma once
2 
3 #include <list>
4 #include <string>
5 
6 #include "hotplug/HotplugListener.h"
7 #include "util/Loggable.h"
8 
9 namespace BeeeOn {
10 
11 class HotplugEvent;
12 
13 class AbstractHotplugMonitor : protected Loggable {
14 public:
15  void registerListener(HotplugListener::Ptr listener);
16 
17 protected:
19 
20  void logEvent(const HotplugEvent &event, const std::string &action) const;
21  void fireAddEvent(const HotplugEvent &event);
22  void fireRemoveEvent(const HotplugEvent &event);
23  void fireChangeEvent(const HotplugEvent &event);
24  void fireMoveEvent(const HotplugEvent &event);
25 
26 private:
27  std::list<HotplugListener::Ptr> m_listeners;
28 };
29 
30 }
Definition: AbstractHotplugMonitor.h:13
Definition: HotplugEvent.h:10
Definition: Loggable.h:19