apt @VERSION@
|
00001 // -*- mode: cpp; mode: fold -*- 00002 // Description /*{{{*/ 00003 // $Id: debrecords.h,v 1.8 2001/03/13 06:51:46 jgg Exp $ 00004 /* ###################################################################### 00005 00006 Debian Package Records - Parser for debian package records 00007 00008 This provides display-type parsing for the Packages file. This is 00009 different than the the list parser which provides cache generation 00010 services. There should be no overlap between these two. 00011 00012 ##################################################################### */ 00013 /*}}}*/ 00014 #ifndef PKGLIB_DEBRECORDS_H 00015 #define PKGLIB_DEBRECORDS_H 00016 00017 #include <apt-pkg/pkgrecords.h> 00018 #include <apt-pkg/indexfile.h> 00019 #include <apt-pkg/tagfile.h> 00020 00021 class debRecordParser : public pkgRecords::Parser 00022 { 00024 void *d; 00025 00026 FileFd File; 00027 pkgTagFile Tags; 00028 pkgTagSection Section; 00029 00030 protected: 00031 00032 virtual bool Jump(pkgCache::VerFileIterator const &Ver); 00033 virtual bool Jump(pkgCache::DescFileIterator const &Desc); 00034 00035 public: 00036 00037 // These refer to the archive file for the Version 00038 virtual string FileName(); 00039 virtual string MD5Hash(); 00040 virtual string SHA1Hash(); 00041 virtual string SHA256Hash(); 00042 virtual string SHA512Hash(); 00043 virtual string SourcePkg(); 00044 virtual string SourceVer(); 00045 00046 // These are some general stats about the package 00047 virtual string Maintainer(); 00048 virtual string ShortDesc(); 00049 virtual string LongDesc(); 00050 virtual string Name(); 00051 virtual string Homepage(); 00052 00053 // An arbitrary custom field 00054 virtual string RecordField(const char *fieldName); 00055 00056 virtual void GetRec(const char *&Start,const char *&Stop); 00057 00058 debRecordParser(string FileName,pkgCache &Cache); 00059 virtual ~debRecordParser() {}; 00060 }; 00061 00062 #endif