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() =
default;
57 mycurl_easyhandle_sharing(
const mycurl_easyhandle_sharing & ref): root(ref.root) { clone_table.clear(); };
58 mycurl_easyhandle_sharing(mycurl_easyhandle_sharing && ref) noexcept: root(std::move(ref.root)) { std::swap(clone_table, ref.clone_table); };
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;
63 CURL *get_root_handle()
const {
return root.get_handle(); };
65 mycurl_shared_handle alloc_instance()
const;
68 mycurl_easyhandle_node root;
69 std::deque<smart_pointer<mycurl_easyhandle_node> > clone_table;
74 class mycurl_easyhandle_sharing
77 mycurl_easyhandle_sharing() {
throw Ecompilation(
"remote repository"); };