00001
00002
00003
00004
00005 #ifndef __PACKAGEVERSION_H__
00006 #define __PACKAGEVERSION_H__
00007
00008 #include "package.h"
00009 #include "pmstring.h"
00010
00011
00012
00013
00014 class MaskedStates
00015 {
00016 public:
00017 MaskedStates();
00018 void Reset(MaskedStatus state);
00019
00020 long Alpha : 3;
00021 long Amd64 : 3;
00022 long Arm : 3;
00023 long Hppa : 3;
00024 long Ia64 : 3;
00025 long Mips : 3;
00026 long Ppc : 3;
00027 long Ppc64 : 3;
00028 long PpcMacOs : 3;
00029 long S390 : 3;
00030 long Sh : 3;
00031 long Sparc : 3;
00032 long X86 : 3;
00033 };
00034
00035
00036
00037 enum Keyword
00038 {
00039 eAlphaUnstable,
00040 eAlphaStable,
00041 eAmd64Unstable,
00042 eAmd64Stable,
00043 eArmUnstable,
00044 eArmStable,
00045 eHppaUnstable,
00046 eHppaStable,
00047 eIa64Unstable,
00048 eIa64Stable,
00049 eMipsUnstable,
00050 eMipsStable,
00051 ePpcUnstable,
00052 ePpcStable,
00053 ePpc64Unstable,
00054 ePpc64Stable,
00055 ePpcMacOsUnstable,
00056 ePpcMacOsStable,
00057 eS390Unstable,
00058 eS390Stable,
00059 eShUnstable,
00060 eShStable,
00061 eSparcUnstable,
00062 eSparcStable,
00063 eX86Unstable,
00064 eX86Stable
00065 };
00066
00067
00068
00069
00070
00071 class PackageVersion : public Package
00072 {
00073 public:
00074 PackageVersion();
00075 PackageVersion(PMString version);
00076 PackageVersion(const PackageVersion ©);
00077 PackageVersion(const Package ©);
00078 virtual ~PackageVersion();
00079
00080 bool operator== (const PackageVersion& param);
00081 bool operator!= (const PackageVersion& param);
00082 bool operator== (const Package& param);
00083 bool operator!= (const Package& param);
00084
00085 virtual Dbt GetKey();
00086 virtual Dbt GetData();
00087 virtual void ReadData(Dbt data);
00088 virtual void ReadKey(Dbt key);
00089
00090 void ProcessMasking(PMString maskedString);
00091 void CalculateSize();
00092
00093 bool IsHardmasked(Keyword keyword);
00094 bool IsUnstable(Keyword keyword);
00095 bool IsStable(Keyword keyword);
00096 bool CheckVersionWithKeyword(Keyword keyword);
00097
00098 MaskedStates versionMaskedState;
00099 PMString version;
00100 PMString sourceUrl;
00101 PMString possibleVirtuals;
00102 PMString slot;
00103 PMString licence;
00104 PMString compileDepend;
00105 PMString runDepend;
00106 PMString postDepend;
00107 int fileSize;
00108
00109 protected:
00110 };
00111
00112 #endif