1/*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef SUPER_BLOCK_H
6#define SUPER_BLOCK_H
7
8
9#include "checksumfs.h"
10
11
12class Volume;
13
14
15struct SuperBlock : private checksumfs_super_block {
16public:
17			uint64				TotalBlocks() const		{ return totalBlocks; }
18			uint64				FreeBlocks() const		{ return freeBlocks; }
19			uint32				Version() const			{ return version; }
20			const char*			Name() const			{ return name; }
21			uint64				BlockBitmap() const		{ return blockBitmap; }
22			uint64				RootDirectory() const	{ return rootDir; }
23
24			bool				Check(uint64 totalBlocks) const;
25			void				Initialize(Volume* volume);
26
27			void				SetFreeBlocks(uint64 count);
28			void				SetName(const char* name);
29};
30
31
32#endif	// SUPER_BLOCK_H
33