1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-09 09:25:07 -04:00

REST API: device and channel actions: fixes to implementation

This commit is contained in:
f4exb
2020-03-09 19:56:09 +01:00
parent c8b9c912a2
commit b317c0a59d
18 changed files with 329 additions and 60 deletions
+8 -6
View File
@@ -1666,6 +1666,7 @@ int WebAPIAdapterSrv::devicesetDeviceSettingsGet(
int WebAPIAdapterSrv::devicesetDeviceActionsPost(
int deviceSetIndex,
const QStringList& deviceActionsKeys,
SWGSDRangel::SWGDeviceActions& query,
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
@@ -1691,7 +1692,7 @@ int WebAPIAdapterSrv::devicesetDeviceActionsPost(
else
{
DeviceSampleSource *source = deviceSet->m_deviceAPI->getSampleSource();
int res = source->webapiActionsPost(query, *error.getMessage());
int res = source->webapiActionsPost(deviceActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -1717,7 +1718,7 @@ int WebAPIAdapterSrv::devicesetDeviceActionsPost(
else
{
DeviceSampleSink *sink = deviceSet->m_deviceAPI->getSampleSink();
int res = sink->webapiActionsPost(query, *error.getMessage());
int res = sink->webapiActionsPost(deviceActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -1743,7 +1744,7 @@ int WebAPIAdapterSrv::devicesetDeviceActionsPost(
else
{
DeviceSampleMIMO *mimo = deviceSet->m_deviceAPI->getSampleMIMO();
int res = mimo->webapiActionsPost(query, *error.getMessage());
int res = mimo->webapiActionsPost(deviceActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -2485,6 +2486,7 @@ int WebAPIAdapterSrv::devicesetChannelReportGet(
int WebAPIAdapterSrv::devicesetChannelActionsPost(
int deviceSetIndex,
int channelIndex,
const QStringList& channelActionsKeys,
SWGSDRangel::SWGChannelActions& query,
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
@@ -2511,7 +2513,7 @@ int WebAPIAdapterSrv::devicesetChannelActionsPost(
if (channelType == *query.getChannelType())
{
int res = channelAPI->webapiActionsPost(query, *error.getMessage());
int res = channelAPI->webapiActionsPost(channelActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -2547,7 +2549,7 @@ int WebAPIAdapterSrv::devicesetChannelActionsPost(
if (channelType == *query.getChannelType())
{
int res = channelAPI->webapiActionsPost(query, *error.getMessage());
int res = channelAPI->webapiActionsPost(channelActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -2599,7 +2601,7 @@ int WebAPIAdapterSrv::devicesetChannelActionsPost(
if (channelType == *query.getChannelType())
{
int res = channelAPI->webapiActionsPost(query, *error.getMessage());
int res = channelAPI->webapiActionsPost(channelActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
response.init();