summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debrecords.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/debrecords.h')
-rw-r--r--apt-pkg/deb/debrecords.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
index bdac6c90b..2bd3f3c8f 100644
--- a/apt-pkg/deb/debrecords.h
+++ b/apt-pkg/deb/debrecords.h
@@ -29,31 +29,28 @@ class debRecordParser : public pkgRecords::Parser
{
/** \brief dpointer placeholder (for later in case we need it) */
void *d;
-
+
+ protected:
FileFd File;
pkgTagFile Tags;
pkgTagSection Section;
- protected:
-
virtual bool Jump(pkgCache::VerFileIterator const &Ver);
virtual bool Jump(pkgCache::DescFileIterator const &Desc);
- public:
+ public:
// These refer to the archive file for the Version
virtual std::string FileName();
- virtual std::string MD5Hash();
- virtual std::string SHA1Hash();
- virtual std::string SHA256Hash();
- virtual std::string SHA512Hash();
virtual std::string SourcePkg();
virtual std::string SourceVer();
-
+
+ virtual HashStringList Hashes() const;
+
// These are some general stats about the package
virtual std::string Maintainer();
- virtual std::string ShortDesc();
- virtual std::string LongDesc();
+ virtual std::string ShortDesc(std::string const &lang);
+ virtual std::string LongDesc(std::string const &lang);
virtual std::string Name();
virtual std::string Homepage();
@@ -66,4 +63,15 @@ class debRecordParser : public pkgRecords::Parser
virtual ~debRecordParser() {};
};
+// custom record parser that reads deb files directly
+class debDebFileRecordParser : public debRecordParser
+{
+ public:
+ virtual std::string FileName() {
+ return File.Name();
+ }
+ debDebFileRecordParser(std::string FileName,pkgCache &Cache)
+ : debRecordParser(FileName, Cache) {};
+};
+
#endif