X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/25613a61f6f3b9e54d5229af7e2278d0fa54bdd9..a09f6eb8fc67cd2d836019f448f18580396185e5:/methods/https.h diff --git a/methods/https.h b/methods/https.h index 45d1f7f63..4cc48fc34 100644 --- a/methods/https.h +++ b/methods/https.h @@ -52,25 +52,33 @@ class HttpsServerState : public ServerState virtual ~HttpsServerState() {Close();}; }; -class HttpsMethod : public pkgAcqMethod +class HttpsMethod : public ServerMethod { // minimum speed in bytes/se that triggers download timeout handling static const int DL_MIN_SPEED = 10; virtual bool Fetch(FetchItem *); + static size_t parse_header(void *buffer, size_t size, size_t nmemb, void *userp); static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp); - static int progress_callback(void *clientp, double dltotal, double dlnow, - double ultotal, double ulnow); + static int progress_callback(void *clientp, double dltotal, double dlnow, + double ultotal, double ulnow); void SetupProxy(); CURL *curl; - FetchResult Res; - HttpsServerState *Server; + ServerState *Server; + + // Used by ServerMethods unused by https + virtual void SendReq(FetchItem *) { exit(42); } + virtual void RotateDNS() { exit(42); } public: FileFd *File; - HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), Server(NULL), File(NULL) + virtual bool Configuration(std::string Message); + virtual ServerState * CreateServerState(URI uri); + using pkgAcqMethod::FetchResult; + + HttpsMethod() : ServerMethod("1.2",Pipeline | SendConfig), File(NULL) { curl = curl_easy_init(); };