11
11
#ifndef APT_HTTPS_H
12
12
#define APT_HTTPS_H
14
#include <apt-pkg/acquire-method.h>
16
#include <curl/curl.h>
14
17
#include <iostream>
15
#include <curl/curl.h>
17
21
#include "server.h"
25
30
class HttpsServerState : public ServerState
28
virtual bool ReadHeaderLines(std::string &Data) { return false; }
29
virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) { return false; }
33
virtual bool ReadHeaderLines(std::string &/*Data*/) { return false; }
34
virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) { return false; }
32
virtual bool WriteResponse(std::string const &Data) { return false; }
37
virtual bool WriteResponse(std::string const &/*Data*/) { return false; }
34
39
/** \brief Transfer the data from the socket */
35
virtual bool RunData(FileFd * const File) { return false; }
40
virtual bool RunData(FileFd * const /*File*/) { return false; }
37
42
virtual bool Open() { return false; }
38
43
virtual bool IsOpen() { return false; }
39
44
virtual bool Close() { return false; }
40
virtual bool InitHashes(FileFd &File) { return false; }
45
virtual bool InitHashes(FileFd &/*File*/) { return false; }
41
46
virtual Hashes * GetHashes() { return NULL; }
42
virtual bool Die(FileFd &File) { return false; }
43
virtual bool Flush(FileFd * const File) { return false; }
44
virtual bool Go(bool ToFile, FileFd * const File) { return false; }
47
virtual bool Die(FileFd &/*File*/) { return false; }
48
virtual bool Flush(FileFd * const /*File*/) { return false; }
49
virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) { return false; }
46
51
HttpsServerState(URI Srv, HttpsMethod *Owner);
47
52
virtual ~HttpsServerState() {Close();};