diff options
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,9 +1,12 @@ #pragma once +#include <filesystem> #include <string> #include <unordered_map> #include <vector> +namespace fs = std::filesystem; + enum PathType { Files, // serve files @@ -24,7 +27,7 @@ struct Site std::vector<Path> paths; }; -enum SocketProtocol +enum class SocketProtocol { HTTP, HTTPS @@ -35,6 +38,9 @@ struct Socket std::string address; std::string port; SocketProtocol protocol; + std::vector<std::string> serve_sites; // if empty, serve all configured sites // TODO: implement + fs::path cert_path; + fs::path key_path; }; class Config @@ -45,6 +51,7 @@ class Config std::string m_user; std::string m_group; + int m_threads; std::vector<std::string> m_plugin_directories; std::vector<Site> m_sites; std::vector<Socket> m_sockets; @@ -56,6 +63,8 @@ class Config std::string User() const; std::string Group() const; + int Threads() const; + const std::vector<std::string>& PluginDirectories() const; const std::vector<Site>& Sites() const; const std::vector<Socket>& Sockets() const; |