summaryrefslogtreecommitdiffhomepage
path: root/plugins/webbox/webbox.h
blob: e2644f3c8b7ad7f8fe0ceeda31fb4af6942e438f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "../../plugin_interface.h"

#include <memory>
#include <string>
#include <unordered_map>

class webbox_plugin: public webserver_plugin_interface 
{
private:
 std::unordered_map<std::string, std::shared_ptr<Command>> m_commands;

public:
 webbox_plugin();
 ~webbox_plugin();
 std::string name();
 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
 );
};

extern "C" BOOST_SYMBOL_EXPORT webbox_plugin webserver_plugin;
webbox_plugin webserver_plugin;