xref: /haiku/src/servers/package/Volume.h (revision 26296b0aa4ddcc1b8baf1e6c380d0f8634730068)
1*26296b0aSIngo Weinhold /*
2*26296b0aSIngo Weinhold  * Copyright 2013, Haiku, Inc. All Rights Reserved.
3*26296b0aSIngo Weinhold  * Distributed under the terms of the MIT License.
4*26296b0aSIngo Weinhold  *
5*26296b0aSIngo Weinhold  * Authors:
6*26296b0aSIngo Weinhold  *		Ingo Weinhold <ingo_weinhold@gmx.de>
7*26296b0aSIngo Weinhold  */
8*26296b0aSIngo Weinhold #ifndef VOLUME_H
9*26296b0aSIngo Weinhold #define VOLUME_H
10*26296b0aSIngo Weinhold 
11*26296b0aSIngo Weinhold 
12*26296b0aSIngo Weinhold #include <fs_info.h>
13*26296b0aSIngo Weinhold #include <String.h>
14*26296b0aSIngo Weinhold 
15*26296b0aSIngo Weinhold #include <packagefs.h>
16*26296b0aSIngo Weinhold 
17*26296b0aSIngo Weinhold 
18*26296b0aSIngo Weinhold class BDirectory;
19*26296b0aSIngo Weinhold 
20*26296b0aSIngo Weinhold class Root;
21*26296b0aSIngo Weinhold 
22*26296b0aSIngo Weinhold 
23*26296b0aSIngo Weinhold class Volume {
24*26296b0aSIngo Weinhold public:
25*26296b0aSIngo Weinhold 								Volume();
26*26296b0aSIngo Weinhold 								~Volume();
27*26296b0aSIngo Weinhold 
28*26296b0aSIngo Weinhold 			status_t			Init(BDirectory& directory,
29*26296b0aSIngo Weinhold 									dev_t& _rootDeviceID, ino_t& _rootNodeID);
30*26296b0aSIngo Weinhold 
31*26296b0aSIngo Weinhold 			const BString&		Path() const
32*26296b0aSIngo Weinhold 									{ return fPath; }
33*26296b0aSIngo Weinhold 			PackageFSMountType	MountType() const
34*26296b0aSIngo Weinhold 									{ return fMountType; }
35*26296b0aSIngo Weinhold 			dev_t				DeviceID() const
36*26296b0aSIngo Weinhold 									{ return fDeviceID; }
37*26296b0aSIngo Weinhold 			ino_t				RootDirectoryID() const
38*26296b0aSIngo Weinhold 									{ return fRootDirectoryID; }
39*26296b0aSIngo Weinhold 
40*26296b0aSIngo Weinhold 			Root*				GetRoot() const
41*26296b0aSIngo Weinhold 									{ return fRoot; }
42*26296b0aSIngo Weinhold 			void				SetRoot(Root* root)
43*26296b0aSIngo Weinhold 									{ fRoot = root; }
44*26296b0aSIngo Weinhold 
45*26296b0aSIngo Weinhold private:
46*26296b0aSIngo Weinhold 			BString				fPath;
47*26296b0aSIngo Weinhold 			PackageFSMountType	fMountType;
48*26296b0aSIngo Weinhold 			dev_t				fDeviceID;
49*26296b0aSIngo Weinhold 			ino_t				fRootDirectoryID;
50*26296b0aSIngo Weinhold 			Root*				fRoot;
51*26296b0aSIngo Weinhold };
52*26296b0aSIngo Weinhold 
53*26296b0aSIngo Weinhold 
54*26296b0aSIngo Weinhold 
55*26296b0aSIngo Weinhold #endif	// VOLUME_H
56