diff options
author | Michael Vogt <mvo@debian.org> | 2015-06-23 12:17:35 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-06-23 12:17:35 +0100 |
commit | 245dde96193702f7f51389d3583dee547f8ba366 (patch) | |
tree | 6cf8c191641c760bcc6a6c08fb0ff65d27e0cffd /apt-pkg/pkgrecords.h | |
parent | 5530255b5f3ad7de2e23dfcb39ce325001126501 (diff) | |
parent | c8a4ce6cbed57ae108dc955d4a850f9b129a0693 (diff) |
Merge remote-tracking branch 'donkult/debian/experimental' into debian/experimental
Diffstat (limited to 'apt-pkg/pkgrecords.h')
-rw-r--r-- | apt-pkg/pkgrecords.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index a902da8b8..66eb17857 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -43,7 +43,7 @@ class pkgRecords /*{{{*/ // Construct destruct pkgRecords(pkgCache &Cache); - ~pkgRecords(); + virtual ~pkgRecords(); }; /*}}}*/ class pkgRecords::Parser /*{{{*/ @@ -68,10 +68,17 @@ class pkgRecords::Parser /*{{{*/ * choose the hash to be used. */ virtual HashStringList Hashes() const { return HashStringList(); }; +#if APT_PKG_ABI >= 413 APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); }; APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); }; APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); }; APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); }; +#else + APT_DEPRECATED std::string MD5Hash() { return GetHashFromHashes("MD5Sum"); }; + APT_DEPRECATED std::string SHA1Hash() { return GetHashFromHashes("SHA1"); }; + APT_DEPRECATED std::string SHA256Hash() { return GetHashFromHashes("SHA256"); }; + APT_DEPRECATED std::string SHA512Hash() { return GetHashFromHashes("SHA512"); }; +#endif // These are some general stats about the package virtual std::string Maintainer() {return std::string();}; @@ -99,10 +106,12 @@ class pkgRecords::Parser /*{{{*/ // The record in binary form virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;}; - - virtual ~Parser() {}; + + Parser(); + virtual ~Parser(); private: + void *d; APT_HIDDEN std::string GetHashFromHashes(char const * const type) const { HashStringList const hashes = Hashes(); |