debrecords.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: debrecords.h,v 1.7 2001/02/20 07:03:17 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. #ifdef __GNUG__
  14. #pragma interface "apt-pkg/debrecords.h"
  15. #endif
  16. #include <apt-pkg/pkgrecords.h>
  17. #include <apt-pkg/tagfile.h>
  18. class debRecordParser : public pkgRecords::Parser
  19. {
  20. FileFd File;
  21. pkgTagFile Tags;
  22. pkgTagSection Section;
  23. protected:
  24. virtual bool Jump(pkgCache::VerFileIterator const &Ver);
  25. public:
  26. // These refer to the archive file for the Version
  27. virtual string FileName();
  28. virtual string MD5Hash();
  29. virtual string SourcePkg();
  30. // These are some general stats about the package
  31. virtual string Maintainer();
  32. virtual string ShortDesc();
  33. virtual string LongDesc();
  34. virtual string Name();
  35. virtual void GetRec(const char *&Start,const char *&Stop);
  36. debRecordParser(string FileName,pkgCache &Cache);
  37. };
  38. #endif