00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PKGLIB_VERSION_H
00021 #define PKGLIB_VERSION_H
00022
00023
00024 #include <apt-pkg/strutl.h>
00025 #include <string>
00026
00027 using std::string;
00028
00029 class pkgVersioningSystem
00030 {
00031 public:
00032
00033 static pkgVersioningSystem **GlobalList;
00034 static unsigned long GlobalListLen;
00035 static pkgVersioningSystem *GetVS(const char *Label);
00036
00037 const char *Label;
00038
00039
00040 virtual int DoCmpVersion(const char *A,const char *Aend,
00041 const char *B,const char *Bend) = 0;
00042
00043 virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0;
00044 virtual int DoCmpReleaseVer(const char *A,const char *Aend,
00045 const char *B,const char *Bend) = 0;
00046 virtual string UpstreamVersion(const char *A) = 0;
00047
00048
00049 virtual bool TestCompatibility(pkgVersioningSystem const &Against)
00050 {return this == &Against;};
00051
00052
00053 APT_MKSTRCMP(CmpVersion,DoCmpVersion);
00054 APT_MKSTRCMP(CmpReleaseVer,DoCmpReleaseVer);
00055
00056 pkgVersioningSystem();
00057 virtual ~pkgVersioningSystem() {};
00058 };
00059
00060 #ifdef APT_COMPATIBILITY
00061 #include <apt-pkg/debversion.h>
00062 #endif
00063
00064 #endif