annotate server/file_sender.h @ 0:a4671277546c tip

created the repository for the thymian project
author ferencd
date Tue, 17 Aug 2021 11:19:54 +0200
parents
children
rev   line source
ferencd@0 1 #ifndef FILE_SENDER_H
ferencd@0 2 #define FILE_SENDER_H
ferencd@0 3
ferencd@0 4 #include "web_component.h"
ferencd@0 5
ferencd@0 6 #include <string>
ferencd@0 7
ferencd@0 8 static const std::string theme_path = "/theme/current/";
ferencd@0 9
ferencd@0 10 /* just sends a file */
ferencd@0 11 class file_sender final : public web_component
ferencd@0 12 {
ferencd@0 13 public:
ferencd@0 14
ferencd@0 15 file_sender(tnt::HttpRequest& request, tnt::HttpReply& reply, const std::string &file);
ferencd@0 16 file_sender& templatize();
ferencd@0 17 unsigned send() final;
ferencd@0 18
ferencd@0 19 private:
ferencd@0 20 std::string mfile;
ferencd@0 21 bool mneeds_templates = false;
ferencd@0 22 };
ferencd@0 23
ferencd@0 24 #endif