BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
DeviceCache.h
1 #pragma once
2 
3 #include <set>
4 
5 #include <Poco/SharedPtr.h>
6 
7 #include "model/DeviceID.h"
8 #include "model/DevicePrefix.h"
9 
10 namespace BeeeOn {
11 
17 class DeviceCache {
18 public:
19  typedef Poco::SharedPtr<DeviceCache> Ptr;
20 
21  virtual ~DeviceCache();
22 
29  virtual void markPaired(
30  const DevicePrefix &prefix,
31  const std::set<DeviceID> &devices) = 0;
32 
36  virtual void markPaired(const DeviceID &device) = 0;
37 
41  virtual void markUnpaired(const DeviceID &device) = 0;
42 
46  virtual bool paired(const DeviceID &id) const = 0;
47 
51  virtual std::set<DeviceID> paired(const DevicePrefix &prefix) const = 0;
52 };
53 
54 }
virtual void markUnpaired(const DeviceID &device)=0
virtual void markPaired(const DevicePrefix &prefix, const std::set< DeviceID > &devices)=0
DeviceCache manages pairing status devices which allows to choose different caching strategies like: ...
Definition: DeviceCache.h:17
Definition: DeviceID.h:17
virtual bool paired(const DeviceID &id) const =0