satdump/src-cli/webserver.h

21 lines
586 B
C
Raw Normal View History

2023-01-05 23:33:59 +01:00
#pragma once
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
#include <nng/supplemental/util/platform.h>
#include <functional>
#include <string>
// Webserver for stats
namespace webserver
{
extern std::function<std::string()> handle_callback;
extern std::function<std::string(std::string)> handle_callback_html;
extern std::function<std::vector<uint8_t>()> handle_callback_polarplot;
2023-12-16 19:58:45 +01:00
extern std::function<std::vector<uint8_t>()> handle_callback_fft;
2023-01-05 23:33:59 +01:00
extern bool add_polarplot_handler;
2023-01-05 23:33:59 +01:00
void start(std::string http_server_url);
void stop();
};