mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-19 06:41:47 -05:00
SDRdaemon: Web API: implemented daemonRunGet
This commit is contained in:
parent
1d968e9efa
commit
89dd62adbf
@ -250,9 +250,6 @@ int WebAPIAdapterDaemon::daemonSettingsPutPatch(
|
|||||||
*error.getMessage() = QString("DeviceSet error");
|
*error.getMessage() = QString("DeviceSet error");
|
||||||
return 500;
|
return 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
*error.getMessage() = "Not implemented";
|
|
||||||
return 501;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterDaemon::daemonRunGet(
|
int WebAPIAdapterDaemon::daemonRunGet(
|
||||||
@ -260,8 +257,24 @@ int WebAPIAdapterDaemon::daemonRunGet(
|
|||||||
SWGSDRangel::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
error.init();
|
error.init();
|
||||||
*error.getMessage() = "Not implemented";
|
|
||||||
return 501;
|
if (m_sdrDaemonMain.m_deviceSourceEngine) // Rx
|
||||||
|
{
|
||||||
|
DeviceSampleSource *source = m_sdrDaemonMain.m_deviceSourceAPI->getSampleSource();
|
||||||
|
response.init();
|
||||||
|
return source->webapiRunGet(response, *error.getMessage());
|
||||||
|
}
|
||||||
|
else if (m_sdrDaemonMain.m_deviceSinkEngine) // Tx
|
||||||
|
{
|
||||||
|
DeviceSampleSink *sink = m_sdrDaemonMain.m_deviceSinkAPI->getSampleSink();
|
||||||
|
response.init();
|
||||||
|
return sink->webapiRunGet(response, *error.getMessage());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*error.getMessage() = QString("DeviceSet error");
|
||||||
|
return 500;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterDaemon::daemonRunPost(
|
int WebAPIAdapterDaemon::daemonRunPost(
|
||||||
|
Loading…
Reference in New Issue
Block a user