BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
GWContextPoll.h
1 #pragma once
2 
3 #include <map>
4 
5 #include <Poco/Mutex.h>
6 
7 #include "server/GWMessageContext.h"
8 #include "util/Loggable.h"
9 
10 namespace BeeeOn {
11 
17 class GWContextPoll : public Loggable {
18 public:
19  virtual ~GWContextPoll();
20 
21  void insert(GWMessageContext::Ptr context);
22 
23  GWMessageContext::Ptr remove(const GlobalID &id);
24 
25  void clear();
26 
27 private:
28  std::map<GlobalID, GWMessageContext::Ptr> m_messages;
29  Poco::FastMutex m_mutex;
30 };
31 
32 }
GWContextPoll stores contexts of sent messages. This is used for messages that expects the answer...
Definition: GWContextPoll.h:17
Definition: GlobalID.h:10
Definition: Loggable.h:19