#include <CWebServiceLibCurl.h>
Definition at line 10 of file CWebServiceLibCurl.h.
◆ CWebServiceLibCurl()
| CWebServiceLibCurl::CWebServiceLibCurl |
( |
| ) |
|
Constructs a CWebServiceLibCurl object
Definition at line 51 of file CWebServiceLibCurl.cpp.
52{
53
55 {
56 FATAL(
"Failed to initialize libcurl\n");
57 }
58
61 {
62 FATAL(
"Failed to create a libcurl handle\n");
63 }
64
71}
static HMODULE g_hLibCurl
static decltype(&curl_easy_init) pcurl_easy_init
static decltype(&curl_easy_setopt) pcurl_easy_setopt
static decltype(&curl_global_init) pcurl_global_init
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
◆ ~CWebServiceLibCurl()
| CWebServiceLibCurl::~CWebServiceLibCurl |
( |
| ) |
|
|
virtual |
Destructs a CWebServiceLibCurl object and closes all connections to the Web Service.
Definition at line 76 of file CWebServiceLibCurl.cpp.
77{
79 {
82 }
83
85}
static decltype(&curl_global_cleanup) pcurl_global_cleanup
static decltype(&curl_easy_cleanup) pcurl_easy_cleanup
◆ CanUseLibCurl()
| bool CWebServiceLibCurl::CanUseLibCurl |
( |
| ) |
|
|
static |
Definition at line 22 of file CWebServiceLibCurl.cpp.
23{
26 {
30 return false;
31
39 }
42 {
43 return false;
44 }
45 return true;
46}
static decltype(&curl_easy_perform) pcurl_easy_perform
static decltype(&curl_easy_strerror) pcurl_easy_strerror
CURL_EXTERN void curl_global_cleanup(void)
CURL_EXTERN CURLcode curl_global_init(long flags)
CURL_EXTERN const char * curl_easy_strerror(CURLcode)
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl)
CURL_EXTERN CURL * curl_easy_init(void)
#define curl_easy_setopt(handle, option, value)
Referenced by CWineTest::Run().
◆ DoRequest()
Sends data to the Web Service.
- Parameters
-
| InputData | A std::string containing all the data, which is going to be submitted as HTTP POST data. |
- Returns
- Returns a pointer to a char array containing the data received from the Web Service. The caller needs to free that pointer.
Implements CWebService.
Definition at line 107 of file CWebServiceLibCurl.cpp.
108{
111
115
116 string ResultData;
119
122 {
125 }
126
128 Data.reset(
new char[ResultData.
size() + 1]);
131
132 return Data.release();
133}
static size_t callback_func(void *ptr, size_t size, size_t count, void *userdata)
const _CharT * c_str() const
◆ m_hCurl
| CURL* CWebServiceLibCurl::m_hCurl |
|
private |
The documentation for this class was generated from the following files: