]> git.saurik.com Git - apt.git/blobdiff - methods/https.h
Merge branch 'debian/sid' into debian/experimental
[apt.git] / methods / https.h
index 3199b29f221fcc48cb2b171ee988d59d97c2832b..9df18e83a261ef489231ee65c468b6fcd91d6a5e 100644 (file)
 #ifndef APT_HTTPS_H
 #define APT_HTTPS_H
 
-#include <iostream>
+#include <apt-pkg/acquire-method.h>
+
 #include <curl/curl.h>
+#include <iostream>
+#include <stddef.h>
+#include <string>
 
 #include "server.h"
 
 using std::cout;
 using std::endl;
 
+class Hashes;
 class HttpsMethod;
 class FileFd;
 
@@ -53,6 +58,8 @@ class HttpsMethod : public pkgAcqMethod
    static const int DL_MIN_SPEED = 10;
 
    virtual bool Fetch(FetchItem *);
+   virtual bool Configuration(std::string Message);
+
    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, 
@@ -61,13 +68,13 @@ class HttpsMethod : public pkgAcqMethod
    CURL *curl;
    FetchResult Res;
    HttpsServerState *Server;
+   unsigned long long TotalWritten;
 
    public:
    FileFd *File;
       
-   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), File(NULL)
+   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), Server(NULL), TotalWritten(0), File(NULL)
    {
-      File = 0;
       curl = curl_easy_init();
    };