51 unsigned long long MaximumSize;
56 void Proxy(std::string
const &Proxy) APT_HIDDEN;
66 std::vector<std::string> GPGVOutput;
70 unsigned long long Size;
71 unsigned long long ResumePoint;
73 void TakeHashes(
class Hashes &Hash);
81 std::vector<std::string> Messages;
84 std::string FailReason;
85 std::string UsedMirror;
90 virtual bool Fetch(
FetchItem * ) {
return true;};
91 virtual bool URIAcquire(std::string
const &, FetchItem *Itm) {
return Fetch(Itm); };
94 void Fail(
bool Transient =
false);
95 void FailWithContext(std::string Why,
bool Transient, std::unordered_map<std::string, std::string> &fields);
96 inline void Fail(
const char *Why,
bool Transient =
false) {Fail(std::string(Why),Transient);};
97 virtual void Fail(std::string Why,
bool Transient =
false);
98 virtual void URIStart(FetchResult &Res);
99 virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
100 void SendMessage(std::string
const &header, std::unordered_map<std::string, std::string> &&fields);
102 bool MediaFail(std::string Required,std::string Drive);
103 virtual void Exit() {};
108 SingleInstance = (1 << 0),
110 SendConfig = (1 << 2),
111 LocalOnly = (1 << 3),
112 NeedsCleanup = (1 << 4),
113 Removable = (1 << 5),
114 AuxRequests = (1 << 6),
115 SendURIEncoded = (1 << 7),
118 void Log(
const char *Format,...);
119 void Status(
const char *Format,...);
121 void Redirect(
const std::string &NewURI);
123 int Run(
bool Single =
false);
124 inline void SetFailReason(std::string Msg) {FailReason = Msg;};
125 inline void SetIP(std::string aIP) {IP = aIP;};
129 void DropPrivsOrDie();
131 APT_HIDDEN
void Dequeue();