X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1b8862162eba9de28c1d0ae0082f40d4c6bbcbe3..5674f6b3163d73260e25ce7d350aaac50071eb0e:/apt-pkg/pkgrecords.h?ds=sidebyside diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index ad3946c1b..3658435e8 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -17,26 +17,23 @@ #ifndef PKGLIB_PKGRECORDS_H #define PKGLIB_PKGRECORDS_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/pkgrecords.h" -#endif #include -#include #include -class pkgRecords +class pkgRecords /*{{{*/ { public: class Parser; private: + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; pkgCache &Cache; std::vectorFiles; - public: - + public: // Lookup function Parser &Lookup(pkgCache::VerFileIterator const &Ver); Parser &Lookup(pkgCache::DescFileIterator const &Desc); @@ -45,8 +42,8 @@ class pkgRecords pkgRecords(pkgCache &Cache); ~pkgRecords(); }; - -class pkgRecords::Parser + /*}}}*/ +class pkgRecords::Parser /*{{{*/ { protected: @@ -57,21 +54,28 @@ class pkgRecords::Parser friend class pkgRecords; // These refer to the archive file for the Version - virtual string FileName() {return string();}; - virtual string MD5Hash() {return string();}; - virtual string SHA1Hash() {return string();}; - virtual string SourcePkg() {return string();}; + virtual std::string FileName() {return std::string();}; + virtual std::string MD5Hash() {return std::string();}; + virtual std::string SHA1Hash() {return std::string();}; + virtual std::string SHA256Hash() {return std::string();}; + virtual std::string SHA512Hash() {return std::string();}; + virtual std::string SourcePkg() {return std::string();}; + virtual std::string SourceVer() {return std::string();}; // These are some general stats about the package - virtual string Maintainer() {return string();}; - virtual string ShortDesc() {return string();}; - virtual string LongDesc() {return string();}; - virtual string Name() {return string();}; - + virtual std::string Maintainer() {return std::string();}; + virtual std::string ShortDesc() {return std::string();}; + virtual std::string LongDesc() {return std::string();}; + virtual std::string Name() {return std::string();}; + virtual std::string Homepage() {return std::string();} + + // An arbitrary custom field + virtual std::string RecordField(const char *fieldName) { return std::string();}; + // The record in binary form virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;}; virtual ~Parser() {}; }; - + /*}}}*/ #endif