annotate server/category_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 CATEGORY_SENDER_H
ferencd@0 2 #define CATEGORY_SENDER_H
ferencd@0 3
ferencd@0 4 #include "web_component.h"
ferencd@0 5 #include "templater.h"
ferencd@0 6
ferencd@0 7 #include <string>
ferencd@0 8
ferencd@0 9 /* just sends a file */
ferencd@0 10 class category_sender final : public web_component
ferencd@0 11 {
ferencd@0 12 public:
ferencd@0 13
ferencd@0 14 category_sender(tnt::HttpRequest& request, tnt::HttpReply& reply, const std::string& what);
ferencd@0 15 unsigned send() final;
ferencd@0 16
ferencd@0 17 private:
ferencd@0 18
ferencd@0 19 bool populate_short_description(const std::string& key) const;
ferencd@0 20 std::string prepareLangTrs(const std::vector<std::string>&);
ferencd@0 21 private:
ferencd@0 22
ferencd@0 23 std::string m_translated;
ferencd@0 24 std::vector<template_struct> m_foodStructs;
ferencd@0 25 unsigned m_status = HTTP_OK;
ferencd@0 26 std::string m_lang = "gb";
ferencd@0 27 std::string m_category = "";
ferencd@0 28 };
ferencd@0 29
ferencd@0 30 #endif
ferencd@0 31