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:
Ingo Weinhold 2002-12-09 12:45:59 +00:00
parent 9b60a208f3
commit 2807c36668
2 changed files with 66 additions and 101 deletions

View File

@ -6,104 +6,81 @@
//
// Description: BVolume class
// ----------------------------------------------------------------------
/*!
\file Volume.h
BVolume interface declarations.
*/
#ifndef _VOLUME_H
#define _VOLUME_H
#ifndef _BE_BUILD_H
#include <BeBuild.h>
#endif
#include <sys/types.h>
#ifndef _FS_INFO_H
#include <fs_info.h>
#endif
#ifndef _STORAGE_DEFS_H
#include <StorageDefs.h>
#endif
#ifndef _MIME_H
#include <Mime.h>
#endif
#ifndef _SUPPORT_DEFS_H
#include <StorageDefs.h>
#include <SupportDefs.h>
#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

View File

@ -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 <BeBuild.h>
#endif
#include <Application.h>
#include <SupportDefs.h>
#include <Volume.h>
#include <Application.h>
#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