edsplistparser.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. namespace APT {
  22. class StringView;
  23. }
  24. class APT_HIDDEN edspLikeListParser : public debListParser
  25. {
  26. public:
  27. virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
  28. virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
  29. virtual APT::StringView Description_md5() APT_OVERRIDE;
  30. virtual unsigned short VersionHash() APT_OVERRIDE;
  31. bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
  32. std::string const &section);
  33. edspLikeListParser(FileFd *File);
  34. virtual ~edspLikeListParser();
  35. };
  36. class APT_HIDDEN edspListParser : public edspLikeListParser
  37. {
  38. FileFd extendedstates;
  39. FileFd preferences;
  40. protected:
  41. virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
  42. public:
  43. edspListParser(FileFd *File);
  44. virtual ~edspListParser();
  45. };
  46. class APT_HIDDEN eippListParser : public edspLikeListParser
  47. {
  48. protected:
  49. virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
  50. public:
  51. eippListParser(FileFd *File);
  52. virtual ~eippListParser();
  53. };
  54. #endif