- virtual void GetRec(const char *&Start,const char *&Stop);
-
- debRecordParser(string FileName,pkgCache &Cache);
+ // An arbitrary custom field
+ virtual std::string RecordField(const char *fieldName) APT_OVERRIDE;
+
+ virtual void GetRec(const char *&Start,const char *&Stop) APT_OVERRIDE;
+
+ debRecordParserBase();
+ virtual ~debRecordParserBase();
+};
+
+class APT_HIDDEN debRecordParser : public debRecordParserBase
+{
+ void * const d;
+ protected:
+ FileFd File;
+ pkgTagFile Tags;
+
+ virtual bool Jump(pkgCache::VerFileIterator const &Ver) APT_OVERRIDE;
+ virtual bool Jump(pkgCache::DescFileIterator const &Desc) APT_OVERRIDE;
+
+ public:
+ debRecordParser(std::string FileName,pkgCache &Cache);
+ virtual ~debRecordParser();
+};
+
+// custom record parser that reads deb files directly
+class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
+{
+ void * const d;
+ std::string debFileName;
+ std::string controlContent;
+
+ APT_HIDDEN bool LoadContent();
+ protected:
+ // single file files, so no jumping whatsoever
+ bool Jump(pkgCache::VerFileIterator const &) APT_OVERRIDE;
+ bool Jump(pkgCache::DescFileIterator const &) APT_OVERRIDE;
+
+ public:
+ virtual std::string FileName() APT_OVERRIDE;
+
+ debDebFileRecordParser(std::string FileName);
+ virtual ~debDebFileRecordParser();