Copied the updated Statable.h to the build folder, remove unneeded def

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22711 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-10-25 10:31:57 +00:00
parent 1ffa548338
commit acaf7a73ff
+40 -58
View File
@@ -1,82 +1,64 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2002-2007, Haiku, Inc. All Rights Reserved.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//--------------------------------------------------------------------- */
/*!
\file Statable.h
BStatable interface declaration.
*/
#ifndef _STATABLE_H #ifndef _STATABLE_H
#define _STATABLE_H #define _STATABLE_H
#include <sys/types.h>
#include <sys/stat.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#ifdef USE_OPENBEOS_NAMESPACE #include <sys/types.h>
namespace OpenBeOS { #include <sys/stat.h>
#endif // USE_OPENBEOS_NAMESPACE
struct node_ref;
struct node_ref; class BVolume;
class BVolume;
//! BStatable - A nice C++ wrapper to <code>stat()</code>
/*! A purly abstract class which provieds an expenive, but convenet
* C++ wrapper to the posix <code>\sa stat()</code> command.
*
* @see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a>
* @author <a href="mailto:[email protected]"> Michael Lloyd Lee </a>
* @author Be Inc
* @version 0
*/
class BStatable { class BStatable {
public: public:
virtual status_t GetStat(struct stat *st) const = 0; virtual ~BStatable();
bool IsFile() const; virtual status_t GetStat(struct stat *st) const = 0;
bool IsDirectory() const;
bool IsSymLink() const;
status_t GetNodeRef(node_ref *ref) const; bool IsFile() const;
bool IsDirectory() const;
bool IsSymLink() const;
status_t GetOwner(uid_t *owner) const; status_t GetNodeRef(node_ref *ref) const;
status_t SetOwner(uid_t owner);
status_t GetGroup(gid_t *group) const; status_t GetOwner(uid_t *owner) const;
status_t SetGroup(gid_t group); status_t SetOwner(uid_t owner);
status_t GetPermissions(mode_t *perms) const; status_t GetGroup(gid_t *group) const;
status_t SetPermissions(mode_t perms); status_t SetGroup(gid_t group);
status_t GetSize(off_t *size) const; status_t GetPermissions(mode_t *perms) const;
status_t SetPermissions(mode_t perms);
status_t GetModificationTime(time_t *mtime) const; status_t GetSize(off_t *size) const;
status_t SetModificationTime(time_t mtime);
status_t GetAccessTime(time_t *atime) const; status_t GetModificationTime(time_t *mtime) const;
status_t SetAccessTime(time_t atime); status_t SetModificationTime(time_t mtime);
status_t GetVolume(BVolume *vol) const; status_t GetCreationTime(time_t *ctime) const;
status_t SetCreationTime(time_t ctime);
private: status_t GetAccessTime(time_t *atime) const;
status_t SetAccessTime(time_t atime);
friend class BEntry; status_t GetVolume(BVolume *vol) const;
friend class BNode;
virtual void _OhSoStatable1(); //< FBC private:
virtual void _OhSoStatable2(); //< FBC friend class BEntry;
virtual void _OhSoStatable3(); //< FBC friend class BNode;
uint32 _ohSoData[4]; //< FBC
virtual status_t set_stat(struct stat &st, uint32 what) = 0; virtual void _OhSoStatable1();
virtual void _OhSoStatable2();
virtual void _OhSoStatable3();
uint32 _reserved[4];
virtual status_t set_stat(struct stat &st, uint32 what) = 0;
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif // USE_OPENBEOS_NAMESPACE
#endif // _STATABLE_H #endif // _STATABLE_H