libcryfs/implementations/onblocks/BlobStoreOnBlocks.h

32 lines
790 B
C++

#pragma once
#ifndef BLOBSTORE_IMPLEMENTATIONS_BLOCKED_BLOBSTOREONBLOCKS_H_
#define BLOBSTORE_IMPLEMENTATIONS_BLOCKED_BLOBSTOREONBLOCKS_H_
#include "../../interface/BlobStore.h"
#include "messmer/blockstore/interface/BlockStore.h"
namespace blobstore {
namespace onblocks {
namespace cachingdatatreestore {
class CachingDataTreeStore;
}
class BlobStoreOnBlocks: public BlobStore {
public:
BlobStoreOnBlocks(std::unique_ptr<blockstore::BlockStore> blockStore, uint32_t blocksizeBytes);
virtual ~BlobStoreOnBlocks();
std::unique_ptr<Blob> create() override;
std::unique_ptr<Blob> load(const blockstore::Key &key) override;
void remove(std::unique_ptr<Blob> blob) override;
private:
std::unique_ptr<cachingdatatreestore::CachingDataTreeStore> _dataTreeStore;
};
}
}
#endif