From 5de135b92e65d0dcdb72fd72e29e20b5c85f9ab8 Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Wed, 3 Dec 2003 08:38:12 +0000 Subject: [PATCH] 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 --- src/apps/bin/makeudfimage/Attribute.cpp | 31 +++++++++++++++++++++++++ src/apps/bin/makeudfimage/Attribute.h | 30 ++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 src/apps/bin/makeudfimage/Attribute.cpp create mode 100644 src/apps/bin/makeudfimage/Attribute.h diff --git a/src/apps/bin/makeudfimage/Attribute.cpp b/src/apps/bin/makeudfimage/Attribute.cpp new file mode 100644 index 0000000000..eb0bdd9b94 --- /dev/null +++ b/src/apps/bin/makeudfimage/Attribute.cpp @@ -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; +} diff --git a/src/apps/bin/makeudfimage/Attribute.h b/src/apps/bin/makeudfimage/Attribute.h new file mode 100644 index 0000000000..2a6f0c0697 --- /dev/null +++ b/src/apps/bin/makeudfimage/Attribute.h @@ -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 +#include +#include + +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