xref: /haiku/headers/build/os/storage/Volume.h (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1 // ----------------------------------------------------------------------
2 //  This software is part of the Haiku distribution and is covered
3 //  by the MIT License.
4 //
5 //  File Name:		Directory.cpp
6 //
7 //	Description:	BVolume class
8 // ----------------------------------------------------------------------
9 /*!
10 	\file Volume.h
11 	BVolume interface declarations.
12 */
13 #ifndef _VOLUME_H
14 #define _VOLUME_H
15 
16 #include <sys/types.h>
17 
18 #include <fs_info.h>
19 #include <Mime.h>
20 #include <StorageDefs.h>
21 #include <SupportDefs.h>
22 
23 #ifdef USE_OPENBEOS_NAMESPACE
24 namespace OpenBeOS {
25 #endif
26 
27 class BDirectory;
28 class BBitmap;
29 
30 class BVolume {
31 public:
32 	BVolume();
33 	BVolume(dev_t dev);
34 	BVolume(const BVolume &vol);
35 	virtual ~BVolume();
36 
37 	status_t InitCheck() const;
38 	status_t SetTo(dev_t dev);
39 	void Unset();
40 
41 	dev_t Device() const;
42 
43 	bool operator==(const BVolume &volume) const;
44 	bool operator!=(const BVolume &volume) const;
45 	BVolume &operator=(const BVolume &volume);
46 
47 private:
48 //	friend class BVolumeRoster;
49 
50 	virtual void _TurnUpTheVolume1();
51 	virtual void _TurnUpTheVolume2();
52 	virtual void _TurnUpTheVolume3();
53 	virtual void _TurnUpTheVolume4();
54 	virtual void _TurnUpTheVolume5();
55 	virtual void _TurnUpTheVolume6();
56 	virtual void _TurnUpTheVolume7();
57 	virtual void _TurnUpTheVolume8();
58 
59 	dev_t		fDevice;
60 	status_t	fCStatus;
61 	int32		_reserved[8];
62 };
63 
64 #ifdef USE_OPENBEOS_NAMESPACE
65 }	// namespace OpenBeOS
66 #endif
67 
68 #endif	// _VOLUME_H
69