summaryrefslogtreecommitdiff
path: root/src/lib/uploader.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-01 01:31:35 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-01 01:31:35 +0200
commit8963f0007af1a312017b9627c18b82ec2a577591 (patch)
treebaeb6f2c17da72248408b8c1d695242b44edda9e /src/lib/uploader.h
parent29f84e2b8785585885e0658bdf9938967547460f (diff)
C++11 tidying.
Diffstat (limited to 'src/lib/uploader.h')
-rw-r--r--src/lib/uploader.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/uploader.h b/src/lib/uploader.h
index f57ed8c4f..a68be8dd0 100644
--- a/src/lib/uploader.h
+++ b/src/lib/uploader.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,18 +18,21 @@
*/
+
#ifndef DCPOMATIC_UPLOADER_H
#define DCPOMATIC_UPLOADER_H
+
#include <boost/filesystem.hpp>
-#include <boost/function.hpp>
+
class Job;
+
class Uploader
{
public:
- Uploader (boost::function<void (std::string)> set_status, boost::function<void (float)> set_progress);
+ Uploader (std::function<void (std::string)> set_status, std::function<void (float)> set_progress);
virtual ~Uploader () {}
void upload (boost::filesystem::path directory);
@@ -39,14 +42,14 @@ protected:
virtual void create_directory (boost::filesystem::path directory) = 0;
virtual void upload_file (boost::filesystem::path from, boost::filesystem::path to, boost::uintmax_t& transferred, boost::uintmax_t total_size) = 0;
- boost::function<void (float)> _set_progress;
+ std::function<void (float)> _set_progress;
private:
void upload_directory (boost::filesystem::path base, boost::filesystem::path directory, boost::uintmax_t& transferred, boost::uintmax_t total_size);
boost::uintmax_t count_file_sizes (boost::filesystem::path) const;
boost::filesystem::path remove_prefix (boost::filesystem::path prefix, boost::filesystem::path target) const;
- boost::function<void (std::string)> _set_status;
+ std::function<void (std::string)> _set_status;
};
#endif