void BECurl::set_options ( BECurlOptionMap options ) { BECurlOptionMap::iterator it = options.begin(); while ( it != options.end() ) { boost::shared_ptr<BECurlOption> curl_option = it->second; switch ( curl_option->type() ) { case BECurlOption::type_string: easy_setopt ( curl_option->option(), curl_option->as_string().c_str() ); break; case BECurlOption::type_long: easy_setopt ( curl_option->option(), curl_option->as_long() ); break; case BECurlOption::type_curl_off_t: easy_setopt ( curl_option->option(), curl_option->as_curl_off_t() ); break; default: break; } ++it; } } // set_options
const bool curl_force_tls ( const BECurlOptionMap options ) { bool force = false; std::map<std::string, boost::shared_ptr<BECurlOption> >::const_iterator it = options.find ( "BE_CURLOPT_FORCE_STARTTLS" ); if ( it != options.end() ) { boost::shared_ptr<BECurlOption> force_tls_option = it->second; force = force_tls_option->as_long(); } return force; }