libcryfs/impl/FileBlock.h

29 lines
540 B
C
Raw Normal View History

2014-12-09 17:19:59 +01:00
#pragma once
#ifndef CRYFS_LIB_IMPL_FILEBLOCK_H_
#define CRYFS_LIB_IMPL_FILEBLOCK_H_
2015-02-17 01:02:15 +01:00
#include <messmer/blockstore/interface/Block.h>
2014-12-09 17:19:59 +01:00
#include <memory>
namespace cryfs {
class FileBlock {
public:
FileBlock(std::unique_ptr<blockstore::Block> block);
virtual ~FileBlock();
static bool IsFile(const blockstore::Block &block);
void InitializeEmptyFile();
private:
std::unique_ptr<blockstore::Block> _block;
unsigned char *magicNumber();
static const unsigned char *magicNumber(const blockstore::Block &block);
};
}
#endif