// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
+#if APT_PKG_ABI >= 413
string pkgAcqDiffIndex::Custom600Headers() const
+#else
+string pkgAcqDiffIndex::Custom600Headers()
+#endif
{
string Final = _config->FindDir("Dir::State::lists");
Final += URItoFileName(Desc.URI);
// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
+#if APT_PKG_ABI >= 413
string pkgAcqIndex::Custom600Headers() const
+#else
+string pkgAcqIndex::Custom600Headers()
+#endif
{
string Final = GetFinalFilename();
/*}}}*/
// pkgAcqMetaSig::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
+#if APT_PKG_ABI >= 413
string pkgAcqMetaSig::Custom600Headers() const
+#else
+string pkgAcqMetaSig::Custom600Headers()
+#endif
{
std::string Header = GetCustom600Headers(RealURI);
return Header;
/*}}}*/
// pkgAcqMetaIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
+#if APT_PKG_ABI >= 413
string pkgAcqMetaIndex::Custom600Headers() const
+#else
+string pkgAcqMetaIndex::Custom600Headers()
+#endif
{
return GetCustom600Headers(RealURI);
}
/*}}}*/
// pkgAcqMetaClearSig::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
+#if APT_PKG_ABI >= 413
string pkgAcqMetaClearSig::Custom600Headers() const
+#else
+string pkgAcqMetaClearSig::Custom600Headers()
+#endif
{
string Header = GetCustom600Headers(RealURI);
Header += "\nFail-Ignore: true";
/*}}}*/
// AcqArchive::IsTrusted - Determine whether this archive comes from a trusted source /*{{{*/
// ---------------------------------------------------------------------
+#if APT_PKG_ABI >= 413
APT_PURE bool pkgAcqArchive::IsTrusted() const
+#else
+APT_PURE bool pkgAcqArchive::IsTrusted()
+#endif
{
return Trusted;
}
// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
+#if APT_PKG_ABI >= 413
string pkgAcqFile::Custom600Headers() const
+#else
+string pkgAcqFile::Custom600Headers()
+#endif
{
if (IsIndexFile)
return "\nIndex-File: true";
* line, so they should (if nonempty) have a leading newline and
* no trailing newline.
*/
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const {return std::string();};
+#else
+ virtual std::string Custom600Headers() {return std::string();};
+#endif
/** \brief A "descriptive" URI-like string.
*
/** \return the acquire process with which this item is associated. */
pkgAcquire *GetOwner() const {return Owner;};
+#if APT_PKG_ABI < 413
+ pkgAcquire *GetOwner() {return Owner;};
+#endif
/** \return \b true if this object is being fetched from a trusted source. */
+#if APT_PKG_ABI >= 413
virtual bool IsTrusted() const {return false;};
+#else
+ virtual bool IsTrusted() {return false;};
+#endif
/** \brief Report mirror problem
*
virtual void Done(std::string Message,unsigned long long Size,
HashStringList const &Hashes,
pkgAcquire::MethodConfig *Cnf);
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
virtual std::string DescURI() {return RealURI; };
/** \brief Create a new pkgAcqMetaSig. */
virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
pkgAcquire::MethodConfig *Cnf);
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
virtual std::string DescURI() {return RealURI; };
virtual void Finished();
public:
virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
virtual void Done(std::string Message,unsigned long long Size,
HashStringList const &Hashes,
pkgAcquire::MethodConfig *Cnf);
virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
pkgAcquire::MethodConfig *Cnf);
virtual std::string DescURI() {return RealURI + "Index";};
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
/** \brief Parse the Index file for a set of Packages diffs.
*
virtual void Done(std::string Message,unsigned long long Size,
HashStringList const &Hashes,
pkgAcquire::MethodConfig *Cnf);
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
virtual std::string DescURI() {return Desc.URI;};
/** \brief Create a pkgAcqIndex.
virtual std::string DescURI() {return Desc.URI;};
virtual std::string ShortDesc() {return Desc.ShortDesc;};
virtual void Finished();
+#if APT_PKG_ABI >= 413
virtual bool IsTrusted() const;
-
+#else
+ virtual bool IsTrusted();
+#endif
+
/** \brief Create a new pkgAcqArchive.
*
* \param Owner The pkgAcquire object with which this item is
virtual void Done(std::string Message,unsigned long long Size, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig *Cnf);
virtual std::string DescURI() {return Desc.URI;};
+#if APT_PKG_ABI >= 413
virtual std::string Custom600Headers() const;
+#else
+ virtual std::string Custom600Headers();
+#endif
/** \brief Create a new pkgAcqFile object.
*
// get hash type used
std::string HashType() const { return Type; };
std::string HashValue() const { return Hash; };
+ APT_DEPRECATED std::string HashType() { return Type; };
+ APT_DEPRECATED std::string HashValue() { return Hash; };
// verify the given filename against the currently loaded hash
bool VerifyFile(std::string filename) const;
* 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();};
}
/*}}}*/
// TagSection::Exists - return True if a tag exists /*{{{*/
+#if APT_PKG_ABI >= 413
bool pkgTagSection::Exists(const char* const Tag) const
+#else
+bool pkgTagSection::Exists(const char* const Tag)
+#endif
{
unsigned int tmp;
return Find(Tag, tmp);
* times, but only the last occurrence is available via Find methods.
*/
unsigned int Count() const;
+#if APT_PKG_ABI >= 413
bool Exists(const char* const Tag) const;
+#else
+ bool Exists(const char* const Tag);
+#endif
inline void Get(const char *&Start,const char *&Stop,unsigned int I) const
{Start = Section + Tags[I].StartTag; Stop = Section + Tags[I+1].StartTag;}