mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Moved plugin classes back to sdrbase
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#ifndef INCLUDE_PLUGINAPI_H
|
||||
#define INCLUDE_PLUGINAPI_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
|
||||
#include "util/export.h"
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
class QString;
|
||||
|
||||
class PluginManager;
|
||||
class MessageQueue;
|
||||
class PluginInstanceGUI;
|
||||
|
||||
class SDRANGEL_API PluginAPI : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct ChannelRegistration
|
||||
{
|
||||
QString m_channelId; //!< Channel or device type ID
|
||||
PluginInterface* m_plugin;
|
||||
ChannelRegistration(const QString& channelId, PluginInterface* plugin) :
|
||||
m_channelId(channelId),
|
||||
m_plugin(plugin)
|
||||
{ }
|
||||
};
|
||||
|
||||
typedef QList<ChannelRegistration> ChannelRegistrations;
|
||||
|
||||
// Rx Channel stuff
|
||||
void registerRxChannel(const QString& channelName, PluginInterface* plugin);
|
||||
ChannelRegistrations *getRxChannelRegistrations();
|
||||
|
||||
// Tx Channel stuff
|
||||
void registerTxChannel(const QString& channelName, PluginInterface* plugin);
|
||||
ChannelRegistrations *getTxChannelRegistrations();
|
||||
|
||||
// Sample Source stuff
|
||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||
|
||||
// Sample Sink stuff
|
||||
void registerSampleSink(const QString& sinkName, PluginInterface* plugin);
|
||||
|
||||
protected:
|
||||
PluginManager* m_pluginManager;
|
||||
|
||||
PluginAPI(PluginManager* pluginManager);
|
||||
~PluginAPI();
|
||||
|
||||
friend class PluginManager;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_PLUGINAPI_H
|
||||
Reference in New Issue
Block a user