summaryrefslogtreecommitdiffhomepage
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h28
1 files changed, 28 insertions, 0 deletions
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 <string>
+
+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;
+};