1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 //--------------------------------------------------------------------- 5 6 #ifndef _DISK_SYSTEM_H 7 #define _DISK_SYSTEM_H 8 9 #include <DiskDeviceDefs.h> 10 #include <String.h> 11 12 class BPartition; 13 struct user_disk_system_info; 14 15 class BDiskSystem { 16 public: 17 BDiskSystem(); 18 BDiskSystem(const BDiskSystem& other); 19 ~BDiskSystem(); 20 21 status_t InitCheck() const; 22 23 const char *Name() const; 24 const char *PrettyName() const; 25 26 bool SupportsDefragmenting(bool *whileMounted) const; 27 bool SupportsRepairing(bool checkOnly, bool *whileMounted) const; 28 bool SupportsResizing(bool *whileMounted) const; 29 bool SupportsResizingChild() const; 30 bool SupportsMoving(bool *whileMounted) const; 31 bool SupportsMovingChild() const; 32 bool SupportsSettingName() const; 33 bool SupportsSettingContentName(bool *whileMounted) const; 34 bool SupportsSettingType() const; 35 bool SupportsSettingParameters() const; 36 bool SupportsSettingContentParameters(bool *whileMounted) const; 37 bool SupportsCreatingChild() const; 38 bool SupportsDeletingChild() const; 39 bool SupportsInitializing() const; 40 41 status_t GetNextSupportedType(BPartition *partition, int32 *cookie, 42 char *type) const; 43 // Returns all types the disk system supports for children of the 44 // supplied partition. 45 status_t GetTypeForContentType(const char *contentType, char *type) const; 46 47 bool IsPartitioningSystem() const; 48 bool IsFileSystem() const; 49 bool IsSubSystemFor(BPartition *parent) const; 50 51 BDiskSystem& operator=(const BDiskSystem& other); 52 53 private: 54 status_t _SetTo(disk_system_id id); 55 status_t _SetTo(user_disk_system_info *info); 56 void _Unset(); 57 58 friend class BDiskDeviceRoster; 59 friend class BPartition; 60 61 disk_system_id fID; 62 BString fName; 63 BString fPrettyName; 64 uint32 fFlags; 65 }; 66 67 #endif // _DISK_SYSTEM_H 68