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
7
8
9#include <DiskDeviceDefs.h>
10#include <String.h>
11
12class BPartition;
13class BString;
14struct user_disk_system_info;
15
16
17class BDiskSystem {
18public:
19							BDiskSystem();
20							BDiskSystem(const BDiskSystem& other);
21							~BDiskSystem();
22
23			status_t		InitCheck() const;
24
25			const char*		Name() const;
26			const char*		ShortName() const;
27			const char*		PrettyName() const;
28
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;
49
50			status_t		GetTypeForContentType(const char* contentType,
51								BString* type) const;
52
53			bool			IsPartitioningSystem() const;
54			bool			IsFileSystem() const;
55
56			BDiskSystem&	operator=(const BDiskSystem& other);
57
58private:
59			status_t		_SetTo(disk_system_id id);
60			status_t		_SetTo(const user_disk_system_info* info);
61			void			_Unset();
62
63private:
64	friend class BDiskDeviceRoster;
65	friend class BPartition;
66
67	disk_system_id			fID;
68	BString					fName;
69	BString					fShortName;
70	BString					fPrettyName;
71	uint32					fFlags;
72};
73
74#endif	// _DISK_SYSTEM_H
75