debrecords.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: debrecords.h,v 1.8 2001/03/13 06:51:46 jgg Exp $
  4. /* ######################################################################
  5. Debian Package Records - Parser for debian package records
  6. This provides display-type parsing for the Packages file. This is
  7. different than the the list parser which provides cache generation
  8. services. There should be no overlap between these two.
  9. ##################################################################### */
  10. /*}}}*/
  11. #ifndef PKGLIB_DEBRECORDS_H
  12. #define PKGLIB_DEBRECORDS_H
  13. #include <apt-pkg/pkgrecords.h>
  14. #include <apt-pkg/indexfile.h>
  15. #include <apt-pkg/tagfile.h>
  16. class debRecordParser : public pkgRecords::Parser
  17. {
  18. FileFd File;
  19. pkgTagFile Tags;
  20. pkgTagSection Section;
  21. protected:
  22. virtual bool Jump(pkgCache::VerFileIterator const &Ver);
  23. virtual bool Jump(pkgCache::DescFileIterator const &Desc);
  24. public:
  25. // These refer to the archive file for the Version
  26. virtual string FileName();
  27. virtual string MD5Hash();
  28. virtual string SHA1Hash();
  29. virtual string SHA256Hash();
  30. virtual string SourcePkg();
  31. virtual string SourceVer();
  32. // These are some general stats about the package
  33. virtual string Maintainer();
  34. virtual string ShortDesc();
  35. virtual string LongDesc();
  36. virtual string Name();
  37. virtual string Homepage();
  38. virtual void GetRec(const char *&Start,const char *&Stop);
  39. debRecordParser(string FileName,pkgCache &Cache);
  40. };
  41. #endif