2008-05-10 15:44:00 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003-2008, Haiku Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2003-05-29 01:46:11 +04:00
|
|
|
#ifndef _DISK_SYSTEM_H
|
|
|
|
#define _DISK_SYSTEM_H
|
|
|
|
|
2008-05-10 15:44:00 +04:00
|
|
|
|
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;
|
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:
|
2008-05-10 15:44:00 +04:00
|
|
|
BDiskSystem();
|
|
|
|
BDiskSystem(const BDiskSystem& other);
|
|
|
|
~BDiskSystem();
|
|
|
|
|
|
|
|
status_t InitCheck() const;
|
|
|
|
|
|
|
|
const char* Name() const;
|
|
|
|
const char* ShortName() const;
|
|
|
|
const char* PrettyName() const;
|
|
|
|
|
|
|
|
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 SupportsName() const;
|
|
|
|
bool SupportsContentName() 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;
|
2008-10-14 03:47:30 +04:00
|
|
|
bool SupportsWriting() const;
|
2008-05-10 15:44:00 +04:00
|
|
|
|
|
|
|
status_t GetTypeForContentType(const char* contentType,
|
|
|
|
BString* type) const;
|
|
|
|
|
|
|
|
bool IsPartitioningSystem() const;
|
|
|
|
bool IsFileSystem() const;
|
|
|
|
|
|
|
|
BDiskSystem& operator=(const BDiskSystem& other);
|
2007-07-28 18:56:02 +04:00
|
|
|
|
2003-07-09 03:32:52 +04:00
|
|
|
private:
|
2008-05-10 15:44:00 +04:00
|
|
|
status_t _SetTo(disk_system_id id);
|
|
|
|
status_t _SetTo(const user_disk_system_info* info);
|
|
|
|
void _Unset();
|
2003-07-09 03:32:52 +04:00
|
|
|
|
2008-05-10 15:44:00 +04:00
|
|
|
private:
|
2003-07-09 03:32:52 +04:00
|
|
|
friend class BDiskDeviceRoster;
|
2003-07-17 04:05:31 +04:00
|
|
|
friend class BPartition;
|
2003-07-09 03:32:52 +04:00
|
|
|
|
2008-05-10 15:44:00 +04:00
|
|
|
disk_system_id fID;
|
|
|
|
BString fName;
|
|
|
|
BString fShortName;
|
|
|
|
BString fPrettyName;
|
|
|
|
uint32 fFlags;
|
2003-05-29 01:46:11 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _DISK_SYSTEM_H
|