From 6232d13f5321b87ddf12a1aa36b4545da45f173d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Nov 2021 22:34:57 +0100 Subject: Travel3: Simple image and video display site Reads the images and videos from filesystem and builds a site in memroy. --- src/send_file.hh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/send_file.hh (limited to 'src/send_file.hh') diff --git a/src/send_file.hh b/src/send_file.hh new file mode 100644 index 0000000..aca21b6 --- /dev/null +++ b/src/send_file.hh @@ -0,0 +1,35 @@ +#ifndef SEND_FILE_HH +#define SEND_FILE_HH + +#include "transport.hh" + +#include +#include +#include +#include + +class Logger; +class Config; + +class SendFile { +public: + virtual ~SendFile() = default; + + static std::unique_ptr create(); + + virtual bool setup(Logger* logger, Config* config, + std::string_view sendfile_header_name, + std::string_view sendfile_path_name) = 0; + + virtual std::unique_ptr create_ok_file( + Transport* transport, std::filesystem::path const& full_path, + std::string_view relative_path, std::string_view etag, + std::optional size) = 0; + +protected: + SendFile() = default; + SendFile(SendFile const&) = delete; + SendFile& operator=(SendFile const&) = delete; +}; + +#endif // SEND_FILE_HH -- cgit v1.2.3-70-g09d2