HaikuDepot: Add PackageInfo flag for system dependencies.

This commit is contained in:
Rene Gollent
2013-10-07 23:05:07 -04:00
parent 73f8409af2
commit 6ec9478bd2
2 changed files with 21 additions and 4 deletions
+16 -4
View File
@@ -450,7 +450,8 @@ PackageInfo::PackageInfo()
fScreenshots(),
fState(NONE),
fDownloadProgress(0.0),
fFlags(0)
fFlags(0),
fSystemDependency(false)
{
}
@@ -472,7 +473,8 @@ PackageInfo::PackageInfo(const BitmapRef& icon, const BString& title,
fScreenshots(),
fState(NONE),
fDownloadProgress(0.0),
fFlags(flags)
fFlags(flags),
fSystemDependency(false)
{
}
@@ -492,7 +494,8 @@ PackageInfo::PackageInfo(const PackageInfo& other)
fState(other.fState),
fInstallationLocations(other.fInstallationLocations),
fDownloadProgress(other.fDownloadProgress),
fFlags(other.fFlags)
fFlags(other.fFlags),
fSystemDependency(other.fSystemDependency)
{
}
@@ -514,6 +517,7 @@ PackageInfo::operator=(const PackageInfo& other)
fInstallationLocations = other.fInstallationLocations;
fDownloadProgress = other.fDownloadProgress;
fFlags = other.fFlags;
fSystemDependency = other.fSystemDependency;
return *this;
}
@@ -533,7 +537,8 @@ PackageInfo::operator==(const PackageInfo& other) const
&& fScreenshots == other.fScreenshots
&& fState == other.fState
&& fFlags == other.fFlags
&& fDownloadProgress == other.fDownloadProgress;
&& fDownloadProgress == other.fDownloadProgress
&& fSystemDependency == other.fSystemDependency;
}
@@ -558,6 +563,13 @@ PackageInfo::AddCategory(const CategoryRef& category)
}
void
PackageInfo::SetSystemDependency(bool isDependency)
{
fSystemDependency = isDependency;
}
void
PackageInfo::SetState(PackageState state)
{
+5
View File
@@ -232,6 +232,10 @@ public:
{ return fFlags; }
bool IsSystemPackage() const;
bool IsSystemDependency() const
{ return fSystemDependency; }
void SetSystemDependency(bool isDependency);
PackageState State() const
{ return fState; }
void SetState(PackageState state);
@@ -283,6 +287,7 @@ private:
float fDownloadProgress;
PackageListenerList fListeners;
int32 fFlags;
bool fSystemDependency;
};