* Even more cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30742 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -75,7 +75,7 @@ enum attr_mode {
|
||||
};
|
||||
|
||||
class Volume {
|
||||
public:
|
||||
public:
|
||||
Volume(fs_volume* fsVolume);
|
||||
~Volume();
|
||||
|
||||
@@ -105,7 +105,7 @@ class Volume {
|
||||
static void DetermineName(uint32 cddbId, int device, char* name,
|
||||
size_t length);
|
||||
|
||||
private:
|
||||
private:
|
||||
Inode* _CreateNode(Inode* parent, const char* name,
|
||||
off_t start, off_t frames, int32 type);
|
||||
int _OpenAttributes(int mode,
|
||||
@@ -131,16 +131,20 @@ class Volume {
|
||||
};
|
||||
|
||||
class Attribute : public DoublyLinkedListLinkImpl<Attribute> {
|
||||
public:
|
||||
public:
|
||||
Attribute(const char* name, type_code type);
|
||||
~Attribute();
|
||||
|
||||
status_t InitCheck() const { return fName != NULL ? B_OK : B_NO_MEMORY; }
|
||||
status_t InitCheck() const
|
||||
{ return fName != NULL ? B_OK : B_NO_MEMORY; }
|
||||
status_t SetTo(const char* name, type_code type);
|
||||
void SetType(type_code type) { fType = type; }
|
||||
void SetType(type_code type)
|
||||
{ fType = type; }
|
||||
|
||||
status_t ReadAt(off_t offset, uint8* buffer, size_t* _length);
|
||||
status_t WriteAt(off_t offset, const uint8* buffer, size_t* _length);
|
||||
status_t ReadAt(off_t offset, uint8* buffer,
|
||||
size_t* _length);
|
||||
status_t WriteAt(off_t offset, const uint8* buffer,
|
||||
size_t* _length);
|
||||
void Truncate();
|
||||
status_t SetSize(off_t size);
|
||||
|
||||
@@ -152,7 +156,7 @@ class Attribute : public DoublyLinkedListLinkImpl<Attribute> {
|
||||
bool IsProtectedNamespace();
|
||||
static bool IsProtectedNamespace(const char* name);
|
||||
|
||||
private:
|
||||
private:
|
||||
char* fName;
|
||||
type_code fType;
|
||||
uint8* fData;
|
||||
@@ -160,9 +164,10 @@ class Attribute : public DoublyLinkedListLinkImpl<Attribute> {
|
||||
};
|
||||
|
||||
class Inode {
|
||||
public:
|
||||
Inode(Volume* volume, Inode* parent, const char* name, off_t start,
|
||||
off_t frames, int32 type);
|
||||
public:
|
||||
Inode(Volume* volume, Inode* parent,
|
||||
const char* name, off_t start, off_t frames,
|
||||
int32 type);
|
||||
~Inode();
|
||||
|
||||
status_t InitCheck();
|
||||
@@ -186,12 +191,14 @@ class Inode {
|
||||
off_t FrameCount() const
|
||||
{ return fFrameCount; }
|
||||
off_t Size() const
|
||||
{ return fFrameCount * kFrameSize /* + WAV header */; }
|
||||
{ return fFrameCount * kFrameSize; }
|
||||
// does not include the WAV header
|
||||
|
||||
Attribute* FindAttribute(const char* name) const;
|
||||
status_t AddAttribute(Attribute* attribute, bool overwrite);
|
||||
status_t AddAttribute(const char* name, type_code type,
|
||||
bool overwrite, const uint8* data, size_t length);
|
||||
bool overwrite, const uint8* data,
|
||||
size_t length);
|
||||
status_t AddAttribute(const char* name, type_code type,
|
||||
const char* string);
|
||||
status_t AddAttribute(const char* name, type_code type,
|
||||
@@ -206,16 +213,17 @@ class Inode {
|
||||
AttributeList::ConstIterator Attributes() const
|
||||
{ return fAttributes.GetIterator(); }
|
||||
|
||||
const wav_header* WAVHeader() const { return &fWAVHeader; }
|
||||
const wav_header* WAVHeader() const
|
||||
{ return &fWAVHeader; }
|
||||
|
||||
Inode* Next() const { return fNext; }
|
||||
void SetNext(Inode *inode) { fNext = inode; }
|
||||
|
||||
private:
|
||||
private:
|
||||
Inode* fNext;
|
||||
ino_t fID;
|
||||
int32 fType;
|
||||
char *fName;
|
||||
char* fName;
|
||||
gid_t fGroupID;
|
||||
uid_t fUserID;
|
||||
time_t fCreationTime;
|
||||
@@ -228,7 +236,7 @@ class Inode {
|
||||
};
|
||||
|
||||
struct dir_cookie {
|
||||
Inode *current;
|
||||
Inode* current;
|
||||
int state; // iteration state
|
||||
};
|
||||
|
||||
@@ -241,13 +249,13 @@ enum {
|
||||
};
|
||||
|
||||
struct attr_cookie : DoublyLinkedListLinkImpl<attr_cookie> {
|
||||
Attribute *current;
|
||||
Attribute* current;
|
||||
};
|
||||
|
||||
struct file_cookie {
|
||||
int open_mode;
|
||||
off_t buffer_offset;
|
||||
void *buffer;
|
||||
void* buffer;
|
||||
};
|
||||
|
||||
static const uint32 kMaxAttributeSize = 65536;
|
||||
|
||||
Reference in New Issue
Block a user