diff --git a/src/apps/haikudepot/PackageInfo.cpp b/src/apps/haikudepot/PackageInfo.cpp index 5efae9381b..762d900b51 100644 --- a/src/apps/haikudepot/PackageInfo.cpp +++ b/src/apps/haikudepot/PackageInfo.cpp @@ -469,6 +469,58 @@ RatingSummary::operator!=(const RatingSummary& other) const } +// #pragma mark - StabilityRating + + +StabilityRating::StabilityRating() + : + fLabel(), + fName() +{ +} + + +StabilityRating::StabilityRating(const BString& label, + const BString& name) + : + fLabel(label), + fName(name) +{ +} + + +StabilityRating::StabilityRating(const StabilityRating& other) + : + fLabel(other.fLabel), + fName(other.fName) +{ +} + + +StabilityRating& +StabilityRating::operator=(const StabilityRating& other) +{ + fLabel = other.fLabel; + fName = other.fName; + return *this; +} + + +bool +StabilityRating::operator==(const StabilityRating& other) const +{ + return fLabel == other.fLabel + && fName == other.fName; +} + + +bool +StabilityRating::operator!=(const StabilityRating& other) const +{ + return !(*this == other); +} + + // #pragma mark - PublisherInfo diff --git a/src/apps/haikudepot/PackageInfo.h b/src/apps/haikudepot/PackageInfo.h index f54646ac50..e903851772 100644 --- a/src/apps/haikudepot/PackageInfo.h +++ b/src/apps/haikudepot/PackageInfo.h @@ -147,6 +147,31 @@ public: }; +class StabilityRating { +public: + StabilityRating(); + StabilityRating( + const BString& label, + const BString& name); + StabilityRating(const StabilityRating& other); + + StabilityRating& operator=(const StabilityRating& other); + bool operator==(const StabilityRating& other) const; + bool operator!=(const StabilityRating& other) const; + + const BString& Label() const + { return fLabel; } + const BString& Name() const + { return fName; } +private: + BString fLabel; + BString fName; +}; + + +typedef List StabilityRatingList; + + class PublisherInfo { public: PublisherInfo();