Files
haiku-beta6/headers/os/package/InstallationLocationInfo.h
T
Augustin Cavalier 79ab5081b2 Package Kit: Rename InstallationLocationInfo::OldState to ActiveState.
It doesn't refer to some random old state, but the currently active
one. (If the currently active state is the default one, then it will
return nothing.) So, this should make things clearer.

Change-Id: Ib3fe842f5fb51eaf2ef2f31bad8b292b47a3fb36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10403
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-03 22:14:57 +00:00

70 lines
1.8 KiB
C++

/*
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__INSTALLATION_LOCATION_INFO_H_
#define _PACKAGE__INSTALLATION_LOCATION_INFO_H_
#include <Node.h>
#include <String.h>
#include <package/PackageDefs.h>
#include <package/PackageInfoSet.h>
namespace BPackageKit {
class BInstallationLocationInfo {
public:
BInstallationLocationInfo();
~BInstallationLocationInfo();
void Unset();
BPackageInstallationLocation Location() const;
void SetLocation(
BPackageInstallationLocation location);
const node_ref& BaseDirectoryRef() const;
status_t SetBaseDirectoryRef(const node_ref& ref);
const node_ref& PackagesDirectoryRef() const;
status_t SetPackagesDirectoryRef(const node_ref& ref);
const BPackageInfoSet& LatestActivePackageInfos() const;
void SetLatestActivePackageInfos(
const BPackageInfoSet& infos);
const BPackageInfoSet& LatestInactivePackageInfos() const;
void SetLatestInactivePackageInfos(
const BPackageInfoSet& infos);
const BPackageInfoSet& CurrentlyActivePackageInfos() const;
void SetCurrentlyActivePackageInfos(
const BPackageInfoSet& infos);
const BString& ActiveStateName() const;
void SetActiveStateName(const BString& name);
int64 ChangeCount() const;
void SetChangeCount(int64 changeCount);
private:
BPackageInstallationLocation fLocation;
node_ref fBaseDirectoryRef;
node_ref fPackageDirectoryRef;
BPackageInfoSet fLatestActivePackageInfos;
BPackageInfoSet fLatestInactivePackageInfos;
BPackageInfoSet fCurrentlyActivePackageInfos;
BString fActiveStateName;
int64 fChangeCount;
};
} // namespace BPackageKit
#endif // _PACKAGE__INSTALLATION_LOCATION_INFO_H_