X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/cae9cdcefc34eba6d023cb30cbbdb9bbf909b8fe..bda94cb8432b3905f5757e92573fd16e73cb183f:/apt-pkg/acquire-method.h diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 9e908d32c..03851e823 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -10,15 +10,19 @@ ##################################################################### */ /*}}}*/ + +/** \addtogroup acquire + * @{ + * + * \file acquire-method.h + */ + #ifndef PKGLIB_ACQUIRE_METHOD_H #define PKGLIB_ACQUIRE_METHOD_H #include #include -#ifdef __GNUG__ -#pragma interface "apt-pkg/acquire-method.h" -#endif class Hashes; class pkgAcqMethod @@ -33,13 +37,14 @@ class pkgAcqMethod string DestFile; time_t LastModified; bool IndexFile; - string ExpectedMD5; + bool FailIgnore; }; struct FetchResult { string MD5Sum; string SHA1Sum; + string SHA256Sum; vector GPGVOutput; time_t LastModified; bool IMSHit; @@ -55,7 +60,9 @@ class pkgAcqMethod vector Messages; FetchItem *Queue; FetchItem *QueueBack; - string FailExtra; + string FailReason; + string UsedMirror; + string IP; // Handlers for messages virtual bool Configuration(string Message); @@ -72,7 +79,6 @@ class pkgAcqMethod virtual void Exit() {}; public: - enum CnfFlags {SingleInstance = (1<<0), Pipeline = (1<<1), SendConfig = (1<<2), LocalOnly = (1<<3), NeedsCleanup = (1<<4), @@ -81,11 +87,16 @@ class pkgAcqMethod void Log(const char *Format,...); void Status(const char *Format,...); + void Redirect(const string &NewURI); + int Run(bool Single = false); - inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;}; + inline void SetFailReason(string Msg) {FailReason = Msg;}; + inline void SetIP(string aIP) {IP = aIP;}; pkgAcqMethod(const char *Ver,unsigned long Flags = 0); virtual ~pkgAcqMethod() {}; }; +/** @} */ + #endif