#pragma once #include "ServerApplicationDefaultSettings.h" #include "ServerApplicationsTree.h" #include "Module.h" #include #include namespace HttpServer { class ConfigParser { private: static bool includeConfigFile(const std::string &fileName, std::string &strBuf, const size_t offset = 0); static bool addApplication( const std::unordered_map &app, const ServerApplicationDefaultSettings &defaults, std::vector &modules, ServerApplicationsTree &apps_tree ); static bool parseMimes(const std::string &fileName, std::unordered_map &mimes_types); public: bool loadConfig( const std::string &conf, std::unordered_map &settings, std::unordered_map &mimes_types, std::vector &modules, ServerApplicationsTree &apps_tree ); }; };