mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -54,6 +54,22 @@ void RemoteSourcePlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(RemoteSource::m_channelIdURI, RemoteSource::m_channelId, this);
|
||||
}
|
||||
|
||||
void RemoteSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
RemoteSource *instance = new RemoteSource(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -68,16 +84,6 @@ PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUIS
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new RemoteSource(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* RemoteSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new RemoteSource(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* RemoteSourcePlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new RemoteSourceWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user