#include "smartcgms_sources/scgms.h"
#include <emscripten.h>
#include <string>
#include <iostream>
#include <fstream>

extern "C" {
EMSCRIPTEN_KEEPALIVE
void push_event(int level)
{
    create_level_event(level);
}
}

extern "C" {
EMSCRIPTEN_KEEPALIVE
void create_event(int event_type, double level)
{
    create_event_sim(event_type, level);
}
}

extern "C" {
EMSCRIPTEN_KEEPALIVE
void shutdown()
{
    create_shutdown_event();
}
}

extern "C" {
EMSCRIPTEN_KEEPALIVE
const char* get_config()
{
    return get_config_data();
}
}

extern "C" {
EMSCRIPTEN_KEEPALIVE
void build_chain(const char* conf)
{
    shutdown();
    if(strcmp(conf,"") == 0)
    {
        build_filter_chain(nullptr);
    }
    else
    {
        build_filter_chain(conf);
    }
}
}

int main()
{
}