From 92a14d375c8cd9dabc32ccb6dcbdf83321af535f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 11 Feb 2023 16:04:35 +0100 Subject: Added config --- config.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config.h (limited to 'config.h') diff --git a/config.h b/config.h new file mode 100644 index 0000000..fff7f9d --- /dev/null +++ b/config.h @@ -0,0 +1,25 @@ +#pragma once + +#include + +const std::string default_config_filename{"/etc/weblog.conf"}; + +class Config +{ +private: + std::string m_dataPath; + std::string m_listenAddress; // ip address v4/v6 + int m_listenPort; + std::string m_name; + std::string m_keywords; + +public: + Config(const std::string& config_filename = default_config_filename); + std::string getDataPath() const; + + std::string getListenAddress() const; + int getListenPort() const; + + std::string getName() const; + std::string getKeywords() const; +}; -- cgit v1.2.3