InstallationLocation: Rename [in]activePackages properties

Add prefix "Latest".
This commit is contained in:
Ingo Weinhold 2014-05-01 23:50:18 +02:00
parent 870e93acf8
commit 5a1c6a7089
4 changed files with 29 additions and 26 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2013, Haiku, Inc. All Rights Reserved.
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__INSTALLATION_LOCATION_INFO_H_
@ -32,12 +32,13 @@ public:
const node_ref& PackagesDirectoryRef() const;
status_t SetPackagesDirectoryRef(const node_ref& ref);
const BPackageInfoSet& ActivePackageInfos() const;
void SetActivePackageInfos(
const BPackageInfoSet& LatestActivePackageInfos() const;
void SetLatestActivePackageInfos(
const BPackageInfoSet& infos);
const BPackageInfoSet& InactivePackageInfos() const;
void SetInactivePackageInfos(
const BPackageInfoSet& LatestInactivePackageInfos() const;
void SetLatestInactivePackageInfos(
const BPackageInfoSet& infos);
const BPackageInfoSet& infos);
int64 ChangeCount() const;
@ -47,8 +48,8 @@ private:
BPackageInstallationLocation fLocation;
node_ref fBaseDirectoryRef;
node_ref fPackageDirectoryRef;
BPackageInfoSet fActivePackageInfos;
BPackageInfoSet fInactivePackageInfos;
BPackageInfoSet fLatestActivePackageInfos;
BPackageInfoSet fLatestInactivePackageInfos;
int64 fChangeCount;
};

View File

@ -1,5 +1,5 @@
/*
* Copyright 2013, Haiku, Inc. All Rights Reserved.
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -87,8 +87,8 @@ BDaemonClient::GetInstallationLocationInfo(
_info.SetBaseDirectoryRef(node_ref(baseDirectoryDevice, baseDirectoryNode));
_info.SetPackagesDirectoryRef(
node_ref(packagesDirectoryDevice, packagesDirectoryNode));
_info.SetActivePackageInfos(activePackages);
_info.SetInactivePackageInfos(inactivePackages);
_info.SetLatestActivePackageInfos(activePackages);
_info.SetLatestInactivePackageInfos(inactivePackages);
_info.SetChangeCount(changeCount);
return B_OK;
@ -158,7 +158,7 @@ BDaemonClient::CreateTransaction(BPackageInstallationLocation location,
error = entryRef.set_name(PACKAGES_DIRECTORY_ADMIN_DIRECTORY);
if (error != B_OK)
return error;
BDirectory adminDirectory;
error = adminDirectory.SetTo(&entryRef);
if (error != B_OK)

View File

@ -1,5 +1,5 @@
/*
* Copyright 2013, Haiku, Inc. All Rights Reserved.
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -18,8 +18,8 @@ BInstallationLocationInfo::BInstallationLocationInfo()
fLocation(B_PACKAGE_INSTALLATION_LOCATION_ENUM_COUNT),
fBaseDirectoryRef(),
fPackageDirectoryRef(),
fActivePackageInfos(),
fInactivePackageInfos(),
fLatestActivePackageInfos(),
fLatestInactivePackageInfos(),
fChangeCount(0)
{
}
@ -36,8 +36,8 @@ BInstallationLocationInfo::Unset()
fLocation = B_PACKAGE_INSTALLATION_LOCATION_ENUM_COUNT;
fBaseDirectoryRef = node_ref();
fPackageDirectoryRef = node_ref();
fActivePackageInfos.MakeEmpty();
fInactivePackageInfos.MakeEmpty();
fLatestActivePackageInfos.MakeEmpty();
fLatestInactivePackageInfos.MakeEmpty();
fChangeCount = 0;
}
@ -87,30 +87,32 @@ BInstallationLocationInfo::SetPackagesDirectoryRef(const node_ref& ref)
const BPackageInfoSet&
BInstallationLocationInfo::ActivePackageInfos() const
BInstallationLocationInfo::LatestActivePackageInfos() const
{
return fActivePackageInfos;
return fLatestActivePackageInfos;
}
void
BInstallationLocationInfo::SetActivePackageInfos(const BPackageInfoSet& infos)
BInstallationLocationInfo::SetLatestActivePackageInfos(
const BPackageInfoSet& infos)
{
fActivePackageInfos = infos;
fLatestActivePackageInfos = infos;
}
const BPackageInfoSet&
BInstallationLocationInfo::InactivePackageInfos() const
BInstallationLocationInfo::LatestInactivePackageInfos() const
{
return fInactivePackageInfos;
return fLatestInactivePackageInfos;
}
void
BInstallationLocationInfo::SetInactivePackageInfos(const BPackageInfoSet& infos)
BInstallationLocationInfo::SetLatestInactivePackageInfos(
const BPackageInfoSet& infos)
{
fInactivePackageInfos = infos;
fLatestInactivePackageInfos = infos;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Copyright 2011-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -217,7 +217,7 @@ BPackageRoster::GetActivePackages(BPackageInstallationLocation location,
if (error != B_OK)
return error;
packageInfos = info.ActivePackageInfos();
packageInfos = info.LatestActivePackageInfos();
return B_OK;
#else
return B_NOT_SUPPORTED;