]> git.saurik.com Git - apt.git/blame_incremental - methods/https.h
merged from lp:~donkult/apt/experimental
[apt.git] / methods / https.h
... / ...
CommitLineData
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_HTTPS_H
12#define APT_HTTPS_H
13
14#include <iostream>
15#include <curl/curl.h>
16
17using std::cout;
18using std::endl;
19
20class HttpsMethod;
21class FileFd;
22
23class HttpsMethod : public pkgAcqMethod
24{
25 // minimum speed in bytes/se that triggers download timeout handling
26 static const int DL_MIN_SPEED = 10;
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#include <apt-pkg/strutl.h>
47URI Proxy;
48
49#endif