IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
DataStorage.h
1#pragma once
2
3#include <memory>
4#include <string>
5
6#include <iolink/IOLinkAPI.h>
7#include <iolink/storage/RandomAccess.h>
8#include <iolink/storage/StreamAccess.h>
9
10namespace iolink
11{
12
17{
18 READ_ONLY = 0x1, // 0001
19 WRITE_ONLY = 0x2, // 0010
20 READ_WRITE = 0x3, // 0011
21};
22
26class IOLINK_INTERFACE_API DataStorage
27{
28public:
42 virtual std::shared_ptr<StreamAccess> openStreamAccess(const std::string& resourceId,
43 AccessCapabilities capabilities) = 0;
44
58 virtual std::shared_ptr<RandomAccess> openRandomAccess(const std::string& resourceId,
59 AccessCapabilities capabilities) = 0;
60
68 virtual const std::string& source() const = 0;
69};
70
71} // namespace iolink