Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
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 );
}
Exemplo n.º 4
0
void curlpp::runtimeAssert(const std::string& reason, bool isOkay) {
  runtimeAssert(reason.c_str(), isOkay);
}
Exemplo n.º 5
0
void cURLpp::runtimeAssert( const char *reason, bool isOkay )
{
    runtimeAssert(std::string(reason), isOkay);
}