xref: /haiku/headers/os/package/InstallationLocationInfo.h (revision b617a7b410c05275effb95f4b2f5608359d9b7b9)
1 /*
2  * Copyright 2013, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _PACKAGE__INSTALLATION_LOCATION_INFO_H_
6 #define _PACKAGE__INSTALLATION_LOCATION_INFO_H_
7 
8 
9 #include <Node.h>
10 
11 #include <package/PackageDefs.h>
12 #include <package/PackageInfoSet.h>
13 
14 
15 namespace BPackageKit {
16 
17 
18 class BInstallationLocationInfo {
19 public:
20 								BInstallationLocationInfo();
21 								~BInstallationLocationInfo();
22 
23 			void				Unset();
24 
25 			BPackageInstallationLocation Location() const;
26 			void				SetLocation(
27 									BPackageInstallationLocation location);
28 
29 			const node_ref&		BaseDirectoryRef() const;
30 			status_t			SetBaseDirectoryRef(const node_ref& ref);
31 
32 			const node_ref&		PackagesDirectoryRef() const;
33 			status_t			SetPackagesDirectoryRef(const node_ref& ref);
34 
35 			const BPackageInfoSet& ActivePackageInfos() const;
36 			void				SetActivePackageInfos(
37 									const BPackageInfoSet& infos);
38 
39 			const BPackageInfoSet& InactivePackageInfos() const;
40 			void				SetInactivePackageInfos(
41 									const BPackageInfoSet& infos);
42 
43 			int64				ChangeCount() const;
44 			void				SetChangeCount(int64 changeCount);
45 
46 private:
47 			BPackageInstallationLocation fLocation;
48 			node_ref			fBaseDirectoryRef;
49 			node_ref			fPackageDirectoryRef;
50 			BPackageInfoSet		fActivePackageInfos;
51 			BPackageInfoSet		fInactivePackageInfos;
52 			int64				fChangeCount;
53 };
54 
55 
56 }	// namespace BPackageKit
57 
58 
59 #endif	// _PACKAGE__INSTALLATION_LOCATION_INFO_H_
60