git-svn-id: https://profuse.googlecode.com/svn/branches/v2@97 aa027e90-d47c-11dd-86d7-074df07e0730

This commit is contained in:
ksherlock 2009-11-23 03:19:38 +00:00
parent 8090387723
commit f8ddc09a70
4 changed files with 30 additions and 0 deletions

View File

@ -20,6 +20,8 @@ public:
virtual bool readOnly() = 0;
virtual void sync() = 0;
virtual unsigned blocks();
void zeroBlock(unsigned block);
};

View File

@ -15,6 +15,22 @@ void Buffer::push16le(uint16_t x)
_buffer.push_back((x >> 8) & 0xff);
}
void Buffer::push24be(uint32_t x)
{
_buffer.push_back((x >> 16) & 0xff);
_buffer.push_back((x >> 8) & 0xff);
_buffer.push_back(x & 0xff);
}
void Buffer::push24le(uint32_t x)
{
_buffer.push_back(x & 0xff);
_buffer.push_back((x >> 8) & 0xff);
_buffer.push_back((x >> 16) & 0xff);
}
void Buffer::push32be(uint32_t x)
{
_buffer.push_back((x >> 24) & 0xff);

View File

@ -21,6 +21,10 @@ public:
void push16be(uint16_t);
void push16le(uint16_t);
void push24be(uint32_t);
void push24le(uint32_t);
void push32be(uint32_t);
void push32le(uint32_t);

View File

@ -25,6 +25,7 @@ enum Access {
};
enum StorageType {
DeletedFile = 0x00,
SeedlingFile = 0x01,
SaplingFile = 0x02,
TreeFile = 0x03,
@ -166,6 +167,13 @@ private:
class FileEntry : public Entry {
public:
unsigned fileType() const { return _fileType; }
unsigned auxType() const { return _auxType; }
unsigned blocksUsed() const { return _blocksUsed; }
unsigned eof() const { return _eof; }
DateTime creation() const { return _creation; }
DateTime modification() const { return _modification; }
private:
unsigned _fileType;