satdump/plugins/sdr_sources/spyserver_support/main.cpp

24 lines
592 B
C++
Raw Permalink Normal View History

2022-05-07 16:24:54 +02:00
#include "core/plugin.h"
#include "logger.h"
#include "spyserver.h"
class SpyServerSupport : public satdump::Plugin
{
public:
std::string getID()
{
return "spyserver_support";
}
void init()
{
satdump::eventBus->register_handler<dsp::RegisterDSPSampleSourcesEvent>(registerSources);
}
static void registerSources(const dsp::RegisterDSPSampleSourcesEvent &evt)
{
evt.dsp_sources_registry.insert({SpyServerSource::getID(), {SpyServerSource::getInstance, SpyServerSource::getAvailableSources}});
}
};
PLUGIN_LOADER(SpyServerSupport)