edsplistparser.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. EDSP Package List Parser - This implements the abstract parser
  5. interface for the APT specific intermediate format which is passed
  6. to external resolvers
  7. ##################################################################### */
  8. /*}}}*/
  9. #ifndef PKGLIB_EDSPLISTPARSER_H
  10. #define PKGLIB_EDSPLISTPARSER_H
  11. #include <apt-pkg/deblistparser.h>
  12. #include <apt-pkg/md5.h>
  13. #include <apt-pkg/pkgcache.h>
  14. #include <apt-pkg/fileutl.h>
  15. #include <string>
  16. #ifndef APT_8_CLEANER_HEADERS
  17. #include <apt-pkg/pkgcachegen.h>
  18. #include <apt-pkg/indexfile.h>
  19. #include <apt-pkg/tagfile.h>
  20. #endif
  21. class APT_HIDDEN edspLikeListParser : public debListParser
  22. {
  23. public:
  24. virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
  25. virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
  26. virtual MD5SumValue Description_md5() APT_OVERRIDE;
  27. virtual unsigned short VersionHash() APT_OVERRIDE;
  28. bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
  29. std::string const &section);
  30. edspLikeListParser(FileFd *File);
  31. virtual ~edspLikeListParser();
  32. };
  33. class APT_HIDDEN edspListParser : public edspLikeListParser
  34. {
  35. FileFd extendedstates;
  36. FileFd preferences;
  37. protected:
  38. virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
  39. public:
  40. edspListParser(FileFd *File);
  41. virtual ~edspListParser();
  42. };
  43. class APT_HIDDEN eippListParser : public edspLikeListParser
  44. {
  45. protected:
  46. virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
  47. public:
  48. eippListParser(FileFd *File);
  49. virtual ~eippListParser();
  50. };
  51. #endif