Added missing methods in the header and a partial implementation in the source file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3908 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,20 +7,33 @@
|
||||
#define _DISK_SYSTEM_H
|
||||
|
||||
#include <DiskDeviceDefs.h>
|
||||
#include <String.h>
|
||||
|
||||
class BPartition;
|
||||
struct user_disk_system_info;
|
||||
|
||||
class BDiskSystem {
|
||||
public:
|
||||
BDiskSystem();
|
||||
~BDiskSystem();
|
||||
|
||||
status_t InitCheck() const;
|
||||
|
||||
const char *Name() const;
|
||||
const char *PrettyName() const;
|
||||
|
||||
bool SupportsDefragmenting(BPartition *partition, bool *whileMounted) const;
|
||||
bool SupportsRepairing(BPartition *partition, bool checkOnly, bool *whileMounted) const;
|
||||
bool SupportsDefragmenting(BPartition *partition,
|
||||
bool *whileMounted) const;
|
||||
bool SupportsRepairing(BPartition *partition, bool checkOnly,
|
||||
bool *whileMounted) const;
|
||||
bool SupportsResizing(BPartition *partition, bool *whileMounted) const;
|
||||
bool SupportsResizingChild(BPartition *child) const;
|
||||
bool SupportsMoving(BPartition *partition, bool *whileMounted) const;
|
||||
bool SupportsMovingChild(BPartition *child) const;
|
||||
bool SupportsSettingName(BPartition *partition) const;
|
||||
bool SupportsSettingContentName(BPartition *partition,
|
||||
bool *whileMounted) const;
|
||||
bool SupportsSettingType(BPartition *partition) const;
|
||||
bool SupportsCreatingChild(BPartition *partition) const;
|
||||
bool SupportsParentSystem(BPartition *child, const char *system) const;
|
||||
// True in most cases. NULL == raw device.
|
||||
@@ -28,17 +41,37 @@ public:
|
||||
// False for most file systems, true for most partitioning
|
||||
// systems.
|
||||
|
||||
bool ValidateResize(BPartition *partition, off_t *size) const;
|
||||
bool ValidateMove(BPartition *partition, off_t *start) const;
|
||||
bool ValidateResizeChild(BPartition *partition, off_t *size) const;
|
||||
bool ValidateMoveChild(BPartition *partition, off_t *start) const;
|
||||
bool ValidateCreateChild(BPartition *partition, off_t *start, off_t *size,
|
||||
const char *type, const char *parameters) const;
|
||||
// TODO: We must be able to enumerate the types the system supports.
|
||||
status_t ValidateResize(BPartition *partition, off_t *size) const;
|
||||
status_t ValidateMove(BPartition *partition, off_t *start) const;
|
||||
status_t ValidateResizeChild(BPartition *partition, off_t *size) const;
|
||||
status_t ValidateMoveChild(BPartition *partition, off_t *start) const;
|
||||
status_t ValidateSetName(BPartition *partition, char *name) const;
|
||||
status_t ValidateSetContentName(BPartition *partition, char *name) const;
|
||||
status_t ValidateSetType(BPartition *partition, char *type) const;
|
||||
status_t ValidateCreateChild(BPartition *partition, off_t *start,
|
||||
off_t *size, const char *type,
|
||||
const char *parameters) const;
|
||||
|
||||
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;
|
||||
|
||||
bool IsPartitioningSystem() const;
|
||||
bool IsFileSystem() const;
|
||||
bool IsSubSystemFor(BPartition *parent) const;
|
||||
|
||||
private:
|
||||
status_t _SetTo(user_disk_system_info *info);
|
||||
void _Unset();
|
||||
|
||||
friend class BDiskDeviceRoster;
|
||||
|
||||
disk_system_id fID;
|
||||
BString fName;
|
||||
BString fPrettyName;
|
||||
bool fFileSystem;
|
||||
};
|
||||
|
||||
#endif // _DISK_SYSTEM_H
|
||||
|
||||
Reference in New Issue
Block a user