17#if !defined(MS_HTTP_HELPER_HPP_)
18#define MS_HTTP_HELPER_HPP_
32namespace matrix_science
39 class ms_connection_settings;
40 class ms_http_helper_handles;
41 class ms_http_helper_progress;
42 class ms_http_helper_proxy_list;
71 static void yieldToCom();
75 bool getProxyConfig(std::vector<std::string> &proxyServers, std::vector<std::string> &proxyUsernames, std::vector<std::string> &proxyPasswords);
91 const std::string & baseUrl,
98 const std::string & baseUrl()
const;
110 const std::string & action,
111 const std::string & httpHeader,
112 const std::string & prologue,
113 const std::string & filename,
114 const std::string & epilogue,
120 const std::string & action,
121 const std::string & filename,
123 FileMode fileMode = FM_binary);
142 static std::string getHeaderValue(
const std::string &name,
const std::string & header);
147 bool analyseCurlResult(
void * pVoidCurl,
ms_http_helper_return & returnCode, std::string & performError,
char * errorBuffer = NULL, std::vector< std::pair<int, std::string> > * pProxyErrors = NULL);
148 void * performCurlAndCheckHttpsCertificate(
void * pVoidCurl, std::string & certificateError, std::string & systemCertPath, std::string & userCertPath,
bool bCheckCertificate =
true);
151 const std::string completeUrl(
const std::string & action)
const;
154 const std::string & action,
155 std::string & strResult,
156 const std::string & filename,
163 std::string & buffer,
164 unsigned long requiredSize );
169 std::string & buffer,
170 unsigned long requiredSize);
174 bool determineProxy();
176 std::string baseUrl_;
180 ms_http_helper_proxy_list * proxyList_;
182 LocalHelper * localHelper_;
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
The class holds HTTP to allow a POST request to be kept alive and retrieve any output received from t...
Definition: ms_http_helper_handles.hpp:47
This holds information on the progress of a running HTTP transfer.
Definition: ms_http_helper_progress.hpp:46
Indicates any problem that may have occurred during a request to an ms_http_helper object.
Definition: ms_http_helper_return.hpp:37
The class provides HTTP, FTP and FILE protocol access to a server.
Definition: ms_http_helper.hpp:57
FileMode
Definitions for types of file content transfer.
Definition: ms_http_helper.hpp:64
@ FM_binary
Binary - the data is saved in exactly the form as it is received.
Definition: ms_http_helper.hpp:65