26 #ifndef MYCURL_EASYHANDLE_SHARING_HPP
27 #define MYCURL_EASYHANDLE_SHARING_HPP
29 #include "../my_config.h"
35 #include <curl/curl.h>
53 class mycurl_easyhandle_sharing
56 mycurl_easyhandle_sharing() {};
57 mycurl_easyhandle_sharing(
const mycurl_easyhandle_sharing & ref): global_params(ref.global_params) { table.clear(); };
58 mycurl_easyhandle_sharing(mycurl_easyhandle_sharing && ref) noexcept: table(std::move(ref.table)), global_params(std::move(ref.global_params)) {};
59 mycurl_easyhandle_sharing & operator = (
const mycurl_easyhandle_sharing & ref) =
delete;
60 mycurl_easyhandle_sharing & operator = (mycurl_easyhandle_sharing && ref) noexcept =
delete;
61 ~mycurl_easyhandle_sharing() =
default;
65 template<
class T>
void setopt_global(CURLoption opt,
const T & val) { global_params.add(opt, val); }
70 std::shared_ptr<mycurl_easyhandle_node> alloc_instance();
74 std::deque<std::shared_ptr<mycurl_easyhandle_node> > table;
75 mycurl_param_list global_params;
80 class mycurl_easyhandle_sharing
83 mycurl_easyhandle_sharing() {
throw Ecompilation(
"remote repository"); };
contains all the excetion class thrown by libdar
used to optimize session creation done by libcurl
libdar namespace encapsulate all libdar symbols