1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-08 22:26:33 -04:00
sdrangel/sdrgui/plugin/pluginapi.h

59 lines
1.4 KiB
C
Raw Normal View History

#ifndef INCLUDE_PLUGINAPI_H
#define INCLUDE_PLUGINAPI_H
#include <QObject>
#include <QList>
#include "util/export.h"
2016-05-14 22:38:37 -04:00
class QString;
class PluginManager;
class PluginInterface;
class MessageQueue;
class PluginInstanceGUI;
2015-08-29 19:26:51 -04:00
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
2016-10-13 16:23:43 -04:00
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);
// Categories enquiry
bool isBuiltInDevice(QString& deviceTypeID);
protected:
PluginManager* m_pluginManager;
PluginAPI(PluginManager* pluginManager);
~PluginAPI();
friend class PluginManager;
};
#endif // INCLUDE_PLUGINAPI_H