xref: /haiku/headers/os/package/GlobalWritableFileInfo.h (revision 9f81ca838ce7b92b5689e57d3f86765db4705a7b)
1*4489c88bSIngo Weinhold /*
2*4489c88bSIngo Weinhold  * Copyright 2013, Haiku, Inc.
3*4489c88bSIngo Weinhold  * Distributed under the terms of the MIT License.
4*4489c88bSIngo Weinhold  */
5*4489c88bSIngo Weinhold #ifndef _PACKAGE__GLOBAL_WRITABLE_FILE_INFO_H_
6*4489c88bSIngo Weinhold #define _PACKAGE__GLOBAL_WRITABLE_FILE_INFO_H_
7*4489c88bSIngo Weinhold 
8*4489c88bSIngo Weinhold 
9*4489c88bSIngo Weinhold #include <package/WritableFileUpdateType.h>
10*4489c88bSIngo Weinhold #include <String.h>
11*4489c88bSIngo Weinhold 
12*4489c88bSIngo Weinhold 
13*4489c88bSIngo Weinhold namespace BPackageKit {
14*4489c88bSIngo Weinhold 
15*4489c88bSIngo Weinhold 
16*4489c88bSIngo Weinhold namespace BHPKG {
17*4489c88bSIngo Weinhold 	struct BGlobalWritableFileInfoData;
18*4489c88bSIngo Weinhold }
19*4489c88bSIngo Weinhold 
20*4489c88bSIngo Weinhold 
21*4489c88bSIngo Weinhold class BGlobalWritableFileInfo {
22*4489c88bSIngo Weinhold public:
23*4489c88bSIngo Weinhold 								BGlobalWritableFileInfo();
24*4489c88bSIngo Weinhold 								BGlobalWritableFileInfo(
25*4489c88bSIngo Weinhold 									const BHPKG::BGlobalWritableFileInfoData&
26*4489c88bSIngo Weinhold 										infoData);
27*4489c88bSIngo Weinhold 								BGlobalWritableFileInfo(const BString& path,
28*4489c88bSIngo Weinhold 									BWritableFileUpdateType updateType,
29*4489c88bSIngo Weinhold 									bool isDirectory);
30*4489c88bSIngo Weinhold 								~BGlobalWritableFileInfo();
31*4489c88bSIngo Weinhold 
32*4489c88bSIngo Weinhold 			status_t			InitCheck() const;
33*4489c88bSIngo Weinhold 
34*4489c88bSIngo Weinhold 			const BString&		Path() const;
35*4489c88bSIngo Weinhold 			bool				IsIncluded() const;
36*4489c88bSIngo Weinhold 			BWritableFileUpdateType UpdateType() const;
37*4489c88bSIngo Weinhold 			bool				IsDirectory() const;
38*4489c88bSIngo Weinhold 
39*4489c88bSIngo Weinhold 			void				SetTo(const BString& path,
40*4489c88bSIngo Weinhold 									BWritableFileUpdateType updateType,
41*4489c88bSIngo Weinhold 									bool isDirectory);
42*4489c88bSIngo Weinhold 
43*4489c88bSIngo Weinhold private:
44*4489c88bSIngo Weinhold 			BString				fPath;
45*4489c88bSIngo Weinhold 			BWritableFileUpdateType fUpdateType;
46*4489c88bSIngo Weinhold 			bool				fIsDirectory;
47*4489c88bSIngo Weinhold };
48*4489c88bSIngo Weinhold 
49*4489c88bSIngo Weinhold 
50*4489c88bSIngo Weinhold }	// namespace BPackageKit
51*4489c88bSIngo Weinhold 
52*4489c88bSIngo Weinhold 
53*4489c88bSIngo Weinhold #endif	// _PACKAGE__GLOBAL_WRITABLE_FILE_INFO_H_
54