From c9fa963e71258c5adfb71cf1996cd1bcb33df0bb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 26 Feb 2023 08:54:17 +0100 Subject: Start with copy of whiteboard --- config.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 config.h (limited to 'config.h') diff --git a/config.h b/config.h new file mode 100644 index 0000000..ce2fceb --- /dev/null +++ b/config.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +const std::string default_config_filename{"/etc/whiteboard.conf"}; + +class Config +{ +private: + std::string m_dataPath; + uint64_t m_maxage; + std::string m_listenAddress; // ip address v4/v6 + int m_listenPort; + int m_threads; + int m_max_connections; + +public: + Config(const std::string& config_filename = default_config_filename); + std::string getDataPath() const; + uint64_t getMaxage() const; + + std::string getListenAddress() const; + int getListenPort() const; + + int getThreads() const; + + int getMaxConnections() const; +}; -- cgit v1.2.3