btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / storage / DiskSystem.h
blob017ba0cfebf7845c493406ec79d3683a6ec7975f
1 /*
2 * Copyright 2003-2008, Haiku Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _DISK_SYSTEM_H
6 #define _DISK_SYSTEM_H
9 #include <DiskDeviceDefs.h>
10 #include <String.h>
12 class BPartition;
13 class BString;
14 struct user_disk_system_info;
17 class BDiskSystem {
18 public:
19 BDiskSystem();
20 BDiskSystem(const BDiskSystem& other);
21 ~BDiskSystem();
23 status_t InitCheck() const;
25 const char* Name() const;
26 const char* ShortName() const;
27 const char* PrettyName() const;
29 bool SupportsDefragmenting(bool* whileMounted) const;
30 bool SupportsRepairing(bool checkOnly,
31 bool* whileMounted) const;
32 bool SupportsResizing(bool* whileMounted) const;
33 bool SupportsResizingChild() const;
34 bool SupportsMoving(bool* whileMounted) const;
35 bool SupportsMovingChild() const;
36 bool SupportsName() const;
37 bool SupportsContentName() const;
38 bool SupportsSettingName() const;
39 bool SupportsSettingContentName(
40 bool* whileMounted) const;
41 bool SupportsSettingType() const;
42 bool SupportsSettingParameters() const;
43 bool SupportsSettingContentParameters(
44 bool* whileMounted) const;
45 bool SupportsCreatingChild() const;
46 bool SupportsDeletingChild() const;
47 bool SupportsInitializing() const;
48 bool SupportsWriting() const;
50 status_t GetTypeForContentType(const char* contentType,
51 BString* type) const;
53 bool IsPartitioningSystem() const;
54 bool IsFileSystem() const;
56 BDiskSystem& operator=(const BDiskSystem& other);
58 private:
59 status_t _SetTo(disk_system_id id);
60 status_t _SetTo(const user_disk_system_info* info);
61 void _Unset();
63 private:
64 friend class BDiskDeviceRoster;
65 friend class BPartition;
67 disk_system_id fID;
68 BString fName;
69 BString fShortName;
70 BString fPrettyName;
71 uint32 fFlags;
74 #endif // _DISK_SYSTEM_H