1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Modify CPR library to be able to access member variables for some types.

This commit is contained in:
Sandu Liviu Catalin 2021-01-28 04:59:14 +02:00
parent cc6778d245
commit 4a75da930b
6 changed files with 16 additions and 6 deletions

View File

@ -35,8 +35,13 @@ cpr_option(BUILD_CPR_TESTS_SSL "Set to ON to build cpr ssl tests" ${BUILD_CPR_TE
cpr_option(GENERATE_COVERAGE "Set to ON to generate coverage reports." OFF)
cpr_option(CPR_CURL_NOSIGNAL "Set to ON to disable use of signals in libcurl." OFF)
cpr_option(USE_SYSTEM_GTEST "If ON, this project will look in the system paths for an installed gtest library" OFF)
cpr_option(USE_OPENSSL "Use OpenSSL code. Experimental" ON)
cpr_option(USE_WINSSL "Use WIN_SSL backend. Experimental" OFF)
if(WIN32)
cpr_option(USE_OPENSSL "Use OpenSSL code. Experimental" OFF)
cpr_option(USE_WINSSL "Use WIN_SSL backend. Experimental" ON)
else()
cpr_option(USE_OPENSSL "Use OpenSSL code. Experimental" ON)
cpr_option(USE_WINSSL "Use WIN_SSL backend. Experimental" OFF)
endif()
message(STATUS "=======================================================")
if (USE_OPENSSL AND USE_WINSSL)
@ -96,7 +101,8 @@ if(NOT USE_SYSTEM_CURL OR NOT CURL_FOUND)
endif()
if(USE_WINSSL)
set(CMAKE_USE_WINSSL ON CACHE INTERNAL "" FORCE)
#set(CMAKE_USE_WINSSL ON CACHE INTERNAL "" FORCE)
set(CMAKE_USE_SCHANNEL ON CACHE INTERNAL "" FORCE)
set(CURL_CA_PATH "none" CACHE INTERNAL "" FORCE)
endif()

View File

@ -46,7 +46,7 @@ class Cookies {
const_iterator cbegin() const;
const_iterator cend() const;
private:
protected:
std::map<std::string, std::string> map_;
};

View File

@ -8,6 +8,8 @@
namespace cpr {
class Parameters : public CurlContainer<Parameter> {
protected:
using CurlContainer<Parameter>::containerList_;
public:
Parameters() = default;
Parameters(const std::initializer_list<Parameter>& parameters);

View File

@ -8,6 +8,8 @@
namespace cpr {
class Payload : public CurlContainer<Pair> {
protected:
using CurlContainer<Pair>::containerList_;
public:
template <class It>
Payload(const It begin, const It end) {

View File

@ -14,7 +14,7 @@ class Proxies {
bool has(const std::string& protocol) const;
const std::string& operator[](const std::string& protocol);
private:
protected:
std::map<std::string, std::string> hosts_;
};
} // namespace cpr

View File

@ -18,7 +18,7 @@
namespace cpr {
class Response {
private:
protected:
std::shared_ptr<CurlHolder> curl_{nullptr};
public: