]> git.saurik.com Git - apt.git/blob - methods/https.h
Add a more or less useful README file for everything related to MultiArch
[apt.git] / methods / https.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
3 // $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
4 /* ######################################################################
5
6 HTTP Acquire Method - This is the HTTP aquire method for APT.
7
8 ##################################################################### */
9 /*}}}*/
10
11 #ifndef APT_HTTP_H
12 #define APT_HTTP_H
13
14 #define MAXLEN 360
15
16 #include <iostream>
17 #include <curl/curl.h>
18
19 using std::cout;
20 using std::endl;
21
22 class HttpsMethod;
23
24
25 class HttpsMethod : public pkgAcqMethod
26 {
27
28 virtual bool Fetch(FetchItem *);
29 static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
30 static int progress_callback(void *clientp, double dltotal, double dlnow,
31 double ultotal, double ulnow);
32 void SetupProxy();
33 CURL *curl;
34 FetchResult Res;
35
36 public:
37 FileFd *File;
38
39 HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig)
40 {
41 File = 0;
42 curl = curl_easy_init();
43 };
44 };
45
46 URI Proxy;
47
48 #endif