diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp index 6380df44f..84df3912d 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp @@ -52,22 +52,28 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this); } +void ChannelAnalyzerPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + ChannelAnalyzer *instance = new ChannelAnalyzer(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const { return ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel); } -BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new ChannelAnalyzer(deviceAPI); -} - -ChannelAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new ChannelAnalyzer(deviceAPI); -} - ChannelWebAPIAdapter* ChannelAnalyzerPlugin::createChannelWebAPIAdapter() const { return new ChannelAnalyzerWebAPIAdapter(); -} \ No newline at end of file +} diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.h b/plugins/channelrx/chanalyzer/chanalyzerplugin.h index 83b0fb0ad..8e571c501 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.h +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index 15ebc48da..8d913a26e 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -37,6 +37,22 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(AMDemod::m_channelIdURI, AMDemod::m_channelId, this); } +void AMDemodPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + AMDemod *instance = new AMDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -51,17 +67,7 @@ PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, B } #endif -BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new AMDemod(deviceAPI); -} - -ChannelAPI* AMDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new AMDemod(deviceAPI); -} - ChannelWebAPIAdapter* AMDemodPlugin::createChannelWebAPIAdapter() const { return new AMDemodWebAPIAdapter(); -} \ No newline at end of file +} diff --git a/plugins/channelrx/demodam/amdemodplugin.h b/plugins/channelrx/demodam/amdemodplugin.h index 565d9da44..1a960995e 100644 --- a/plugins/channelrx/demodam/amdemodplugin.h +++ b/plugins/channelrx/demodam/amdemodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodatv/atvdemodplugin.cpp b/plugins/channelrx/demodatv/atvdemodplugin.cpp index f1eb2a13b..9b64949e8 100644 --- a/plugins/channelrx/demodatv/atvdemodplugin.cpp +++ b/plugins/channelrx/demodatv/atvdemodplugin.cpp @@ -57,21 +57,27 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI) m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelIdURI, ATVDemod::m_channelId, this); } +void ATVDemodPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + ATVDemod *instance = new ATVDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const { return ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel); } -BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new ATVDemod(deviceAPI); -} - -ChannelAPI* ATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new ATVDemod(deviceAPI); -} - ChannelWebAPIAdapter* ATVDemodPlugin::createChannelWebAPIAdapter() const { return new ATVDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodatv/atvdemodplugin.h b/plugins/channelrx/demodatv/atvdemodplugin.h index e88f36e42..81ab05493 100644 --- a/plugins/channelrx/demodatv/atvdemodplugin.h +++ b/plugins/channelrx/demodatv/atvdemodplugin.h @@ -37,9 +37,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* ptrPluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index acaeb4ff3..c96125a71 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -57,6 +57,22 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(BFMDemod::m_channelIdURI, BFMDemod::m_channelId, this); } +void BFMPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + BFMDemod *instance = new BFMDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* BFMPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -71,16 +87,6 @@ PluginInstanceGUI* BFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Baseb } #endif -BasebandSampleSink* BFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new BFMDemod(deviceAPI); -} - -ChannelAPI* BFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new BFMDemod(deviceAPI); -} - ChannelWebAPIAdapter* BFMPlugin::createChannelWebAPIAdapter() const { return new BFMDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodbfm/bfmplugin.h b/plugins/channelrx/demodbfm/bfmplugin.h index e6f9cc27b..14a9d4551 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.h +++ b/plugins/channelrx/demodbfm/bfmplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demoddatv/datvdemodplugin.cpp b/plugins/channelrx/demoddatv/datvdemodplugin.cpp index ec2d10d9e..8ca60c245 100644 --- a/plugins/channelrx/demoddatv/datvdemodplugin.cpp +++ b/plugins/channelrx/demoddatv/datvdemodplugin.cpp @@ -58,21 +58,27 @@ void DATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI) m_ptrPluginAPI->registerRxChannel(DATVDemod::m_channelIdURI, DATVDemod::m_channelId, this); } +void DATVDemodPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + DATVDemod *instance = new DATVDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + PluginInstanceGUI* DATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const { return DATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel); } -BasebandSampleSink* DATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new DATVDemod(deviceAPI); -} - -ChannelAPI* DATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new DATVDemod(deviceAPI); -} - ChannelWebAPIAdapter* DATVDemodPlugin::createChannelWebAPIAdapter() const { return new DATVDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demoddatv/datvdemodplugin.h b/plugins/channelrx/demoddatv/datvdemodplugin.h index 15213bf9e..5a3383ba8 100644 --- a/plugins/channelrx/demoddatv/datvdemodplugin.h +++ b/plugins/channelrx/demoddatv/datvdemodplugin.h @@ -38,9 +38,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* ptrPluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index bd6c67861..045212b45 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -56,6 +56,22 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this); } +void DSDDemodPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + DSDDemod *instance = new DSDDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -70,16 +86,6 @@ PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new DSDDemod(deviceAPI); -} - -ChannelAPI* DSDDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new DSDDemod(deviceAPI); -} - ChannelWebAPIAdapter* DSDDemodPlugin::createChannelWebAPIAdapter() const { return new DSDDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.h b/plugins/channelrx/demoddsd/dsddemodplugin.h index 92af82999..9e728c695 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.h +++ b/plugins/channelrx/demoddsd/dsddemodplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodfreedv/freedvplugin.cpp b/plugins/channelrx/demodfreedv/freedvplugin.cpp index 311adf24d..998cdb7bc 100644 --- a/plugins/channelrx/demodfreedv/freedvplugin.cpp +++ b/plugins/channelrx/demodfreedv/freedvplugin.cpp @@ -54,6 +54,22 @@ void FreeDVPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(FreeDVDemod::m_channelIdURI, FreeDVDemod::m_channelId, this); } +void FreeDVPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + FreeDVDemod *instance = new FreeDVDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* FreeDVPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* FreeDVPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Ba } #endif -BasebandSampleSink* FreeDVPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new FreeDVDemod(deviceAPI); -} - -ChannelAPI* FreeDVPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new FreeDVDemod(deviceAPI); -} - ChannelWebAPIAdapter* FreeDVPlugin::createChannelWebAPIAdapter() const { return new FreeDVDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodfreedv/freedvplugin.h b/plugins/channelrx/demodfreedv/freedvplugin.h index ca27253f5..cf650c176 100644 --- a/plugins/channelrx/demodfreedv/freedvplugin.h +++ b/plugins/channelrx/demodfreedv/freedvplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index 9063747f1..00ebec700 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -38,6 +38,22 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(NFMDemod::m_channelIdURI, NFMDemod::m_channelId, this); } +void NFMPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + NFMDemod *instance = new NFMDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* NFMPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -52,16 +68,6 @@ PluginInstanceGUI* NFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Baseb } #endif -BasebandSampleSink* NFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new NFMDemod(deviceAPI); -} - -ChannelAPI* NFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new NFMDemod(deviceAPI); -} - ChannelWebAPIAdapter* NFMPlugin::createChannelWebAPIAdapter() const { return new NFMDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodnfm/nfmplugin.h b/plugins/channelrx/demodnfm/nfmplugin.h index c3bfce879..ddea843e9 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.h +++ b/plugins/channelrx/demodnfm/nfmplugin.h @@ -18,9 +18,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index 1e9d23d2d..caaf07c27 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -38,6 +38,22 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(SSBDemod::m_channelIdURI, SSBDemod::m_channelId, this); } +void SSBPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + SSBDemod *instance = new SSBDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* SSBPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -52,16 +68,6 @@ PluginInstanceGUI* SSBPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Baseb } #endif -BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new SSBDemod(deviceAPI); -} - -ChannelAPI* SSBPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new SSBDemod(deviceAPI); -} - ChannelWebAPIAdapter* SSBPlugin::createChannelWebAPIAdapter() const { return new SSBDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodssb/ssbplugin.h b/plugins/channelrx/demodssb/ssbplugin.h index c7eedca79..df2b0b18d 100644 --- a/plugins/channelrx/demodssb/ssbplugin.h +++ b/plugins/channelrx/demodssb/ssbplugin.h @@ -18,9 +18,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index 341c1d050..3d13e5c6e 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -39,6 +39,22 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(WFMDemod::m_channelIdURI, WFMDemod::m_channelId, this); } +void WFMPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + WFMDemod *instance = new WFMDemod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* WFMPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -53,16 +69,6 @@ PluginInstanceGUI* WFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, Baseb } #endif -BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new WFMDemod(deviceAPI); -} - -ChannelAPI* WFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new WFMDemod(deviceAPI); -} - ChannelWebAPIAdapter* WFMPlugin::createChannelWebAPIAdapter() const { return new WFMDemodWebAPIAdapter(); diff --git a/plugins/channelrx/demodwfm/wfmplugin.h b/plugins/channelrx/demodwfm/wfmplugin.h index ee27c0870..d69134e8b 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.h +++ b/plugins/channelrx/demodwfm/wfmplugin.h @@ -18,9 +18,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/filesink/filesinkplugin.cpp b/plugins/channelrx/filesink/filesinkplugin.cpp index ab05de670..9a2ce9c9c 100644 --- a/plugins/channelrx/filesink/filesinkplugin.cpp +++ b/plugins/channelrx/filesink/filesinkplugin.cpp @@ -55,6 +55,22 @@ void FileSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(FileSink::m_channelIdURI, FileSink::m_channelId, this); } +void FileSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + FileSink *instance = new FileSink(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* FileSinkPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -69,16 +85,6 @@ PluginInstanceGUI* FileSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSink* FileSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new FileSink(deviceAPI); -} - -ChannelAPI* FileSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new FileSink(deviceAPI); -} - ChannelWebAPIAdapter* FileSinkPlugin::createChannelWebAPIAdapter() const { return new FileSinkWebAPIAdapter(); diff --git a/plugins/channelrx/filesink/filesinkplugin.h b/plugins/channelrx/filesink/filesinkplugin.h index 39202ee83..00f233e9d 100644 --- a/plugins/channelrx/filesink/filesinkplugin.h +++ b/plugins/channelrx/filesink/filesinkplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/freqtracker/freqtrackerplugin.cpp b/plugins/channelrx/freqtracker/freqtrackerplugin.cpp index f8a871f21..d3cf2a9cd 100644 --- a/plugins/channelrx/freqtracker/freqtrackerplugin.cpp +++ b/plugins/channelrx/freqtracker/freqtrackerplugin.cpp @@ -54,6 +54,22 @@ void FreqTrackerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(FreqTracker::m_channelIdURI, FreqTracker::m_channelId, this); } +void FreqTrackerPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + FreqTracker *instance = new FreqTracker(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI(DeviceUISet *deviceUISe } #endif -BasebandSampleSink* FreqTrackerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new FreqTracker(deviceAPI); -} - -ChannelAPI* FreqTrackerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new FreqTracker(deviceAPI); -} - ChannelWebAPIAdapter* FreqTrackerPlugin::createChannelWebAPIAdapter() const { return new FreqTrackerWebAPIAdapter(); diff --git a/plugins/channelrx/freqtracker/freqtrackerplugin.h b/plugins/channelrx/freqtracker/freqtrackerplugin.h index cae785aa6..5b1b2d4c7 100644 --- a/plugins/channelrx/freqtracker/freqtrackerplugin.h +++ b/plugins/channelrx/freqtracker/freqtrackerplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/localsink/localsinkplugin.cpp b/plugins/channelrx/localsink/localsinkplugin.cpp index f86cb2b0b..cc21a5c6d 100644 --- a/plugins/channelrx/localsink/localsinkplugin.cpp +++ b/plugins/channelrx/localsink/localsinkplugin.cpp @@ -56,6 +56,22 @@ void LocalSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(LocalSink::m_channelIdURI, LocalSink::m_channelId, this); } +void LocalSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + LocalSink *instance = new LocalSink(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* LocalSinkPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -70,16 +86,6 @@ PluginInstanceGUI* LocalSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSink* LocalSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new LocalSink(deviceAPI); -} - -ChannelAPI* LocalSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new LocalSink(deviceAPI); -} - ChannelWebAPIAdapter* LocalSinkPlugin::createChannelWebAPIAdapter() const { return new LocalSinkWebAPIAdapter(); diff --git a/plugins/channelrx/localsink/localsinkplugin.h b/plugins/channelrx/localsink/localsinkplugin.h index 10c1cb9b9..17c1e740a 100644 --- a/plugins/channelrx/localsink/localsinkplugin.h +++ b/plugins/channelrx/localsink/localsinkplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/remotesink/remotesinkplugin.cpp b/plugins/channelrx/remotesink/remotesinkplugin.cpp index c2d267b71..99d5eb6a3 100644 --- a/plugins/channelrx/remotesink/remotesinkplugin.cpp +++ b/plugins/channelrx/remotesink/remotesinkplugin.cpp @@ -56,6 +56,22 @@ void RemoteSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(RemoteSink::m_channelIdURI, RemoteSink::m_channelId, this); } +void RemoteSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + RemoteSink *instance = new RemoteSink(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -70,16 +86,6 @@ PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet } #endif -BasebandSampleSink* RemoteSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new RemoteSink(deviceAPI); -} - -ChannelAPI* RemoteSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new RemoteSink(deviceAPI); -} - ChannelWebAPIAdapter* RemoteSinkPlugin::createChannelWebAPIAdapter() const { return new RemoteSinkWebAPIAdapter(); diff --git a/plugins/channelrx/remotesink/remotesinkplugin.h b/plugins/channelrx/remotesink/remotesinkplugin.h index cd3ea2465..0ffc92b93 100644 --- a/plugins/channelrx/remotesink/remotesinkplugin.h +++ b/plugins/channelrx/remotesink/remotesinkplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channelrx/udpsink/udpsinkplugin.cpp b/plugins/channelrx/udpsink/udpsinkplugin.cpp index 21641b70b..0afc1f812 100644 --- a/plugins/channelrx/udpsink/udpsinkplugin.cpp +++ b/plugins/channelrx/udpsink/udpsinkplugin.cpp @@ -55,6 +55,22 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(UDPSink::m_channelIdURI, UDPSink::m_channelId, this); } +void UDPSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + UDPSink *instance = new UDPSink(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* UDPSinkPlugin::createRxChannelGUI( DeviceUISet *deviceUISet, @@ -69,16 +85,6 @@ PluginInstanceGUI* UDPSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, B } #endif -BasebandSampleSink* UDPSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const -{ - return new UDPSink(deviceAPI); -} - -ChannelAPI* UDPSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const -{ - return new UDPSink(deviceAPI); -} - ChannelWebAPIAdapter* UDPSinkPlugin::createChannelWebAPIAdapter() const { return new UDPSinkWebAPIAdapter(); diff --git a/plugins/channelrx/udpsink/udpsinkplugin.h b/plugins/channelrx/udpsink/udpsinkplugin.h index 1e026e3b5..df19c7f20 100644 --- a/plugins/channelrx/udpsink/udpsinkplugin.h +++ b/plugins/channelrx/udpsink/udpsinkplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; - virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/filesource/filesourceplugin.cpp b/plugins/channeltx/filesource/filesourceplugin.cpp index 6f0c0bd17..9d95fb2f3 100644 --- a/plugins/channeltx/filesource/filesourceplugin.cpp +++ b/plugins/channeltx/filesource/filesourceplugin.cpp @@ -54,6 +54,22 @@ void FileSourcePlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(FileSource::m_channelIdURI, FileSource::m_channelId, this); } +void FileSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + FileSource *instance = new FileSource(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet } #endif -BasebandSampleSource* FileSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new FileSource(deviceAPI); -} - -ChannelAPI* FileSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new FileSource(deviceAPI); -} - ChannelWebAPIAdapter* FileSourcePlugin::createChannelWebAPIAdapter() const { return new FileSourceWebAPIAdapter(); diff --git a/plugins/channeltx/filesource/filesourceplugin.h b/plugins/channeltx/filesource/filesourceplugin.h index f2fa7d310..ddd487944 100644 --- a/plugins/channeltx/filesource/filesourceplugin.h +++ b/plugins/channeltx/filesource/filesourceplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/localsource/localsourceplugin.cpp b/plugins/channeltx/localsource/localsourceplugin.cpp index 820f2a16f..70e00a1e9 100644 --- a/plugins/channeltx/localsource/localsourceplugin.cpp +++ b/plugins/channeltx/localsource/localsourceplugin.cpp @@ -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(); diff --git a/plugins/channeltx/localsource/localsourceplugin.h b/plugins/channeltx/localsource/localsourceplugin.h index 4f1df9eff..6e44dfd66 100644 --- a/plugins/channeltx/localsource/localsourceplugin.h +++ b/plugins/channeltx/localsource/localsourceplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index ba39da21f..5b0f8a0d0 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -54,6 +54,22 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(AMMod::m_channelIdURI, AMMod::m_channelId, this); } +void AMModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + AMMod *instance = new AMMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* AMModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* AMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Bas } #endif -BasebandSampleSource* AMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new AMMod(deviceAPI); -} - -ChannelAPI* AMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new AMMod(deviceAPI); -} - ChannelWebAPIAdapter* AMModPlugin::createChannelWebAPIAdapter() const { return new AMModWebAPIAdapter(); diff --git a/plugins/channeltx/modam/ammodplugin.h b/plugins/channeltx/modam/ammodplugin.h index 21e09d763..e992d1d3d 100644 --- a/plugins/channeltx/modam/ammodplugin.h +++ b/plugins/channeltx/modam/ammodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index 2ef58b3d9..419a481c7 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -54,6 +54,22 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(ATVMod::m_channelIdURI, ATVMod::m_channelId, this); } +void ATVModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + ATVMod *instance = new ATVMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* ATVModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Ba } #endif -BasebandSampleSource* ATVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new ATVMod(deviceAPI); -} - -ChannelAPI* ATVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new ATVMod(deviceAPI); -} - ChannelWebAPIAdapter* ATVModPlugin::createChannelWebAPIAdapter() const { return new ATVModWebAPIAdapter(); diff --git a/plugins/channeltx/modatv/atvmodplugin.h b/plugins/channeltx/modatv/atvmodplugin.h index 5a386e9be..e8beaef0d 100644 --- a/plugins/channeltx/modatv/atvmodplugin.h +++ b/plugins/channeltx/modatv/atvmodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modfreedv/freedvmodplugin.cpp b/plugins/channeltx/modfreedv/freedvmodplugin.cpp index fcc1ca1d1..80eda4c99 100644 --- a/plugins/channeltx/modfreedv/freedvmodplugin.cpp +++ b/plugins/channeltx/modfreedv/freedvmodplugin.cpp @@ -54,6 +54,22 @@ void FreeDVModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(FreeDVMod::m_channelIdURI, FreeDVMod::m_channelId, this); } +void FreeDVModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + FreeDVMod *instance = new FreeDVMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* FreeDVModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* FreeDVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSource* FreeDVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new FreeDVMod(deviceAPI); -} - -ChannelAPI* FreeDVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new FreeDVMod(deviceAPI); -} - ChannelWebAPIAdapter* FreeDVModPlugin::createChannelWebAPIAdapter() const { return new FreeDVModWebAPIAdapter(); diff --git a/plugins/channeltx/modfreedv/freedvmodplugin.h b/plugins/channeltx/modfreedv/freedvmodplugin.h index 6b5e9d946..1c11f8497 100644 --- a/plugins/channeltx/modfreedv/freedvmodplugin.h +++ b/plugins/channeltx/modfreedv/freedvmodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index 1970e007c..c584893dc 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -54,6 +54,22 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(NFMMod::m_channelIdURI, NFMMod::m_channelId, this); } +void NFMModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + NFMMod *instance = new NFMMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* NFMModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Ba } #endif -BasebandSampleSource* NFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new NFMMod(deviceAPI); -} - -ChannelAPI* NFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new NFMMod(deviceAPI); -} - ChannelWebAPIAdapter* NFMModPlugin::createChannelWebAPIAdapter() const { return new NFMModWebAPIAdapter(); diff --git a/plugins/channeltx/modnfm/nfmmodplugin.h b/plugins/channeltx/modnfm/nfmmodplugin.h index 7ff58e204..fa660a583 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.h +++ b/plugins/channeltx/modnfm/nfmmodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modpacket/packetmodplugin.cpp b/plugins/channeltx/modpacket/packetmodplugin.cpp index 86c423717..32c0ccf48 100644 --- a/plugins/channeltx/modpacket/packetmodplugin.cpp +++ b/plugins/channeltx/modpacket/packetmodplugin.cpp @@ -54,6 +54,22 @@ void PacketModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(PacketMod::m_channelIdURI, PacketMod::m_channelId, this); } +void PacketModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + PacketMod *instance = new PacketMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* PacketModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* PacketModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSource* PacketModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new PacketMod(deviceAPI); -} - -ChannelAPI* PacketModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new PacketMod(deviceAPI); -} - ChannelWebAPIAdapter* PacketModPlugin::createChannelWebAPIAdapter() const { return new PacketModWebAPIAdapter(); diff --git a/plugins/channeltx/modpacket/packetmodplugin.h b/plugins/channeltx/modpacket/packetmodplugin.h index 16c317e66..a6474342a 100644 --- a/plugins/channeltx/modpacket/packetmodplugin.h +++ b/plugins/channeltx/modpacket/packetmodplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modssb/ssbmodplugin.cpp b/plugins/channeltx/modssb/ssbmodplugin.cpp index 60488cfc0..c3773264d 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.cpp +++ b/plugins/channeltx/modssb/ssbmodplugin.cpp @@ -54,6 +54,22 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(SSBMod::m_channelIdURI, SSBMod::m_channelId, this); } +void SSBModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + SSBMod *instance = new SSBMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* SSBModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Ba } #endif -BasebandSampleSource* SSBModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new SSBMod(deviceAPI); -} - -ChannelAPI* SSBModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new SSBMod(deviceAPI); -} - ChannelWebAPIAdapter* SSBModPlugin::createChannelWebAPIAdapter() const { return new SSBModWebAPIAdapter(); diff --git a/plugins/channeltx/modssb/ssbmodplugin.h b/plugins/channeltx/modssb/ssbmodplugin.h index 7ec88f7ef..67b634d8a 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.h +++ b/plugins/channeltx/modssb/ssbmodplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/modwfm/wfmmodplugin.cpp b/plugins/channeltx/modwfm/wfmmodplugin.cpp index ce946ec18..719db944b 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.cpp +++ b/plugins/channeltx/modwfm/wfmmodplugin.cpp @@ -54,6 +54,22 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(WFMMod::m_channelIdURI, WFMMod::m_channelId, this); } +void WFMModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + WFMMod *instance = new WFMMod(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* WFMModPlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -68,16 +84,6 @@ PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Ba } #endif -BasebandSampleSource* WFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new WFMMod(deviceAPI); -} - -ChannelAPI* WFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new WFMMod(deviceAPI); -} - ChannelWebAPIAdapter* WFMModPlugin::createChannelWebAPIAdapter() const { return new WFMModWebAPIAdapter(); diff --git a/plugins/channeltx/modwfm/wfmmodplugin.h b/plugins/channeltx/modwfm/wfmmodplugin.h index bb7dba636..ef121ed1f 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.h +++ b/plugins/channeltx/modwfm/wfmmodplugin.h @@ -34,9 +34,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/remotesource/remotesourceplugin.cpp b/plugins/channeltx/remotesource/remotesourceplugin.cpp index 066837c8b..52b6c7a48 100644 --- a/plugins/channeltx/remotesource/remotesourceplugin.cpp +++ b/plugins/channeltx/remotesource/remotesourceplugin.cpp @@ -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(); diff --git a/plugins/channeltx/remotesource/remotesourceplugin.h b/plugins/channeltx/remotesource/remotesourceplugin.h index 3cb3fad58..fc7786d0d 100644 --- a/plugins/channeltx/remotesource/remotesourceplugin.h +++ b/plugins/channeltx/remotesource/remotesourceplugin.h @@ -35,9 +35,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: diff --git a/plugins/channeltx/udpsource/udpsourceplugin.cpp b/plugins/channeltx/udpsource/udpsourceplugin.cpp index ea79010b3..fdc3cea5b 100644 --- a/plugins/channeltx/udpsource/udpsourceplugin.cpp +++ b/plugins/channeltx/udpsource/udpsourceplugin.cpp @@ -57,6 +57,22 @@ void UDPSourcePlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerTxChannel(UDPSource::m_channelIdURI, UDPSource::m_channelId, this); } +void UDPSourcePlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const +{ + if (bs || cs) + { + UDPSource *instance = new UDPSource(deviceAPI); + + if (bs) { + *bs = instance; + } + + if (cs) { + *cs = instance; + } + } +} + #ifdef SERVER_MODE PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI( DeviceUISet *deviceUISet, @@ -71,16 +87,6 @@ PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, } #endif -BasebandSampleSource* UDPSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const -{ - return new UDPSource(deviceAPI); -} - -ChannelAPI* UDPSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const -{ - return new UDPSource(deviceAPI); -} - ChannelWebAPIAdapter* UDPSourcePlugin::createChannelWebAPIAdapter() const { return new UDPSourceWebAPIAdapter(); diff --git a/plugins/channeltx/udpsource/udpsourceplugin.h b/plugins/channeltx/udpsource/udpsourceplugin.h index 03cd77055..f1a05bde3 100644 --- a/plugins/channeltx/udpsource/udpsourceplugin.h +++ b/plugins/channeltx/udpsource/udpsourceplugin.h @@ -36,9 +36,8 @@ public: const PluginDescriptor& getPluginDescriptor() const; void initPlugin(PluginAPI* pluginAPI); + virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const; virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; - virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; - virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const; private: