haiku/headers/private/storage/DiskSystem.h
Ingo Weinhold 5c7270efd7 Beginning of Disk Device API:
* Made all headers parsable. Also some smaller changes.
* Added empty source files for new classes.
* Changed obsolete implementations of existing classes, so that we
  now have basic functionality for BDiskDevice[Roster] and BPartition.
  Iterating through disk devices works and the data we get doesn't look
  too bad for the beginning.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-07-06 23:11:10 +00:00

45 lines
1.7 KiB
C++

//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
#ifndef _DISK_SYSTEM_H
#define _DISK_SYSTEM_H
#include <DiskDeviceDefs.h>
class BPartition;
class BDiskSystem {
public:
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 SupportsResizing(BPartition *partition, bool *whileMounted) const;
bool SupportsResizingChild(BPartition *child) const;
bool SupportsMoving(BPartition *partition, bool *whileMounted) const;
bool SupportsMovingChild(BPartition *child) const;
bool SupportsCreatingChild(BPartition *partition) const;
bool SupportsParentSystem(BPartition *child, const char *system) const;
// True in most cases. NULL == raw device.
bool SupportsChildSystem(BPartition *child, const char *system) const;
// 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.
bool IsPartitioningSystem() const;
bool IsFileSystem() const;
bool IsSubSystemFor(BPartition *parent) const;
};
#endif // _DISK_SYSTEM_H