2020-11-11 08:18:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
|
|
|
namespace hex::prv {
|
|
|
|
|
|
|
|
class Provider {
|
|
|
|
public:
|
2020-11-11 08:28:44 +00:00
|
|
|
Provider() = default;
|
|
|
|
virtual ~Provider() = default;
|
2020-11-11 08:18:35 +00:00
|
|
|
|
|
|
|
virtual bool isAvailable() = 0;
|
|
|
|
virtual bool isReadable() = 0;
|
|
|
|
virtual bool isWritable() = 0;
|
|
|
|
|
|
|
|
virtual void read(u64 offset, void *buffer, size_t size) = 0;
|
|
|
|
virtual void write(u64 offset, void *buffer, size_t size) = 0;
|
|
|
|
virtual size_t getSize() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|