| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | #ifndef INCLUDE_PLUGINAPI_H
 | 
					
						
							|  |  |  | #define INCLUDE_PLUGINAPI_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QObject>
 | 
					
						
							|  |  |  | #include "util/export.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class QDockWidget; | 
					
						
							|  |  |  | class QAction; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class PluginManager; | 
					
						
							|  |  |  | class PluginInterface; | 
					
						
							|  |  |  | class SampleSource; | 
					
						
							|  |  |  | class SampleSink; | 
					
						
							|  |  |  | class DSPEngine; | 
					
						
							|  |  |  | class AudioFifo; | 
					
						
							|  |  |  | class MessageQueue; | 
					
						
							|  |  |  | class MainWindow; | 
					
						
							|  |  |  | class ChannelMarker; | 
					
						
							|  |  |  | class PluginGUI; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-30 01:26:51 +02:00
										 |  |  | class SDRANGEL_API PluginAPI : public QObject { | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	// MainWindow access
 | 
					
						
							|  |  |  | 	QDockWidget* createMainWindowDock(Qt::DockWidgetArea dockWidgetArea, const QString& title); | 
					
						
							|  |  |  | 	MessageQueue* getMainWindowMessageQueue(); | 
					
						
							|  |  |  | 	void setInputGUI(QWidget* inputGUI); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Channel stuff
 | 
					
						
							|  |  |  | 	void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action); | 
					
						
							|  |  |  | 	void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI); | 
					
						
							|  |  |  | 	void addChannelRollup(QWidget* pluginGUI); | 
					
						
							|  |  |  | 	void removeChannelInstance(PluginGUI* pluginGUI); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	void addChannelMarker(ChannelMarker* channelMarker); | 
					
						
							|  |  |  | 	void removeChannelMarker(ChannelMarker* channelMarker); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// DSPEngine access
 | 
					
						
							| 
									
										
										
										
											2015-08-17 08:29:34 +02:00
										 |  |  | 	/* Direct access with DSP engine singleton
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	void setSampleSource(SampleSource* sampleSource); | 
					
						
							|  |  |  | 	void addSampleSink(SampleSink* sampleSink); | 
					
						
							|  |  |  | 	void removeSampleSink(SampleSink* sampleSink); | 
					
						
							|  |  |  | 	MessageQueue* getDSPEngineMessageQueue(); | 
					
						
							|  |  |  | 	void addAudioSource(AudioFifo* audioFifo); | 
					
						
							|  |  |  | 	void removeAudioSource(AudioFifo* audioFifo); | 
					
						
							| 
									
										
										
										
											2015-08-17 08:29:34 +02:00
										 |  |  | 	*/ | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// Sample Source stuff
 | 
					
						
							|  |  |  | 	void registerSampleSource(const QString& sourceName, PluginInterface* plugin); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-01 04:07:09 +02:00
										 |  |  | 	// R/O access to main window
 | 
					
						
							|  |  |  | 	const MainWindow* getMainWindow() const { return m_mainWindow; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  | 	PluginManager* m_pluginManager; | 
					
						
							|  |  |  | 	MainWindow* m_mainWindow; | 
					
						
							|  |  |  | 	DSPEngine* m_dspEngine; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow, DSPEngine* dspEngine); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	friend class PluginManager; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // INCLUDE_PLUGINAPI_H
 |