X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcurl_uploader.h;h=4ee221f089dd1093b59062c501799603bb93e0f0;hb=37b29fdf9028e6848470a19d189697fc58278990;hp=9fb3022f2f7ab0048224849c511f093ad56d6d8c;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/curl_uploader.h b/src/lib/curl_uploader.h index 9fb3022f2..4ee221f08 100644 --- a/src/lib/curl_uploader.h +++ b/src/lib/curl_uploader.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Carl Hetherington + Copyright (C) 2015-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,25 +18,29 @@ */ + #include "uploader.h" +#include #include + class CurlUploader : public Uploader { public: - CurlUploader (boost::function set_status, boost::function set_progress); + CurlUploader (std::function set_status, std::function set_progress); ~CurlUploader (); size_t read_callback (void* ptr, size_t size, size_t nmemb); + int debug(CURL* curl, curl_infotype type, char* data, size_t size); protected: - virtual void create_directory (boost::filesystem::path directory); - virtual void upload_file (boost::filesystem::path from, boost::filesystem::path to, boost::uintmax_t& transferred, boost::uintmax_t total_size); + void create_directory (boost::filesystem::path directory) override; + void upload_file (boost::filesystem::path from, boost::filesystem::path to, boost::uintmax_t& transferred, boost::uintmax_t total_size) override; private: CURL* _curl; - FILE* _file; - boost::uintmax_t* _transferred; - boost::uintmax_t _total_size; + FILE* _file = nullptr; + boost::uintmax_t* _transferred = nullptr; + boost::uintmax_t _total_size = 0; };