X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a305f593f72a69d92db8d28d14196f7e6311a8c0..b09e09c756861ab167647ec61ac59b85c2928be6:/methods/http.h diff --git a/methods/http.h b/methods/http.h index c5a4d0e86..dec5cd80f 100644 --- a/methods/http.h +++ b/methods/http.h @@ -3,7 +3,7 @@ // $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $ /* ###################################################################### - HTTP Aquire Method - This is the HTTP aquire method for APT. + HTTP Acquire Method - This is the HTTP aquire method for APT. ##################################################################### */ /*}}}*/ @@ -13,7 +13,7 @@ #define MAXLEN 360 -#include + using std::cout; using std::endl; @@ -31,6 +31,11 @@ class CircleBuf unsigned long MaxGet; struct timeval Start; + static unsigned long BwReadLimit; + static unsigned long BwTickReadData; + static struct timeval BwReadTick; + static const unsigned int BW_HZ; + unsigned long LeftRead() { unsigned long Sz = Size - (InP - OutP); @@ -129,7 +134,6 @@ class HttpMethod : public pkgAcqMethod bool ServerDie(ServerState *Srv); int DealWithHeaders(FetchResult &Res,ServerState *Srv); - virtual bool Fetch(FetchItem *); virtual bool Configuration(string Message); // In the event of a fatal signal this file will be closed and timestamped. @@ -137,6 +141,9 @@ class HttpMethod : public pkgAcqMethod static int FailFd; static time_t FailTime; static void SigTerm(int); + + protected: + virtual bool Fetch(FetchItem *); public: friend class ServerState; @@ -153,6 +160,4 @@ class HttpMethod : public pkgAcqMethod }; }; -URI Proxy; - #endif