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