Changed to OT style, some aesthetically adjustions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2203 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+46
-69
@@ -6,104 +6,81 @@
|
|||||||
//
|
//
|
||||||
// Description: BVolume class
|
// Description: BVolume class
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
/*!
|
||||||
|
\file Volume.h
|
||||||
|
BVolume interface declarations.
|
||||||
|
*/
|
||||||
#ifndef _VOLUME_H
|
#ifndef _VOLUME_H
|
||||||
#define _VOLUME_H
|
#define _VOLUME_H
|
||||||
|
|
||||||
#ifndef _BE_BUILD_H
|
|
||||||
#include <BeBuild.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifndef _FS_INFO_H
|
|
||||||
#include <fs_info.h>
|
#include <fs_info.h>
|
||||||
#endif
|
|
||||||
#ifndef _STORAGE_DEFS_H
|
|
||||||
#include <StorageDefs.h>
|
|
||||||
#endif
|
|
||||||
#ifndef _MIME_H
|
|
||||||
#include <Mime.h>
|
#include <Mime.h>
|
||||||
#endif
|
#include <StorageDefs.h>
|
||||||
#ifndef _SUPPORT_DEFS_H
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_OPENBEOS_NAMESPACE
|
#ifdef USE_OPENBEOS_NAMESPACE
|
||||||
namespace OpenBeOS {
|
namespace OpenBeOS {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
class BDirectory;
|
||||||
class BDirectory;
|
class BBitmap;
|
||||||
class BBitmap;
|
|
||||||
|
|
||||||
class BVolume {
|
class BVolume {
|
||||||
public:
|
public:
|
||||||
BVolume(void);
|
BVolume();
|
||||||
BVolume(dev_t dev);
|
BVolume(dev_t dev);
|
||||||
BVolume(const BVolume& vol);
|
BVolume(const BVolume &vol);
|
||||||
|
virtual ~BVolume();
|
||||||
|
|
||||||
virtual ~BVolume(void);
|
status_t InitCheck() const;
|
||||||
|
status_t SetTo(dev_t dev);
|
||||||
|
void Unset();
|
||||||
|
|
||||||
status_t InitCheck(void) const;
|
dev_t Device() const;
|
||||||
|
|
||||||
status_t SetTo(dev_t dev);
|
status_t GetRootDirectory(BDirectory *directory) const;
|
||||||
void Unset(void);
|
|
||||||
|
|
||||||
dev_t Device(void) const;
|
off_t Capacity() const;
|
||||||
|
off_t FreeBytes() const;
|
||||||
|
|
||||||
status_t GetRootDirectory(BDirectory* dir) const;
|
status_t GetName(char *name) const;
|
||||||
|
status_t SetName(const char *name);
|
||||||
|
|
||||||
off_t Capacity(void) const;
|
status_t GetIcon(BBitmap *icon, icon_size which) const;
|
||||||
off_t FreeBytes(void) const;
|
|
||||||
|
|
||||||
status_t GetName(char* name) const;
|
bool IsRemovable() const;
|
||||||
status_t SetName(const char* name);
|
bool IsReadOnly() const;
|
||||||
|
bool IsPersistent() const;
|
||||||
|
bool IsShared() const;
|
||||||
|
bool KnowsMime() const;
|
||||||
|
bool KnowsAttr() const;
|
||||||
|
bool KnowsQuery() const;
|
||||||
|
|
||||||
status_t GetIcon(
|
bool operator==(const BVolume &volume) const;
|
||||||
BBitmap* icon,
|
bool operator!=(const BVolume &volume) const;
|
||||||
icon_size which) const;
|
BVolume &operator=(const BVolume &volume);
|
||||||
|
|
||||||
bool IsRemovable(void) const;
|
|
||||||
bool IsReadOnly(void) const;
|
|
||||||
bool IsPersistent(void) const;
|
|
||||||
bool IsShared(void) const;
|
|
||||||
bool KnowsMime(void) const;
|
|
||||||
bool KnowsAttr(void) const;
|
|
||||||
bool KnowsQuery(void) const;
|
|
||||||
|
|
||||||
bool operator==(const BVolume& vol) const;
|
|
||||||
bool operator!=(const BVolume& vol) const;
|
|
||||||
BVolume& operator=(const BVolume& vol);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// friend class BVolumeRoster;
|
||||||
|
|
||||||
friend class BVolumeRoster;
|
virtual void _ReservedVolume1();
|
||||||
|
virtual void _ReservedVolume2();
|
||||||
|
virtual void _ReservedVolume3();
|
||||||
|
virtual void _ReservedVolume4();
|
||||||
|
virtual void _ReservedVolume5();
|
||||||
|
virtual void _ReservedVolume6();
|
||||||
|
virtual void _ReservedVolume7();
|
||||||
|
virtual void _ReservedVolume8();
|
||||||
|
|
||||||
virtual void _TurnUpTheVolume1();
|
dev_t fDevice;
|
||||||
virtual void _TurnUpTheVolume2();
|
status_t fCStatus;
|
||||||
|
int32 _reserved[8];
|
||||||
#if !_PR3_COMPATIBLE_
|
|
||||||
virtual void _TurnUpTheVolume3();
|
|
||||||
virtual void _TurnUpTheVolume4();
|
|
||||||
virtual void _TurnUpTheVolume5();
|
|
||||||
virtual void _TurnUpTheVolume6();
|
|
||||||
virtual void _TurnUpTheVolume7();
|
|
||||||
virtual void _TurnUpTheVolume8();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dev_t fDev;
|
|
||||||
status_t fCStatus;
|
|
||||||
|
|
||||||
#if !_PR3_COMPATIBLE_
|
|
||||||
int32 _reserved[8];
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_OPENBEOS_NAMESPACE
|
#ifdef USE_OPENBEOS_NAMESPACE
|
||||||
}
|
} // namespace OpenBeOS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _VOLUME_H
|
#endif // _VOLUME_H
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,61 +6,49 @@
|
|||||||
//
|
//
|
||||||
// Description: BVolumeRoster class
|
// Description: BVolumeRoster class
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
/*!
|
||||||
|
\file VolumeRoster.h
|
||||||
|
BVolumeRoster interface declarations.
|
||||||
|
*/
|
||||||
#ifndef _VOLUME_ROSTER_H
|
#ifndef _VOLUME_ROSTER_H
|
||||||
#define _VOLUME_ROSTER_H
|
#define _VOLUME_ROSTER_H
|
||||||
|
|
||||||
#ifndef _BE_BUILD_H
|
#include <Application.h>
|
||||||
#include <BeBuild.h>
|
|
||||||
#endif
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
#include <Volume.h>
|
#include <Volume.h>
|
||||||
#include <Application.h>
|
|
||||||
|
|
||||||
#ifdef USE_OPENBEOS_NAMESPACE
|
#ifdef USE_OPENBEOS_NAMESPACE
|
||||||
namespace OpenBeOS {
|
namespace OpenBeOS {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char kBootVolumeName[B_DEV_NAME_LENGTH] = "/boot";
|
|
||||||
|
|
||||||
class BVolume;
|
class BVolume;
|
||||||
class BMessenger;
|
class BMessenger;
|
||||||
|
|
||||||
class BVolumeRoster {
|
class BVolumeRoster {
|
||||||
public:
|
public:
|
||||||
BVolumeRoster(void);
|
BVolumeRoster();
|
||||||
virtual ~BVolumeRoster(void);
|
virtual ~BVolumeRoster();
|
||||||
|
|
||||||
status_t GetNextVolume(BVolume* vol);
|
status_t GetNextVolume(BVolume *volume);
|
||||||
void Rewind(void);
|
void Rewind();
|
||||||
|
|
||||||
status_t GetBootVolume(BVolume* boot_vol);
|
status_t GetBootVolume(BVolume *volume);
|
||||||
status_t StartWatching(BMessenger msngr=be_app_messenger);
|
|
||||||
|
|
||||||
void StopWatching(void);
|
status_t StartWatching(BMessenger messenger = be_app_messenger);
|
||||||
|
void StopWatching();
|
||||||
|
BMessenger Messenger() const;
|
||||||
|
|
||||||
BMessenger Messenger(void) const;
|
private:
|
||||||
|
virtual void _ReservedVolumeRoster1();
|
||||||
private:
|
virtual void _ReservedVolumeRoster2();
|
||||||
|
|
||||||
virtual void _SeveredVRoster1(void);
|
|
||||||
virtual void _SeveredVRoster2(void);
|
|
||||||
|
|
||||||
int32 fPos;
|
int32 fCookie;
|
||||||
BMessenger* fTarget;
|
BMessenger *fTarget;
|
||||||
|
uint32 _reserved[3];
|
||||||
#if !_PR3_COMPATIBLE_
|
|
||||||
uint32 _reserved[3];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_OPENBEOS_NAMESPACE
|
#ifdef USE_OPENBEOS_NAMESPACE
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _VOLUME_ROSTER_H
|
#endif // _VOLUME_ROSTER_H
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user