InstallationLocationInfo.h revision 5a1c6a70
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
11#include <package/PackageDefs.h>
12#include <package/PackageInfoSet.h>
13
14
15namespace BPackageKit {
16
17
18class BInstallationLocationInfo {
19public:
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& LatestActivePackageInfos() const;
36			void				SetLatestActivePackageInfos(
37									const BPackageInfoSet& infos);
38
39			const BPackageInfoSet& LatestInactivePackageInfos() const;
40			void				SetLatestInactivePackageInfos(
41									const BPackageInfoSet& infos);
42									const BPackageInfoSet& infos);
43
44			int64				ChangeCount() const;
45			void				SetChangeCount(int64 changeCount);
46
47private:
48			BPackageInstallationLocation fLocation;
49			node_ref			fBaseDirectoryRef;
50			node_ref			fPackageDirectoryRef;
51			BPackageInfoSet		fLatestActivePackageInfos;
52			BPackageInfoSet		fLatestInactivePackageInfos;
53			int64				fChangeCount;
54};
55
56
57}	// namespace BPackageKit
58
59
60#endif	// _PACKAGE__INSTALLATION_LOCATION_INFO_H_
61