2002-07-09 16:24:59 +04:00
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//
|
|
|
|
// File Name: Directory.cpp
|
|
|
|
//
|
|
|
|
// Description: BVolume class
|
|
|
|
// ----------------------------------------------------------------------
|
2002-12-09 15:45:59 +03:00
|
|
|
/*!
|
|
|
|
\file Volume.h
|
|
|
|
BVolume interface declarations.
|
|
|
|
*/
|
2002-08-12 11:24:02 +04:00
|
|
|
#ifndef _VOLUME_H
|
|
|
|
#define _VOLUME_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <fs_info.h>
|
|
|
|
#include <Mime.h>
|
2002-12-09 15:45:59 +03:00
|
|
|
#include <StorageDefs.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
#ifdef USE_OPENBEOS_NAMESPACE
|
|
|
|
namespace OpenBeOS {
|
|
|
|
#endif
|
|
|
|
|
2002-12-09 15:45:59 +03:00
|
|
|
class BDirectory;
|
|
|
|
class BBitmap;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
class BVolume {
|
2002-12-09 15:45:59 +03:00
|
|
|
public:
|
|
|
|
BVolume();
|
|
|
|
BVolume(dev_t dev);
|
|
|
|
BVolume(const BVolume &vol);
|
|
|
|
virtual ~BVolume();
|
|
|
|
|
|
|
|
status_t InitCheck() const;
|
|
|
|
status_t SetTo(dev_t dev);
|
|
|
|
void Unset();
|
|
|
|
|
|
|
|
dev_t Device() const;
|
|
|
|
|
|
|
|
status_t GetRootDirectory(BDirectory *directory) const;
|
|
|
|
|
|
|
|
off_t Capacity() const;
|
|
|
|
off_t FreeBytes() const;
|
|
|
|
|
|
|
|
status_t GetName(char *name) const;
|
|
|
|
status_t SetName(const char *name);
|
|
|
|
|
|
|
|
status_t GetIcon(BBitmap *icon, icon_size which) const;
|
|
|
|
|
|
|
|
bool IsRemovable() const;
|
|
|
|
bool IsReadOnly() const;
|
|
|
|
bool IsPersistent() const;
|
|
|
|
bool IsShared() const;
|
|
|
|
bool KnowsMime() const;
|
|
|
|
bool KnowsAttr() const;
|
|
|
|
bool KnowsQuery() const;
|
|
|
|
|
|
|
|
bool operator==(const BVolume &volume) const;
|
|
|
|
bool operator!=(const BVolume &volume) const;
|
|
|
|
BVolume &operator=(const BVolume &volume);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// friend class BVolumeRoster;
|
|
|
|
|
2003-02-11 21:17:25 +03:00
|
|
|
virtual void _TurnUpTheVolume1();
|
|
|
|
virtual void _TurnUpTheVolume2();
|
|
|
|
virtual void _TurnUpTheVolume3();
|
|
|
|
virtual void _TurnUpTheVolume4();
|
|
|
|
virtual void _TurnUpTheVolume5();
|
|
|
|
virtual void _TurnUpTheVolume6();
|
|
|
|
virtual void _TurnUpTheVolume7();
|
|
|
|
virtual void _TurnUpTheVolume8();
|
2002-12-09 15:45:59 +03:00
|
|
|
|
|
|
|
dev_t fDevice;
|
|
|
|
status_t fCStatus;
|
|
|
|
int32 _reserved[8];
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef USE_OPENBEOS_NAMESPACE
|
2002-12-09 15:45:59 +03:00
|
|
|
} // namespace OpenBeOS
|
2002-07-09 16:24:59 +04:00
|
|
|
#endif
|
|
|
|
|
2002-08-12 11:24:02 +04:00
|
|
|
#endif // _VOLUME_H
|