8 #include "core/DeviceCache.h"
9 #include "util/Loggable.h"
33 void setCacheDir(
const std::string &path);
50 const std::set<DeviceID> &devices)
override;
107 Poco::Path m_cacheDir;
void markPaired(const DevicePrefix &prefix, const std::set< DeviceID > &devices) override
Synchronize the contents of $cacheDir/$prefix with the given set of devices.
void drop(const DeviceID &id) const
Remove file $cacheDir/$prefix/$id from the filesystem if it does exist. No exceptions should be throw...
Definition: FilesystemDeviceCache.cpp:56
void write(const DeviceID &id) const
Create file $cacheDir/$prefix/$id in the filesystem if it does not exist. No exceptions should be thr...
Definition: FilesystemDeviceCache.cpp:76
bool paired(const DeviceID &device) const override
Definition: FilesystemDeviceCache.cpp:167
DeviceCache manages pairing status devices which allows to choose different caching strategies like: ...
Definition: DeviceCache.h:17
FilesystemDeviceCache implements DeviceCache by creating and removing files inside a filesystem direc...
Definition: FilesystemDeviceCache.h:27
Poco::File locatePrefix(const DevicePrefix &prefix) const
Definition: FilesystemDeviceCache.cpp:27
bool decodeName(const std::string &name, DeviceID &id) const
Parse file name and try to decode it as it is a device ID. The result is given in the referenced para...
Definition: FilesystemDeviceCache.cpp:40
Definition: Loggable.h:19
Poco::File locateID(const DeviceID &id) const
Definition: FilesystemDeviceCache.cpp:33
Definition: DeviceID.h:17
void markUnpaired(const DeviceID &device) override
Remove file $cacheDir/$prefix/$id (if exists).
Definition: FilesystemDeviceCache.cpp:154