Moved the definition of the Descriptor class to vfs.cpp.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4563 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-09-08 12:32:33 +00:00
parent 15832d7b04
commit eced90ea7a
2 changed files with 23 additions and 22 deletions
-22
View File
@@ -46,28 +46,6 @@ class ConsoleNode : public Node {
virtual ssize_t Write(const void *buffer, size_t bufferSize);
};
class Descriptor {
public:
Descriptor(Node *node, void *cookie);
~Descriptor();
ssize_t Read(off_t pos, void *buffer, size_t bufferSize);
ssize_t Read(void *buffer, size_t bufferSize);
ssize_t Write(off_t pos, const void *buffer, size_t bufferSize);
ssize_t Write(const void *buffer, size_t bufferSize);
off_t Offset() const { return fOffset; }
int32 RefCount() const { return fRefCount; }
status_t Acquire();
status_t Release();
private:
Node *fNode;
void *fCookie;
off_t fOffset;
int32 fRefCount;
};
extern "C" {
#endif /* __cplusplus */
+23
View File
@@ -13,6 +13,29 @@
#include <fcntl.h>
class Descriptor {
public:
Descriptor(Node *node, void *cookie);
~Descriptor();
ssize_t Read(off_t pos, void *buffer, size_t bufferSize);
ssize_t Read(void *buffer, size_t bufferSize);
ssize_t Write(off_t pos, const void *buffer, size_t bufferSize);
ssize_t Write(const void *buffer, size_t bufferSize);
off_t Offset() const { return fOffset; }
int32 RefCount() const { return fRefCount; }
status_t Acquire();
status_t Release();
private:
Node *fNode;
void *fCookie;
off_t fOffset;
int32 fRefCount;
};
#define MAX_VFS_DESCRIPTORS 32
list gBootDevices;