summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgrecords.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-07 17:49:36 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-08 14:29:25 +0100
commit02e20767719873fa8f1919bd0e7a75f63e00c484 (patch)
tree248d78b521d6e13ab7bb00a74047486ee72d2635 /apt-pkg/pkgrecords.h
parent765190e493645e13b5651625d87fd9c8db910a85 (diff)
guard const-ification API changes
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/pkgrecords.h')
-rw-r--r--apt-pkg/pkgrecords.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index a902da8b8..bcc05baba 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -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();};