CurlHandle::CurlHandle(CURL* handle) : mException(NULL) { memset(mErrorBuffer, 0, CURL_ERROR_SIZE + 1); mCurl = handle; runtimeAssert("Error when trying to curl_easy_init() a handle", mCurl != NULL); errorBuffer(mErrorBuffer); }
std::unique_ptr<CurlHandle> CurlHandle::clone() const { CURL* cHandle = curl_easy_duphandle(mCurl); runtimeAssert("Error when trying to curl_easy_duphandle() a handle", cHandle != NULL); unique_ptr<CurlHandle> newHandle(new CurlHandle(cHandle)); return newHandle; }
cURLpp::CurlHandle::CurlHandle() : mWriteFunctor(NULL) , mHeaderFunctor(NULL) , mReadFunctor(NULL) , mProgressFunctor(NULL) , mDebugFunctor(NULL) , mSslFunctor(NULL) ,mException(NULL) { mCurl = curl_easy_init(); runtimeAssert( "Error when trying to curl_easy_init() a handle", mCurl ); errorBuffer( mErrorBuffer ); }
void curlpp::runtimeAssert(const std::string& reason, bool isOkay) { runtimeAssert(reason.c_str(), isOkay); }
void cURLpp::runtimeAssert( const char *reason, bool isOkay ) { runtimeAssert(std::string(reason), isOkay); }