summaryrefslogtreecommitdiffhomepage
path: root/server.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-04-09 18:30:32 +0200
committerRoland Reichwein <mail@reichwein.it>2020-04-09 18:30:32 +0200
commit0d157fb407a35f8afe6d6f0f4c2cc5cd5d5a1933 (patch)
tree86ccea82ebbe29197eacb9a85e8ec7548c5ae38c /server.h
parent2f42619303627db401e469e2fd65123cd794a378 (diff)
Prepared generate_page for static-files plugin
Diffstat (limited to 'server.h')
-rw-r--r--server.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/server.h b/server.h
index 5e5343f..c2b6d1c 100644
--- a/server.h
+++ b/server.h
@@ -3,6 +3,7 @@
#include <boost/asio/io_context.hpp>
#include "config.h"
+#include "plugin.h"
using namespace std::string_literals;
@@ -13,11 +14,19 @@ class Server
protected:
Config& m_config;
boost::asio::io_context& m_ioc;
+ const Socket& m_socket;
+ plugins_container_type& m_plugins;
public:
- Server(Config& config, boost::asio::io_context& ioc);
+ Server(Config& config, boost::asio::io_context& ioc, const Socket& socket, plugins_container_type& m_plugins);
+
virtual ~Server();
virtual int start() = 0;
+
+ // Getters
+ Config& GetConfig();
+ const Socket& GetSocket();
+ plugin_type GetPlugin(const std::string& name);
};
-int server(Config& config);
+int run_server(Config& config, plugins_container_type& plugins);