Oxygine  1
2g game engine
HttpRequestCurlTask.h
1 #pragma once
2 #include "curl/curl.h"
3 #include "oxygine-include.h"
4 #include "HttpRequestTask.h"
5 #include "core/file.h"
6 #include "core/ThreadDispatcher.h"
7 
8 namespace oxygine
9 {
10  DECLARE_SMART(HttpRequestTaskCURL, spHttpRequestTaskCURL);
12  {
13  public:
16 
17  void setPostData(const std::vector<char>& data);
18 
19 
20  protected:
21  void _setFileName(const std::string& name) {}
22 
23  friend void* thread(void*);
24  friend void mainThreadFunc(const ThreadDispatcher::message& msg);
25 
26  static size_t cbWriteFunction(char* d, size_t n, size_t l, HttpRequestTaskCURL* p);
27  size_t _cbWriteFunction(char* d, size_t n, size_t l);
28 
29  static size_t cbHeaderFunction(char* d, size_t n, size_t l, HttpRequestTaskCURL* p);
30  size_t _cbHeaderFunction(char* d, size_t n, size_t l);
31 
32 
33  void _run();
34 
35  void* _easy;
36  curl_slist* _httpHeaders;
37  };
38 }
Definition: HttpRequestTask.h:11
–oxgl-end–!
Definition: Actor.h:14
Definition: HttpRequestCurlTask.h:11
Definition: ThreadDispatcher.h:50