1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-08 17:46:03 -05:00
sdrangel/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp

55 lines
1.3 KiB
C++
Raw Normal View History

#include "../../channelrx/tcpsrc/tcpsrcplugin.h"
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "../../channelrx/tcpsrc/tcpsrcgui.h"
const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = {
QString("TCP Channel Source"),
2017-10-07 06:55:51 -04:00
QString("3.7.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
QString("https://github.com/f4exb/sdrangel")
};
TCPSrcPlugin::TCPSrcPlugin(QObject* parent) :
2017-05-05 04:40:45 -04:00
QObject(parent),
m_pluginAPI(0)
{
}
const PluginDescriptor& TCPSrcPlugin::getPluginDescriptor() const
{
return m_pluginDescriptor;
}
void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
{
m_pluginAPI = pluginAPI;
// register TCP Channel Source
2016-10-13 16:23:43 -04:00
m_pluginAPI->registerRxChannel(TCPSrcGUI::m_channelID, this);
}
PluginInstanceGUI* TCPSrcPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
{
if(channelName == TCPSrcGUI::m_channelID)
{
TCPSrcGUI* gui = TCPSrcGUI::create(m_pluginAPI, deviceAPI);
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
// m_pluginAPI->addChannelRollup(gui);
return gui;
} else {
return NULL;
}
}
void TCPSrcPlugin::createInstanceTCPSrc(DeviceSourceAPI *deviceAPI)
{
2017-05-25 14:13:34 -04:00
TCPSrcGUI::create(m_pluginAPI, deviceAPI);
// deviceAPI->registerChannelInstance("sdrangel.channel.tcpsrc", gui);
// m_pluginAPI->addChannelRollup(gui);
}