* Even more cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30742 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -135,12 +135,16 @@ class Attribute : public DoublyLinkedListLinkImpl<Attribute> {
|
|||||||
Attribute(const char* name, type_code type);
|
Attribute(const char* name, type_code type);
|
||||||
~Attribute();
|
~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);
|
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 ReadAt(off_t offset, uint8* buffer,
|
||||||
status_t WriteAt(off_t offset, const uint8* buffer, size_t* _length);
|
size_t* _length);
|
||||||
|
status_t WriteAt(off_t offset, const uint8* buffer,
|
||||||
|
size_t* _length);
|
||||||
void Truncate();
|
void Truncate();
|
||||||
status_t SetSize(off_t size);
|
status_t SetSize(off_t size);
|
||||||
|
|
||||||
@@ -161,8 +165,9 @@ class Attribute : public DoublyLinkedListLinkImpl<Attribute> {
|
|||||||
|
|
||||||
class Inode {
|
class Inode {
|
||||||
public:
|
public:
|
||||||
Inode(Volume* volume, Inode* parent, const char* name, off_t start,
|
Inode(Volume* volume, Inode* parent,
|
||||||
off_t frames, int32 type);
|
const char* name, off_t start, off_t frames,
|
||||||
|
int32 type);
|
||||||
~Inode();
|
~Inode();
|
||||||
|
|
||||||
status_t InitCheck();
|
status_t InitCheck();
|
||||||
@@ -186,12 +191,14 @@ class Inode {
|
|||||||
off_t FrameCount() const
|
off_t FrameCount() const
|
||||||
{ return fFrameCount; }
|
{ return fFrameCount; }
|
||||||
off_t Size() const
|
off_t Size() const
|
||||||
{ return fFrameCount * kFrameSize /* + WAV header */; }
|
{ return fFrameCount * kFrameSize; }
|
||||||
|
// does not include the WAV header
|
||||||
|
|
||||||
Attribute* FindAttribute(const char* name) const;
|
Attribute* FindAttribute(const char* name) const;
|
||||||
status_t AddAttribute(Attribute* attribute, bool overwrite);
|
status_t AddAttribute(Attribute* attribute, bool overwrite);
|
||||||
status_t AddAttribute(const char* name, type_code type,
|
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,
|
status_t AddAttribute(const char* name, type_code type,
|
||||||
const char* string);
|
const char* string);
|
||||||
status_t AddAttribute(const char* name, type_code type,
|
status_t AddAttribute(const char* name, type_code type,
|
||||||
@@ -206,7 +213,8 @@ class Inode {
|
|||||||
AttributeList::ConstIterator Attributes() const
|
AttributeList::ConstIterator Attributes() const
|
||||||
{ return fAttributes.GetIterator(); }
|
{ return fAttributes.GetIterator(); }
|
||||||
|
|
||||||
const wav_header* WAVHeader() const { return &fWAVHeader; }
|
const wav_header* WAVHeader() const
|
||||||
|
{ return &fWAVHeader; }
|
||||||
|
|
||||||
Inode* Next() const { return fNext; }
|
Inode* Next() const { return fNext; }
|
||||||
void SetNext(Inode *inode) { fNext = inode; }
|
void SetNext(Inode *inode) { fNext = inode; }
|
||||||
|
|||||||
Reference in New Issue
Block a user