diff --git a/headers/os/storage/Volume.h b/headers/os/storage/Volume.h index 90b800b41e..0a04af87fe 100644 --- a/headers/os/storage/Volume.h +++ b/headers/os/storage/Volume.h @@ -6,104 +6,81 @@ // // Description: BVolume class // ---------------------------------------------------------------------- - +/*! + \file Volume.h + BVolume interface declarations. +*/ #ifndef _VOLUME_H #define _VOLUME_H -#ifndef _BE_BUILD_H -#include -#endif #include -#ifndef _FS_INFO_H #include -#endif -#ifndef _STORAGE_DEFS_H -#include -#endif -#ifndef _MIME_H #include -#endif -#ifndef _SUPPORT_DEFS_H +#include #include -#endif #ifdef USE_OPENBEOS_NAMESPACE namespace OpenBeOS { #endif - -class BDirectory; -class BBitmap; +class BDirectory; +class BBitmap; class BVolume { - public: - BVolume(void); - BVolume(dev_t dev); - BVolume(const BVolume& vol); +public: + BVolume(); + BVolume(dev_t dev); + 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); - void Unset(void); + status_t GetRootDirectory(BDirectory *directory) const; - 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; - off_t FreeBytes(void) const; + status_t GetIcon(BBitmap *icon, icon_size which) const; - status_t GetName(char* name) const; - status_t SetName(const char* name); + bool IsRemovable() const; + bool IsReadOnly() const; + bool IsPersistent() const; + bool IsShared() const; + bool KnowsMime() const; + bool KnowsAttr() const; + bool KnowsQuery() const; - status_t GetIcon( - BBitmap* icon, - icon_size which) const; - - 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); + bool operator==(const BVolume &volume) const; + bool operator!=(const BVolume &volume) const; + BVolume &operator=(const BVolume &volume); - 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(); - virtual void _TurnUpTheVolume2(); - - #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 + dev_t fDevice; + status_t fCStatus; + int32 _reserved[8]; }; - #ifdef USE_OPENBEOS_NAMESPACE -} +} // namespace OpenBeOS #endif #endif // _VOLUME_H - - diff --git a/headers/os/storage/VolumeRoster.h b/headers/os/storage/VolumeRoster.h index 4da65153a0..d22fc7fd44 100644 --- a/headers/os/storage/VolumeRoster.h +++ b/headers/os/storage/VolumeRoster.h @@ -6,61 +6,49 @@ // // Description: BVolumeRoster class // ---------------------------------------------------------------------- - - +/*! + \file VolumeRoster.h + BVolumeRoster interface declarations. +*/ #ifndef _VOLUME_ROSTER_H #define _VOLUME_ROSTER_H -#ifndef _BE_BUILD_H -#include -#endif +#include #include #include -#include #ifdef USE_OPENBEOS_NAMESPACE namespace OpenBeOS { #endif -const char kBootVolumeName[B_DEV_NAME_LENGTH] = "/boot"; - class BVolume; class BMessenger; class BVolumeRoster { - public: - BVolumeRoster(void); - virtual ~BVolumeRoster(void); +public: + BVolumeRoster(); + virtual ~BVolumeRoster(); - status_t GetNextVolume(BVolume* vol); - void Rewind(void); + status_t GetNextVolume(BVolume *volume); + void Rewind(); - status_t GetBootVolume(BVolume* boot_vol); - status_t StartWatching(BMessenger msngr=be_app_messenger); + status_t GetBootVolume(BVolume *volume); - void StopWatching(void); + status_t StartWatching(BMessenger messenger = be_app_messenger); + void StopWatching(); + BMessenger Messenger() const; - BMessenger Messenger(void) const; - - private: - - virtual void _SeveredVRoster1(void); - virtual void _SeveredVRoster2(void); +private: + virtual void _ReservedVolumeRoster1(); + virtual void _ReservedVolumeRoster2(); - int32 fPos; - BMessenger* fTarget; - -#if !_PR3_COMPATIBLE_ - uint32 _reserved[3]; -#endif - + int32 fCookie; + BMessenger *fTarget; + uint32 _reserved[3]; }; - #ifdef USE_OPENBEOS_NAMESPACE } #endif #endif // _VOLUME_ROSTER_H - -