xref: /haiku/headers/os/package/InstallationLocationInfo.h (revision 83b1a68c52ba3e0e8796282759f694b7fdddf06d)
1 /*
2  * Copyright 2013-2014, 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 #include <String.h>
11 
12 #include <package/PackageDefs.h>
13 #include <package/PackageInfoSet.h>
14 
15 
16 namespace BPackageKit {
17 
18 
19 class BInstallationLocationInfo {
20 public:
21 								BInstallationLocationInfo();
22 								~BInstallationLocationInfo();
23 
24 			void				Unset();
25 
26 			BPackageInstallationLocation Location() const;
27 			void				SetLocation(
28 									BPackageInstallationLocation location);
29 
30 			const node_ref&		BaseDirectoryRef() const;
31 			status_t			SetBaseDirectoryRef(const node_ref& ref);
32 
33 			const node_ref&		PackagesDirectoryRef() const;
34 			status_t			SetPackagesDirectoryRef(const node_ref& ref);
35 
36 			const BPackageInfoSet& LatestActivePackageInfos() const;
37 			void				SetLatestActivePackageInfos(
38 									const BPackageInfoSet& infos);
39 
40 			const BPackageInfoSet& LatestInactivePackageInfos() const;
41 			void				SetLatestInactivePackageInfos(
42 									const BPackageInfoSet& infos);
43 
44 			const BPackageInfoSet& CurrentlyActivePackageInfos() const;
45 			void				SetCurrentlyActivePackageInfos(
46 									const BPackageInfoSet& infos);
47 
48 			const BString&		OldStateName() const;
49 			void				SetOldStateName(const BString& name);
50 
51 			int64				ChangeCount() const;
52 			void				SetChangeCount(int64 changeCount);
53 
54 private:
55 			BPackageInstallationLocation fLocation;
56 			node_ref			fBaseDirectoryRef;
57 			node_ref			fPackageDirectoryRef;
58 			BPackageInfoSet		fLatestActivePackageInfos;
59 			BPackageInfoSet		fLatestInactivePackageInfos;
60 			BPackageInfoSet		fCurrentlyActivePackageInfos;
61 			BString				fOldStateName;
62 			int64				fChangeCount;
63 };
64 
65 
66 }	// namespace BPackageKit
67 
68 
69 #endif	// _PACKAGE__INSTALLATION_LOCATION_INFO_H_
70