summaryrefslogtreecommitdiffhomepage
path: root/config.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-04-04 16:32:10 +0200
committerRoland Reichwein <mail@reichwein.it>2020-04-04 16:32:10 +0200
commit938fbe7a2f2f10a3abb530a9463e57fc20f40038 (patch)
tree62ee0c285c672b10a42b0690a011ede7a0bf00b6 /config.h
parent95d5acc8c7e60255b19e7084e374eb26cc5d0ba3 (diff)
HTTP and HTTPs
Diffstat (limited to 'config.h')
-rw-r--r--config.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/config.h b/config.h
index 4838ea6..98a99c0 100644
--- a/config.h
+++ b/config.h
@@ -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;