http.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. HTTP Acquire Method - This is the HTTP acquire method for APT.
  6. ##################################################################### */
  7. /*}}}*/
  8. #ifndef APT_HTTP_H
  9. #define APT_HTTP_H
  10. #include <apt-pkg/strutl.h>
  11. #include <string>
  12. #include <sys/time.h>
  13. #include <iostream>
  14. #include "server.h"
  15. using std::cout;
  16. using std::endl;
  17. class FileFd;
  18. class HttpMethod;
  19. class Hashes;
  20. class HttpMethod : public ServerMethod
  21. {
  22. public:
  23. virtual void SendReq(FetchItem *Itm) APT_OVERRIDE;
  24. virtual std::unique_ptr<ServerState> CreateServerState(URI const &uri) APT_OVERRIDE;
  25. virtual void RotateDNS() APT_OVERRIDE;
  26. virtual DealWithHeadersResult DealWithHeaders(FetchResult &Res) APT_OVERRIDE;
  27. protected:
  28. std::string AutoDetectProxyCmd;
  29. public:
  30. friend struct HttpServerState;
  31. int Loop();
  32. explicit HttpMethod(std::string &&pProg);
  33. };
  34. #endif