2003-05-29 01:46:11 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef _DISK_SYSTEM_H
|
|
|
|
#define _DISK_SYSTEM_H
|
|
|
|
|
2003-07-07 03:11:10 +04:00
|
|
|
#include <DiskDeviceDefs.h>
|
2003-07-09 03:32:52 +04:00
|
|
|
#include <String.h>
|
2003-07-07 03:11:10 +04:00
|
|
|
|
2007-10-17 05:01:49 +04:00
|
|
|
|
2003-07-07 03:11:10 +04:00
|
|
|
class BPartition;
|
2007-10-17 05:01:49 +04:00
|
|
|
class BString;
|
2003-07-09 03:32:52 +04:00
|
|
|
struct user_disk_system_info;
|
2003-07-07 03:11:10 +04:00
|
|
|
|
2007-10-17 05:01:49 +04:00
|
|
|
|
2003-05-29 01:46:11 +04:00
|
|
|
class BDiskSystem {
|
|
|
|
public:
|
2003-07-09 03:32:52 +04:00
|
|
|
BDiskSystem();
|
2007-07-28 18:56:02 +04:00
|
|
|
BDiskSystem(const BDiskSystem& other);
|
2003-07-09 03:32:52 +04:00
|
|
|
~BDiskSystem();
|
|
|
|
|
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2003-05-29 01:46:11 +04:00
|
|
|
const char *Name() const;
|
2003-06-11 02:45:49 +04:00
|
|
|
const char *PrettyName() const;
|
2003-05-29 01:46:11 +04:00
|
|
|
|
2003-07-18 22:45:29 +04:00
|
|
|
bool SupportsDefragmenting(bool *whileMounted) const;
|
|
|
|
bool SupportsRepairing(bool checkOnly, bool *whileMounted) const;
|
|
|
|
bool SupportsResizing(bool *whileMounted) const;
|
|
|
|
bool SupportsResizingChild() const;
|
|
|
|
bool SupportsMoving(bool *whileMounted) const;
|
|
|
|
bool SupportsMovingChild() const;
|
2007-08-23 01:22:29 +04:00
|
|
|
bool SupportsName() const;
|
|
|
|
bool SupportsContentName() const;
|
2003-07-18 22:45:29 +04:00
|
|
|
bool SupportsSettingName() const;
|
|
|
|
bool SupportsSettingContentName(bool *whileMounted) const;
|
|
|
|
bool SupportsSettingType() const;
|
|
|
|
bool SupportsSettingParameters() const;
|
|
|
|
bool SupportsSettingContentParameters(bool *whileMounted) const;
|
|
|
|
bool SupportsCreatingChild() const;
|
|
|
|
bool SupportsDeletingChild() const;
|
|
|
|
bool SupportsInitializing() const;
|
2003-07-09 03:32:52 +04:00
|
|
|
|
2007-10-17 05:01:49 +04:00
|
|
|
status_t GetTypeForContentType(const char *contentType,
|
|
|
|
BString* type) const;
|
2003-05-29 01:46:11 +04:00
|
|
|
|
|
|
|
bool IsPartitioningSystem() const;
|
|
|
|
bool IsFileSystem() const;
|
2003-07-09 03:32:52 +04:00
|
|
|
|
2007-07-28 18:56:02 +04:00
|
|
|
BDiskSystem& operator=(const BDiskSystem& other);
|
|
|
|
|
2003-07-09 03:32:52 +04:00
|
|
|
private:
|
2003-07-17 04:05:31 +04:00
|
|
|
status_t _SetTo(disk_system_id id);
|
2007-10-17 05:01:49 +04:00
|
|
|
status_t _SetTo(const user_disk_system_info *info);
|
2003-07-09 03:32:52 +04:00
|
|
|
void _Unset();
|
|
|
|
|
|
|
|
friend class BDiskDeviceRoster;
|
2003-07-17 04:05:31 +04:00
|
|
|
friend class BPartition;
|
2003-07-09 03:32:52 +04:00
|
|
|
|
|
|
|
disk_system_id fID;
|
|
|
|
BString fName;
|
|
|
|
BString fPrettyName;
|
2003-07-18 22:45:29 +04:00
|
|
|
uint32 fFlags;
|
2003-05-29 01:46:11 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _DISK_SYSTEM_H
|