mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-30 20:40:20 -04:00 
			
		
		
		
	REST API: config: GET (4): optimize channel settings API management and generally improve constedness
This commit is contained in:
		
							parent
							
								
									810bbe2979
								
							
						
					
					
						commit
						ef82b89182
					
				| @ -50,17 +50,17 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| 	m_pluginAPI->registerRxChannel(ChannelAnalyzer::m_channelIdURI, ChannelAnalyzer::m_channelId, this); | ||||
| } | ||||
| 
 | ||||
| PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| 
 | ||||
| BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* ChannelAnalyzerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ChannelAnalyzer(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* ChannelAnalyzerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ChannelAnalyzer(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -39,23 +39,23 @@ void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* AMDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return AMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* AMDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new AMDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* AMDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* AMDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new AMDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createChannelWebAPIAdapter() const; | ||||
| 
 | ||||
| private: | ||||
|  | ||||
| @ -55,17 +55,17 @@ void ATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI) | ||||
|     m_ptrPluginAPI->registerRxChannel(ATVDemod::m_channelIdURI, ATVDemod::m_channelId, this); | ||||
| } | ||||
| 
 | ||||
| PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* ATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return ATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| 
 | ||||
| BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* ATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ATVDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* ATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* ATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ATVDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -37,9 +37,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* ptrPluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_ptrPluginDescriptor; | ||||
|  | ||||
| @ -57,23 +57,23 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* BFMPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* BFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* BFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return BFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* BFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* BFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new BFMDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* BFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* BFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new BFMDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -56,17 +56,17 @@ void DATVDemodPlugin::initPlugin(PluginAPI* ptrPluginAPI) | ||||
|     m_ptrPluginAPI->registerRxChannel(DATVDemod::m_channelIdURI, DATVDemod::m_channelId, this); | ||||
| } | ||||
| 
 | ||||
| PluginInstanceGUI* DATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* DATVDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return DATVDemodGUI::create(m_ptrPluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| 
 | ||||
| BasebandSampleSink* DATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* DATVDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new DATVDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* DATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* DATVDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new DATVDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -38,9 +38,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* ptrPluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| 
 | ||||
| private: | ||||
|  | ||||
| @ -56,23 +56,23 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new DSDDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* DSDDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* DSDDemodPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new DSDDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void FreeDVPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* FreeDVPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* FreeDVPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* FreeDVPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return FreeDVDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* FreeDVPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* FreeDVPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreeDVDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* FreeDVPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* FreeDVPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreeDVDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -33,17 +33,17 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| 	m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this); | ||||
| } | ||||
| 
 | ||||
| PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| 
 | ||||
| BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LoRaDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* LoRaPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* LoRaPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LoRaDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -18,9 +18,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -38,23 +38,23 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* NFMPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* NFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* NFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return NFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* NFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* NFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new NFMDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* NFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* NFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new NFMDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -18,9 +18,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -38,23 +38,23 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* SSBPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* SSBPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* SSBPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return SSBDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* SSBPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new SSBDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* SSBPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* SSBPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new SSBDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -18,9 +18,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -39,23 +39,23 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* WFMPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* WFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* WFMPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return WFMDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* WFMPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new WFMDemod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* WFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* WFMPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new WFMDemod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -18,9 +18,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void FreqTrackerPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* FreqTrackerPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return FreqTrackerGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* FreqTrackerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* FreqTrackerPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreqTracker(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* FreqTrackerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* FreqTrackerPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreqTracker(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -56,23 +56,23 @@ void LocalSinkPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* LocalSinkPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* LocalSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* LocalSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return LocalSinkGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* LocalSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* LocalSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LocalSink(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* LocalSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* LocalSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LocalSink(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -56,23 +56,23 @@ void RemoteSinkPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return RemoteSinkGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* RemoteSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* RemoteSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new RemoteSink(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* RemoteSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* RemoteSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new RemoteSink(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -56,23 +56,23 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* UDPSinkPlugin::createRxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSink *rxChannel) | ||||
|         BasebandSampleSink *rxChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* UDPSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) | ||||
| PluginInstanceGUI* UDPSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const | ||||
| { | ||||
| 	return UDPSinkGUI::create(m_pluginAPI, deviceUISet, rxChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSink* UDPSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSink* UDPSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new UDPSink(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* UDPSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* UDPSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new UDPSink(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel); | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const; | ||||
| 	virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void FileSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* FileSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return FileSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* FileSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* FileSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FileSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* FileSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* FileSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FileSource(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -56,23 +56,23 @@ void LocalSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* LocalSourcePlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* LocalSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* LocalSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return LocalSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* LocalSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* LocalSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LocalSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* LocalSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* LocalSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new LocalSource(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* AMModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* AMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* AMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
| 	return AMModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* AMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* AMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new AMMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* AMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* AMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new AMMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* ATVModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* ATVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return ATVModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* ATVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* ATVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ATVMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* ATVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* ATVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new ATVMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void FreeDVModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* FreeDVModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* FreeDVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* FreeDVModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return FreeDVModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* FreeDVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* FreeDVModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreeDVMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* FreeDVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* FreeDVModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new FreeDVMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* NFMModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* NFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return NFMModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* NFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* NFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new NFMMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* NFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* NFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new NFMMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel); | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel) const; | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* SSBModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* SSBModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return SSBModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* SSBModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* SSBModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new SSBMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* SSBModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* SSBModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new SSBMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* WFMModPlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* WFMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return WFMModGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* WFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* WFMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new WFMMod(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* WFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* WFMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new WFMMod(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -34,9 +34,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -55,23 +55,23 @@ void RemoteSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return RemoteSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new RemoteSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* RemoteSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* RemoteSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new RemoteSource(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -35,9 +35,9 @@ public: | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
|     virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
|     static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -57,23 +57,23 @@ void UDPSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet, | ||||
|         BasebandSampleSource *txChannel) | ||||
|         BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* UDPSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const | ||||
| { | ||||
|     return UDPSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* UDPSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) | ||||
| BasebandSampleSource* UDPSourcePlugin::createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new UDPSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI* UDPSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) | ||||
| ChannelAPI* UDPSourcePlugin::createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
| { | ||||
|     return new UDPSource(deviceAPI); | ||||
| } | ||||
|  | ||||
| @ -36,9 +36,9 @@ public: | ||||
| 	const PluginDescriptor& getPluginDescriptor() const; | ||||
| 	void initPlugin(PluginAPI* pluginAPI); | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel); | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI); | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI); | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) const; | ||||
| 	virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const; | ||||
| 	virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const; | ||||
| 
 | ||||
| private: | ||||
| 	static const PluginDescriptor m_pluginDescriptor; | ||||
|  | ||||
| @ -88,22 +88,20 @@ public: | ||||
| 
 | ||||
|     virtual PluginInstanceGUI* createRxChannelGUI( | ||||
|             DeviceUISet *deviceUISet, | ||||
|             BasebandSampleSink *rxChannel) | ||||
|             BasebandSampleSink *rxChannel) const | ||||
|     { | ||||
|         (void) deviceUISet; | ||||
|         (void) rxChannel; | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|     virtual BasebandSampleSink* createRxChannelBS( | ||||
|             DeviceAPI *deviceAPI) | ||||
|     virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const | ||||
|     { | ||||
|         (void) deviceAPI; | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|     virtual ChannelAPI* createRxChannelCS( | ||||
|             DeviceAPI *deviceAPI) | ||||
|     virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const | ||||
|     { | ||||
|         (void) deviceAPI; | ||||
|         return nullptr; | ||||
| @ -113,22 +111,20 @@ public: | ||||
| 
 | ||||
| 	virtual PluginInstanceGUI* createTxChannelGUI( | ||||
|             DeviceUISet *deviceUISet, | ||||
|             BasebandSampleSource *txChannel) | ||||
|             BasebandSampleSource *txChannel) const | ||||
|     { | ||||
|         (void) deviceUISet; | ||||
|         (void) txChannel; | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|     virtual BasebandSampleSource* createTxChannelBS( | ||||
|             DeviceAPI *deviceAPI) | ||||
|     virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const | ||||
|     { | ||||
|         (void) deviceAPI; | ||||
|         return nullptr; | ||||
|     } | ||||
| 
 | ||||
|     virtual ChannelAPI* createTxChannelCS( | ||||
|             DeviceAPI *deviceAPI) | ||||
|     virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const | ||||
|     { | ||||
|         (void) deviceAPI; | ||||
|         return nullptr; | ||||
|  | ||||
| @ -25,7 +25,9 @@ WebAPIAdapterBase::WebAPIAdapterBase() | ||||
| {} | ||||
| 
 | ||||
| WebAPIAdapterBase::~WebAPIAdapterBase() | ||||
| {} | ||||
| { | ||||
|     m_webAPIChannelAdapters.flush(); | ||||
| } | ||||
| 
 | ||||
| void WebAPIAdapterBase::webapiFormatPreferences( | ||||
|     SWGSDRangel::SWGPreferences *apiPreferences, | ||||
| @ -69,11 +71,10 @@ void WebAPIAdapterBase::webapiFormatPreset( | ||||
|         const QByteArray& channelSettings = channelConfig.m_config; | ||||
|         SWGSDRangel::SWGChannelSettings *swgChannelSettings = swgChannelConfigs->back()->getConfig(); | ||||
|         swgChannelSettings->init(); | ||||
|         const PluginInterface *pluginInterface = m_pluginManager->getChannelPluginInterface(channelConfig.m_channelIdURI); | ||||
|         ChannelAPI *channelWebAPIAdapter = m_webAPIChannelAdapters.getChannelAPI(channelConfig.m_channelIdURI, m_pluginManager); | ||||
| 
 | ||||
|         if (pluginInterface)  // TODO: optimize by caching web API adapters
 | ||||
|         if (channelWebAPIAdapter) | ||||
|         { | ||||
|             ChannelAPI *channelWebAPIAdapter = pluginInterface->createChannelWebAPIAdapter(); | ||||
|             channelWebAPIAdapter->deserialize(channelSettings); | ||||
|             QString errorMessage; | ||||
|             channelWebAPIAdapter->webapiSettingsGet(*swgChannelSettings, errorMessage); | ||||
| @ -110,3 +111,28 @@ void WebAPIAdapterBase::webapiFormatCommand( | ||||
|     apiCommand->setAssociateKey(command.getAssociateKey() ? 1 : 0); | ||||
|     apiCommand->setRelease(command.getRelease() ? 1 : 0); | ||||
| } | ||||
| 
 | ||||
| ChannelAPI *WebAPIAdapterBase::WebAPIChannelAdapters::getChannelAPI(const QString& channelURI, const PluginManager *pluginManager) | ||||
| { | ||||
|     QMap<QString, ChannelAPI*>::iterator it = m_webAPIChannelAdapters.find(channelURI); | ||||
| 
 | ||||
|     if (it == m_webAPIChannelAdapters.end()) | ||||
|     { | ||||
|         ChannelAPI *channelAPI = pluginManager->getChannelPluginInterface(channelURI)->createChannelWebAPIAdapter(); | ||||
|         m_webAPIChannelAdapters.insert(channelURI, channelAPI); | ||||
|         return channelAPI; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         return *it; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void WebAPIAdapterBase::WebAPIChannelAdapters::flush() | ||||
| { | ||||
|     foreach(ChannelAPI *ChannelAPI, m_webAPIChannelAdapters) { | ||||
|         delete ChannelAPI; | ||||
|     } | ||||
| 
 | ||||
|     m_webAPIChannelAdapters.clear(); | ||||
| } | ||||
| @ -19,6 +19,8 @@ | ||||
| #ifndef SDRBASE_WEBAPI_WEBAPIADAPTERBASE_H_ | ||||
| #define SDRBASE_WEBAPI_WEBAPIADAPTERBASE_H_ | ||||
| 
 | ||||
| #include <QMap> | ||||
| 
 | ||||
| #include "export.h" | ||||
| #include "SWGPreferences.h" | ||||
| #include "SWGPreset.h" | ||||
| @ -28,6 +30,7 @@ | ||||
| #include "commands/command.h" | ||||
| 
 | ||||
| class PluginManager; | ||||
| class ChannelAPI; | ||||
| 
 | ||||
| /**
 | ||||
|  * Adapter between API and objects in sdrbase library | ||||
| @ -54,7 +57,17 @@ public: | ||||
|     ); | ||||
| 
 | ||||
| private: | ||||
|     class WebAPIChannelAdapters | ||||
|     { | ||||
|     public: | ||||
|         ChannelAPI *getChannelAPI(const QString& channelURI, const PluginManager *pluginManager); | ||||
|         void flush(); | ||||
|     private: | ||||
|         QMap<QString, ChannelAPI*> m_webAPIChannelAdapters; | ||||
|     }; | ||||
| 
 | ||||
|     const PluginManager *m_pluginManager; | ||||
|     WebAPIChannelAdapters m_webAPIChannelAdapters; | ||||
| }; | ||||
| 
 | ||||
| #endif // SDRBASE_WEBAPI_WEBAPIADAPTERBASE_H_
 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user