summaryrefslogtreecommitdiffhomepage
path: root/weblog.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-11 11:24:22 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-11 11:24:22 +0100
commit4c4a001cacd9c3e1c2552dbcaf50165091a82ac1 (patch)
tree2886c2f9f7a78b5e6da25ebc9c92b4498a58a584 /weblog.h
Separated out weblog from webserver
Diffstat (limited to 'weblog.h')
-rw-r--r--weblog.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/weblog.h b/weblog.h
new file mode 100644
index 0000000..0994b91
--- /dev/null
+++ b/weblog.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "../../plugin_interface.h"
+
+class weblog_plugin: public webserver_plugin_interface
+{
+public:
+ weblog_plugin();
+ ~weblog_plugin();
+
+ std::string name() override;
+
+ std::string generate_page(
+ std::function<std::string(const std::string& key)>& GetServerParam,
+ std::function<std::string(const std::string& key)>& GetRequestParam, // request including body (POST...)
+ std::function<void(const std::string& key, const std::string& value)>& SetResponseHeader // to be added to result string
+ ) override;
+
+ bool has_own_authentication() override;
+};
+
+extern "C" BOOST_SYMBOL_EXPORT weblog_plugin webserver_plugin;
+weblog_plugin webserver_plugin;