Enumerate file and sdrdaemon plugins the new way

pull/127/head
f4exb 2017-11-02 03:42:59 +01:00
rodzic 55ad76f43c
commit 31c7ebf36c
4 zmienionych plików z 36 dodań i 56 usunięć

Wyświetl plik

@ -53,21 +53,16 @@ void FileSinkPlugin::initPlugin(PluginAPI* pluginAPI)
PluginInterface::SamplingDevices FileSinkPlugin::enumSampleSinks()
{
SamplingDevices result;
int count = 1;
for(int i = 0; i < count; i++)
{
QString displayedName(QString("FileSink[%1]").arg(i));
result.append(SamplingDevice(displayedName,
m_hardwareID,
m_deviceTypeID,
QString::null,
i,
PluginInterface::SamplingDevice::BuiltInDevice,
false,
0));
}
result.append(SamplingDevice(
"FileSink",
m_hardwareID,
m_deviceTypeID,
QString::null,
0,
PluginInterface::SamplingDevice::BuiltInDevice,
false,
0));
return result;
}

Wyświetl plik

@ -54,21 +54,16 @@ void SDRdaemonSinkPlugin::initPlugin(PluginAPI* pluginAPI)
PluginInterface::SamplingDevices SDRdaemonSinkPlugin::enumSampleSinks()
{
SamplingDevices result;
int count = 1;
for(int i = 0; i < count; i++)
{
QString displayedName(QString("SDRdaemonSink[%1]").arg(i));
result.append(SamplingDevice(displayedName,
m_hardwareID,
m_deviceTypeID,
QString::null,
i,
PluginInterface::SamplingDevice::BuiltInDevice,
false,
0));
}
result.append(SamplingDevice(
"SDRdaemonSink",
m_hardwareID,
m_deviceTypeID,
QString::null,
0,
PluginInterface::SamplingDevice::BuiltInDevice,
false,
0));
return result;
}

Wyświetl plik

@ -53,21 +53,16 @@ void FileSourcePlugin::initPlugin(PluginAPI* pluginAPI)
PluginInterface::SamplingDevices FileSourcePlugin::enumSampleSources()
{
SamplingDevices result;
int count = 1;
for(int i = 0; i < count; i++)
{
QString displayedName(QString("FileSource[%1]").arg(i));
result.append(SamplingDevice(displayedName,
m_hardwareID,
m_deviceTypeID,
QString::null,
i,
PluginInterface::SamplingDevice::BuiltInDevice,
true,
0));
}
result.append(SamplingDevice(
"FileSource",
m_hardwareID,
m_deviceTypeID,
QString::null,
0,
PluginInterface::SamplingDevice::BuiltInDevice,
true,
0));
return result;
}

Wyświetl plik

@ -54,21 +54,16 @@ void SDRdaemonSourcePlugin::initPlugin(PluginAPI* pluginAPI)
PluginInterface::SamplingDevices SDRdaemonSourcePlugin::enumSampleSources()
{
SamplingDevices result;
int count = 1;
for(int i = 0; i < count; i++)
{
QString displayedName(QString("SDRdaemonSource[%1]").arg(i));
result.append(SamplingDevice(displayedName,
m_hardwareID,
m_deviceTypeID,
QString::null,
i,
PluginInterface::SamplingDevice::BuiltInDevice,
true,
0));
}
result.append(SamplingDevice(
"SDRdaemonSource",
m_hardwareID,
m_deviceTypeID,
QString::null,
0,
PluginInterface::SamplingDevice::BuiltInDevice,
true,
0));
return result;
}