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
|
|
|
|
|
|
|
class BPartition;
|
2003-07-09 03:32:52 +04:00
|
|
|
struct user_disk_system_info;
|
2003-07-07 03:11:10 +04:00
|
|
|
|
2003-05-29 01:46:11 +04:00
|
|
|
class BDiskSystem {
|
|
|
|
public:
|
2003-07-09 03:32:52 +04:00
|
|
|
BDiskSystem();
|
|
|
|
~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;
|
|
|
|
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
|
|
|
|
|
|
|
status_t GetNextSupportedType(BPartition *partition, int32 *cookie,
|
|
|
|
char *type) const;
|
|
|
|
// Returns all types the disk system supports for children of the
|
|
|
|
// supplied partition.
|
|
|
|
status_t GetTypeForContentType(const char *contentType, char *type) const;
|
2003-05-29 01:46:11 +04:00
|
|
|
|
|
|
|
bool IsPartitioningSystem() const;
|
|
|
|
bool IsFileSystem() const;
|
2003-05-29 01:47:29 +04:00
|
|
|
bool IsSubSystemFor(BPartition *parent) const;
|
2003-07-09 03:32:52 +04:00
|
|
|
|
|
|
|
private:
|
2003-07-17 04:05:31 +04:00
|
|
|
status_t _SetTo(disk_system_id id);
|
2003-07-09 03:32:52 +04:00
|
|
|
status_t _SetTo(user_disk_system_info *info);
|
|
|
|
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
|