| 1071 | |
| 1072 | // Implementation of default constructor. |
| 1073 | template<class T> curl_easy::curl_easy(curl_ios<T> &writer) : curl_interface() { |
| 1074 | this->curl = curl_easy_init(); |
| 1075 | if (this->curl == nullptr) { |
| 1076 | throw curl_easy_exception("Null pointer intercepted",__FUNCTION__); |
| 1077 | } |
| 1078 | this->add(curl_pair<CURLoption,curlcpp_callback_type>(CURLOPT_WRITEFUNCTION,writer.get_function())); |
| 1079 | this->add(curl_pair<CURLoption,void *>(CURLOPT_WRITEDATA, static_cast<void*>(writer.get_stream()))); |
| 1080 | } |
| 1081 | |
| 1082 | // Implementation of overridden constructor. |
| 1083 | template<class T> curl_easy::curl_easy(const long flag, curl_ios<T> &writer) : curl_interface(flag) { |
nothing calls this directly
no test coverage detected