From 6c04dfe2caff1e03ba5c898b591327439452f616 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 30 Sep 2021 21:12:57 +0200 Subject: CMS functionality works just find.. Signed-off-by: Toni Uhlig --- src/ContentManager.hpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'src/ContentManager.hpp') diff --git a/src/ContentManager.hpp b/src/ContentManager.hpp index 033be59..83f4bc9 100644 --- a/src/ContentManager.hpp +++ b/src/ContentManager.hpp @@ -2,25 +2,37 @@ #define CONTENTMANAGER_H 1 #include "Content.hpp" +#include "Filesystem.hpp" +#include "TemplateManager.hpp" #include #include -typedef std::unordered_map> ContentModules; +using ContentModules = std::unordered_map >; -class ContentManager { +class ContentManager +{ public: - ContentManager() {} - ~ContentManager() { ShutdownAll(); } + ContentManager() + { + } + ~ContentManager() + { + ShutdownAll(); + } - bool RegisterModule(std::shared_ptr ctnt); - bool InitAll(void); - void ShutdownAll(void); - bool Render(std::string & basePath); - ContentModules const & GetAllModules() const; + void SetStaticFilesystem(std::shared_ptr & static_fs); + void SetTemplateSystem(std::shared_ptr & tmgr); + bool RegisterModule(std::shared_ptr ctnt); + bool InitAll(void); + void ShutdownAll(void); + bool Render(char const * basePath, RequestResponse & rr, std::string & out); + ContentModules const & GetAllModules() const; private: - ContentModules m_ContentModules; + std::shared_ptr m_StaticFilesystem; + std::shared_ptr m_TemplateManager; + ContentModules m_ContentModules; }; #endif -- cgit v1.2.3