- 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 SourcePkg() {return std::string();};
+ virtual std::string SourceVer() {return std::string();};
+
+ /** return all known hashes in this record.
+ *
+ * For authentication proposes packages come with hashsums which
+ * this method is supposed to parse and return so that clients can
+ * 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