diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/category_sender.h	Tue Aug 17 11:19:54 2021 +0200
@@ -0,0 +1,31 @@
+#ifndef CATEGORY_SENDER_H
+#define CATEGORY_SENDER_H
+
+#include "web_component.h"
+#include "templater.h"
+
+#include <string>
+
+/* just sends a file */
+class category_sender final : public web_component
+{
+public:
+
+	category_sender(tnt::HttpRequest& request, tnt::HttpReply& reply, const std::string& what);
+    unsigned send() final;
+
+private:
+
+	bool populate_short_description(const std::string& key) const;
+	std::string prepareLangTrs(const std::vector<std::string>&);
+private:
+
+    std::string m_translated;
+	std::vector<template_struct> m_foodStructs;
+	unsigned m_status = HTTP_OK;
+	std::string m_lang = "gb";
+	std::string m_category = "";
+};
+
+#endif
+