Initial checkin. BDataIO wrapper around a single attribute in a file.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5546 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2003-12-03 08:38:12 +00:00
parent d33dc9d01f
commit 5de135b92e
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,31 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//
// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
//----------------------------------------------------------------------
/*! \file Attribute.h
BDataIO wrapper around a given attribute for a file. (implementation)
*/
#include "Attribute.h"
Attribute::Attribute(BNode &node, const char *attribute)
: fNode(node)
, fAttribute(attribute)
{
}
ssize_t
Attribute::Read(void *buffer, size_t size)
{
return B_ERROR;
}
ssize_t
Attribute::Write(const void *buffer, size_t size)
{
return B_ERROR;
}

View File

@ -0,0 +1,30 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//
// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
//----------------------------------------------------------------------
/*! \file Attribute.h
BDataIO wrapper around a given attribute for a file. (declarations)
*/
#ifndef _ATTRIBUTE_H
#define _ATTRIBUTE_H
#include <DataIO.h>
#include <Node.h>
#include <string>
class Attribute : public BDataIO {
public:
Attribute(BNode &node, const char *attribute);
virtual ssize_t Read(void *buffer, size_t size);
virtual ssize_t Write(const void *buffer, size_t size);
private:
BNode fNode;
string fAttribute;
};
#endif // _ATTRIBUTE_H