1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -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
@@ -1569,6 +1569,7 @@ int WebAPIAdapterGUI::devicesetDeviceSettingsGet(
int WebAPIAdapterGUI::devicesetDeviceActionsPost(
int deviceSetIndex,
const QStringList& deviceActionsKeys,
SWGSDRangel::SWGDeviceActions& query,
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
@@ -1594,7 +1595,7 @@ int WebAPIAdapterGUI::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)
{
@@ -1620,7 +1621,7 @@ int WebAPIAdapterGUI::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)
{
@@ -1646,7 +1647,7 @@ int WebAPIAdapterGUI::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)
{
@@ -2389,6 +2390,7 @@ int WebAPIAdapterGUI::devicesetChannelReportGet(
int WebAPIAdapterGUI::devicesetChannelActionsPost(
int deviceSetIndex,
int channelIndex,
const QStringList& channelActionsKeys,
SWGSDRangel::SWGChannelActions& query,
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
@@ -2415,7 +2417,7 @@ int WebAPIAdapterGUI::devicesetChannelActionsPost(
if (channelType == *query.getChannelType())
{
int res = channelAPI->webapiActionsPost(query, *error.getMessage());
int res = channelAPI->webapiActionsPost(channelActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -2451,7 +2453,7 @@ int WebAPIAdapterGUI::devicesetChannelActionsPost(
if (channelType == *query.getChannelType())
{
int res = channelAPI->webapiActionsPost(query, *error.getMessage());
int res = channelAPI->webapiActionsPost(channelActionsKeys, query, *error.getMessage());
if (res/100 == 2)
{
@@ -2503,7 +2505,7 @@ int WebAPIAdapterGUI::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();