mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 05:37:50 -04:00
Web API: changed namespace and some namings
This commit is contained in:
parent
384aa242cb
commit
8d3541c5ad
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
namespace Swagger
|
namespace SWGSDRangel
|
||||||
{
|
{
|
||||||
class SWGInstanceSummaryResponse;
|
class SWGInstanceSummaryResponse;
|
||||||
class SWGInstanceDevicesResponse;
|
class SWGInstanceDevicesResponse;
|
||||||
@ -51,8 +51,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceSummary(
|
virtual int instanceSummary(
|
||||||
Swagger::SWGInstanceSummaryResponse& response __attribute__((unused)),
|
SWGSDRangel::SWGInstanceSummaryResponse& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,8 +61,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int instanceDevices(
|
virtual int instanceDevices(
|
||||||
bool tx __attribute__((unused)),
|
bool tx __attribute__((unused)),
|
||||||
Swagger::SWGInstanceDevicesResponse& response __attribute__((unused)),
|
SWGSDRangel::SWGInstanceDevicesResponse& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,8 +71,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int instanceChannels(
|
virtual int instanceChannels(
|
||||||
bool tx __attribute__((unused)),
|
bool tx __attribute__((unused)),
|
||||||
Swagger::SWGInstanceChannelsResponse& response __attribute__((unused)),
|
SWGSDRangel::SWGInstanceChannelsResponse& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,8 +80,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceLoggingGet(
|
virtual int instanceLoggingGet(
|
||||||
Swagger::SWGLoggingInfo& response __attribute__((unused)),
|
SWGSDRangel::SWGLoggingInfo& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,8 +89,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceLoggingPut(
|
virtual int instanceLoggingPut(
|
||||||
Swagger::SWGLoggingInfo& response __attribute__((unused)),
|
SWGSDRangel::SWGLoggingInfo& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,8 +98,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceAudioGet(
|
virtual int instanceAudioGet(
|
||||||
Swagger::SWGAudioDevices& response __attribute__((unused)),
|
SWGSDRangel::SWGAudioDevices& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,8 +107,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceAudioPatch(
|
virtual int instanceAudioPatch(
|
||||||
Swagger::SWGAudioDevicesSelect& response __attribute__((unused)),
|
SWGSDRangel::SWGAudioDevicesSelect& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,8 +116,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceLocationGet(
|
virtual int instanceLocationGet(
|
||||||
Swagger::SWGLocationInformation& response __attribute__((unused)),
|
SWGSDRangel::SWGLocationInformation& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,8 +125,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceLocationPut(
|
virtual int instanceLocationPut(
|
||||||
Swagger::SWGLocationInformation& response __attribute__((unused)),
|
SWGSDRangel::SWGLocationInformation& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -135,8 +135,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int instanceDVSerialPatch(
|
virtual int instanceDVSerialPatch(
|
||||||
bool dvserial __attribute__((unused)),
|
bool dvserial __attribute__((unused)),
|
||||||
Swagger::SWGDVSeralDevices& response __attribute__((unused)),
|
SWGSDRangel::SWGDVSeralDevices& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,8 +144,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instancePresetGet(
|
virtual int instancePresetGet(
|
||||||
Swagger::SWGPresets& response __attribute__((unused)),
|
SWGSDRangel::SWGPresets& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,9 +153,9 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instancePresetPatch(
|
virtual int instancePresetPatch(
|
||||||
Swagger::SWGPresetTransfer& query __attribute__((unused)),
|
SWGSDRangel::SWGPresetTransfer& query __attribute__((unused)),
|
||||||
Swagger::SWGPresetIdentifier& response __attribute__((unused)),
|
SWGSDRangel::SWGPresetIdentifier& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -163,9 +163,9 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instancePresetPut(
|
virtual int instancePresetPut(
|
||||||
Swagger::SWGPresetTransfer& query __attribute__((unused)),
|
SWGSDRangel::SWGPresetTransfer& query __attribute__((unused)),
|
||||||
Swagger::SWGPresetIdentifier& response __attribute__((unused)),
|
SWGSDRangel::SWGPresetIdentifier& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,9 +173,9 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instancePresetPost(
|
virtual int instancePresetPost(
|
||||||
Swagger::SWGPresetTransfer& query __attribute__((unused)),
|
SWGSDRangel::SWGPresetTransfer& query __attribute__((unused)),
|
||||||
Swagger::SWGPresetIdentifier& response __attribute__((unused)),
|
SWGSDRangel::SWGPresetIdentifier& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,8 +183,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instancePresetDelete(
|
virtual int instancePresetDelete(
|
||||||
Swagger::SWGPresetIdentifier& response __attribute__((unused)),
|
SWGSDRangel::SWGPresetIdentifier& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,8 +192,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceDeviceSetsGet(
|
virtual int instanceDeviceSetsGet(
|
||||||
Swagger::SWGDeviceSetList& response __attribute__((unused)),
|
SWGSDRangel::SWGDeviceSetList& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -202,8 +202,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int instanceDeviceSetsPost(
|
virtual int instanceDeviceSetsPost(
|
||||||
bool tx __attribute__((unused)),
|
bool tx __attribute__((unused)),
|
||||||
Swagger::SWGDeviceSet& response __attribute__((unused)),
|
SWGSDRangel::SWGDeviceSet& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,8 +211,8 @@ public:
|
|||||||
* returns the Http status code (default 501: not implemented)
|
* returns the Http status code (default 501: not implemented)
|
||||||
*/
|
*/
|
||||||
virtual int instanceDeviceSetsDelete(
|
virtual int instanceDeviceSetsDelete(
|
||||||
Swagger::SWGDeviceSetList& response __attribute__((unused)),
|
SWGSDRangel::SWGDeviceSetList& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -221,8 +221,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int devicesetGet(
|
virtual int devicesetGet(
|
||||||
int deviceSetIndex __attribute__((unused)),
|
int deviceSetIndex __attribute__((unused)),
|
||||||
Swagger::SWGDeviceSet& response __attribute__((unused)),
|
SWGSDRangel::SWGDeviceSet& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,8 +231,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int devicesetDevicePut(
|
virtual int devicesetDevicePut(
|
||||||
int deviceSetIndex __attribute__((unused)),
|
int deviceSetIndex __attribute__((unused)),
|
||||||
Swagger::SWGDeviceListItem& response __attribute__((unused)),
|
SWGSDRangel::SWGDeviceListItem& response __attribute__((unused)),
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{ return 501; }
|
{ return 501; }
|
||||||
|
|
||||||
static QString instanceSummaryURL;
|
static QString instanceSummaryURL;
|
||||||
|
@ -109,8 +109,8 @@ void WebAPIRequestMapper::instanceSummaryService(qtwebapp::HttpRequest& request,
|
|||||||
{
|
{
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
Swagger::SWGInstanceSummaryResponse normalResponse;
|
SWGSDRangel::SWGInstanceSummaryResponse normalResponse;
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
int status = m_adapter->instanceSummary(normalResponse, errorResponse);
|
int status = m_adapter->instanceSummary(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
@ -130,8 +130,8 @@ void WebAPIRequestMapper::instanceSummaryService(qtwebapp::HttpRequest& request,
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceDevicesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceDevicesService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGInstanceDevicesResponse normalResponse;
|
SWGSDRangel::SWGInstanceDevicesResponse normalResponse;
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
@ -160,8 +160,8 @@ void WebAPIRequestMapper::instanceDevicesService(qtwebapp::HttpRequest& request,
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceChannelsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceChannelsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGInstanceChannelsResponse normalResponse;
|
SWGSDRangel::SWGInstanceChannelsResponse normalResponse;
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
@ -190,8 +190,8 @@ void WebAPIRequestMapper::instanceChannelsService(qtwebapp::HttpRequest& request
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceLoggingService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceLoggingService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGLoggingInfo normalResponse;
|
SWGSDRangel::SWGLoggingInfo normalResponse;
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
@ -230,11 +230,11 @@ void WebAPIRequestMapper::instanceLoggingService(qtwebapp::HttpRequest& request,
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceAudioService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceAudioService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
Swagger::SWGAudioDevices normalResponse;
|
SWGSDRangel::SWGAudioDevices normalResponse;
|
||||||
|
|
||||||
int status = m_adapter->instanceAudioGet(normalResponse, errorResponse);
|
int status = m_adapter->instanceAudioGet(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
@ -247,7 +247,7 @@ void WebAPIRequestMapper::instanceAudioService(qtwebapp::HttpRequest& request, q
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "PATCH")
|
else if (request.getMethod() == "PATCH")
|
||||||
{
|
{
|
||||||
Swagger::SWGAudioDevicesSelect normalResponse;
|
SWGSDRangel::SWGAudioDevicesSelect normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -272,11 +272,11 @@ void WebAPIRequestMapper::instanceAudioService(qtwebapp::HttpRequest& request, q
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceLocationService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceLocationService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
Swagger::SWGLocationInformation normalResponse;
|
SWGSDRangel::SWGLocationInformation normalResponse;
|
||||||
|
|
||||||
int status = m_adapter->instanceLocationGet(normalResponse, errorResponse);
|
int status = m_adapter->instanceLocationGet(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
@ -289,7 +289,7 @@ void WebAPIRequestMapper::instanceLocationService(qtwebapp::HttpRequest& request
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "PUT")
|
else if (request.getMethod() == "PUT")
|
||||||
{
|
{
|
||||||
Swagger::SWGLocationInformation normalResponse;
|
SWGSDRangel::SWGLocationInformation normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -314,7 +314,7 @@ void WebAPIRequestMapper::instanceLocationService(qtwebapp::HttpRequest& request
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceDVSerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceDVSerialService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "PATCH")
|
if (request.getMethod() == "PATCH")
|
||||||
{
|
{
|
||||||
@ -325,7 +325,7 @@ void WebAPIRequestMapper::instanceDVSerialService(qtwebapp::HttpRequest& request
|
|||||||
dvserial = !(dvserialStr == "0");
|
dvserial = !(dvserialStr == "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
Swagger::SWGDVSeralDevices normalResponse;
|
SWGSDRangel::SWGDVSeralDevices normalResponse;
|
||||||
|
|
||||||
int status = m_adapter->instanceDVSerialPatch(dvserial, normalResponse, errorResponse);
|
int status = m_adapter->instanceDVSerialPatch(dvserial, normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
@ -345,11 +345,11 @@ void WebAPIRequestMapper::instanceDVSerialService(qtwebapp::HttpRequest& request
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
Swagger::SWGPresets normalResponse;
|
SWGSDRangel::SWGPresets normalResponse;
|
||||||
int status = m_adapter->instancePresetGet(normalResponse, errorResponse);
|
int status = m_adapter->instancePresetGet(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
|
|
||||||
@ -361,8 +361,8 @@ void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request,
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "PATCH")
|
else if (request.getMethod() == "PATCH")
|
||||||
{
|
{
|
||||||
Swagger::SWGPresetTransfer query;
|
SWGSDRangel::SWGPresetTransfer query;
|
||||||
Swagger::SWGPresetIdentifier normalResponse;
|
SWGSDRangel::SWGPresetIdentifier normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -391,8 +391,8 @@ void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request,
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "PUT")
|
else if (request.getMethod() == "PUT")
|
||||||
{
|
{
|
||||||
Swagger::SWGPresetTransfer query;
|
SWGSDRangel::SWGPresetTransfer query;
|
||||||
Swagger::SWGPresetIdentifier normalResponse;
|
SWGSDRangel::SWGPresetIdentifier normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -421,8 +421,8 @@ void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request,
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "POST")
|
else if (request.getMethod() == "POST")
|
||||||
{
|
{
|
||||||
Swagger::SWGPresetTransfer query;
|
SWGSDRangel::SWGPresetTransfer query;
|
||||||
Swagger::SWGPresetIdentifier normalResponse;
|
SWGSDRangel::SWGPresetIdentifier normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -451,7 +451,7 @@ void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request,
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "DELETE")
|
else if (request.getMethod() == "DELETE")
|
||||||
{
|
{
|
||||||
Swagger::SWGPresetIdentifier normalResponse;
|
SWGSDRangel::SWGPresetIdentifier normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -487,11 +487,11 @@ void WebAPIRequestMapper::instancePresetService(qtwebapp::HttpRequest& request,
|
|||||||
|
|
||||||
void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
Swagger::SWGDeviceSetList normalResponse;
|
SWGSDRangel::SWGDeviceSetList normalResponse;
|
||||||
int status = m_adapter->instanceDeviceSetsGet(normalResponse, errorResponse);
|
int status = m_adapter->instanceDeviceSetsGet(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& reque
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "POST")
|
else if (request.getMethod() == "POST")
|
||||||
{
|
{
|
||||||
Swagger::SWGDeviceSet normalResponse;
|
SWGSDRangel::SWGDeviceSet normalResponse;
|
||||||
QByteArray txStr = request.getParameter("tx");
|
QByteArray txStr = request.getParameter("tx");
|
||||||
bool tx = false;
|
bool tx = false;
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& reque
|
|||||||
}
|
}
|
||||||
else if (request.getMethod() == "DELETE")
|
else if (request.getMethod() == "DELETE")
|
||||||
{
|
{
|
||||||
Swagger::SWGDeviceSetList normalResponse;
|
SWGSDRangel::SWGDeviceSetList normalResponse;
|
||||||
int status = m_adapter->instanceDeviceSetsDelete(normalResponse, errorResponse);
|
int status = m_adapter->instanceDeviceSetsDelete(normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
|
|
||||||
@ -541,13 +541,13 @@ void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& reque
|
|||||||
|
|
||||||
void WebAPIRequestMapper::deviceset(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::deviceset(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
if (request.getMethod() == "GET")
|
if (request.getMethod() == "GET")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Swagger::SWGDeviceSet normalResponse;
|
SWGSDRangel::SWGDeviceSet normalResponse;
|
||||||
int deviceSetIndex = boost::lexical_cast<int>(indexStr);
|
int deviceSetIndex = boost::lexical_cast<int>(indexStr);
|
||||||
int status = m_adapter->devicesetGet(deviceSetIndex, normalResponse, errorResponse);
|
int status = m_adapter->devicesetGet(deviceSetIndex, normalResponse, errorResponse);
|
||||||
response.setStatus(status);
|
response.setStatus(status);
|
||||||
@ -575,7 +575,7 @@ void WebAPIRequestMapper::deviceset(const std::string& indexStr, qtwebapp::HttpR
|
|||||||
|
|
||||||
void WebAPIRequestMapper::devicesetDevice(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
void WebAPIRequestMapper::devicesetDevice(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -583,7 +583,7 @@ void WebAPIRequestMapper::devicesetDevice(const std::string& indexStr, qtwebapp:
|
|||||||
|
|
||||||
if (request.getMethod() == "PUT")
|
if (request.getMethod() == "PUT")
|
||||||
{
|
{
|
||||||
Swagger::SWGDeviceListItem normalResponse;
|
SWGSDRangel::SWGDeviceListItem normalResponse;
|
||||||
QString jsonStr = request.getBody();
|
QString jsonStr = request.getBody();
|
||||||
|
|
||||||
if (parseJsonBody(jsonStr, response))
|
if (parseJsonBody(jsonStr, response))
|
||||||
@ -617,7 +617,7 @@ void WebAPIRequestMapper::devicesetDevice(const std::string& indexStr, qtwebapp:
|
|||||||
|
|
||||||
bool WebAPIRequestMapper::parseJsonBody(QString& jsonStr, qtwebapp::HttpResponse& response)
|
bool WebAPIRequestMapper::parseJsonBody(QString& jsonStr, qtwebapp::HttpResponse& response)
|
||||||
{
|
{
|
||||||
Swagger::SWGErrorResponse errorResponse;
|
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -648,9 +648,9 @@ bool WebAPIRequestMapper::parseJsonBody(QString& jsonStr, qtwebapp::HttpResponse
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebAPIRequestMapper::validatePresetTransfer(Swagger::SWGPresetTransfer& presetTransfer)
|
bool WebAPIRequestMapper::validatePresetTransfer(SWGSDRangel::SWGPresetTransfer& presetTransfer)
|
||||||
{
|
{
|
||||||
Swagger::SWGPresetIdentifier *presetIdentifier = presetTransfer.getPreset();
|
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = presetTransfer.getPreset();
|
||||||
|
|
||||||
if (presetIdentifier == 0) {
|
if (presetIdentifier == 0) {
|
||||||
return false;
|
return false;
|
||||||
@ -659,7 +659,7 @@ bool WebAPIRequestMapper::validatePresetTransfer(Swagger::SWGPresetTransfer& pre
|
|||||||
return validatePresetIdentifer(*presetIdentifier);
|
return validatePresetIdentifer(*presetIdentifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebAPIRequestMapper::validatePresetIdentifer(Swagger::SWGPresetIdentifier& presetIdentifier)
|
bool WebAPIRequestMapper::validatePresetIdentifer(SWGSDRangel::SWGPresetIdentifier& presetIdentifier)
|
||||||
{
|
{
|
||||||
return (presetIdentifier.getGroupName() && presetIdentifier.getName() && presetIdentifier.getType());
|
return (presetIdentifier.getGroupName() && presetIdentifier.getName() && presetIdentifier.getType());
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "staticfilecontroller.h"
|
#include "staticfilecontroller.h"
|
||||||
#include "webapiadapterinterface.h"
|
#include "webapiadapterinterface.h"
|
||||||
|
|
||||||
namespace Swagger
|
namespace SWGSDRangel
|
||||||
{
|
{
|
||||||
class SWGPresetTransfer;
|
class SWGPresetTransfer;
|
||||||
class SWGPresetIdentifier;
|
class SWGPresetIdentifier;
|
||||||
@ -58,8 +58,8 @@ private:
|
|||||||
void deviceset(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
void deviceset(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||||
void devicesetDevice(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
void devicesetDevice(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||||
|
|
||||||
bool validatePresetTransfer(Swagger::SWGPresetTransfer& presetTransfer);
|
bool validatePresetTransfer(SWGSDRangel::SWGPresetTransfer& presetTransfer);
|
||||||
bool validatePresetIdentifer(Swagger::SWGPresetIdentifier& presetIdentifier);
|
bool validatePresetIdentifer(SWGSDRangel::SWGPresetIdentifier& presetIdentifier);
|
||||||
|
|
||||||
bool parseJsonBody(QString& jsonStr, qtwebapp::HttpResponse& response);
|
bool parseJsonBody(QString& jsonStr, qtwebapp::HttpResponse& response);
|
||||||
};
|
};
|
||||||
|
@ -64,13 +64,13 @@ WebAPIAdapterGUI::~WebAPIAdapterGUI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceSummary(
|
int WebAPIAdapterGUI::instanceSummary(
|
||||||
Swagger::SWGInstanceSummaryResponse& response,
|
SWGSDRangel::SWGInstanceSummaryResponse& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
|
|
||||||
*response.getVersion() = qApp->applicationVersion();
|
*response.getVersion() = qApp->applicationVersion();
|
||||||
|
|
||||||
Swagger::SWGLoggingInfo *logging = response.getLogging();
|
SWGSDRangel::SWGLoggingInfo *logging = response.getLogging();
|
||||||
logging->init();
|
logging->init();
|
||||||
logging->setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0);
|
logging->setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0);
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ int WebAPIAdapterGUI::instanceSummary(
|
|||||||
|
|
||||||
m_mainWindow.m_logger->getConsoleMinMessageLevelStr(*logging->getConsoleLevel());
|
m_mainWindow.m_logger->getConsoleMinMessageLevelStr(*logging->getConsoleLevel());
|
||||||
|
|
||||||
Swagger::SWGDeviceSetList *deviceSetList = response.getDevicesetlist();
|
SWGSDRangel::SWGDeviceSetList *deviceSetList = response.getDevicesetlist();
|
||||||
getDeviceSetList(deviceSetList);
|
getDeviceSetList(deviceSetList);
|
||||||
|
|
||||||
return 200;
|
return 200;
|
||||||
@ -89,17 +89,17 @@ int WebAPIAdapterGUI::instanceSummary(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::instanceDevices(
|
int WebAPIAdapterGUI::instanceDevices(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGInstanceDevicesResponse& response,
|
SWGSDRangel::SWGInstanceDevicesResponse& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int nbSamplingDevices = tx ? DeviceEnumerator::instance()->getNbTxSamplingDevices() : DeviceEnumerator::instance()->getNbRxSamplingDevices();
|
int nbSamplingDevices = tx ? DeviceEnumerator::instance()->getNbTxSamplingDevices() : DeviceEnumerator::instance()->getNbRxSamplingDevices();
|
||||||
response.setDevicecount(nbSamplingDevices);
|
response.setDevicecount(nbSamplingDevices);
|
||||||
QList<Swagger::SWGDeviceListItem*> *devices = response.getDevices();
|
QList<SWGSDRangel::SWGDeviceListItem*> *devices = response.getDevices();
|
||||||
|
|
||||||
for (int i = 0; i < nbSamplingDevices; i++)
|
for (int i = 0; i < nbSamplingDevices; i++)
|
||||||
{
|
{
|
||||||
PluginInterface::SamplingDevice samplingDevice = tx ? DeviceEnumerator::instance()->getTxSamplingDevice(i) : DeviceEnumerator::instance()->getRxSamplingDevice(i);
|
PluginInterface::SamplingDevice samplingDevice = tx ? DeviceEnumerator::instance()->getTxSamplingDevice(i) : DeviceEnumerator::instance()->getRxSamplingDevice(i);
|
||||||
devices->append(new Swagger::SWGDeviceListItem);
|
devices->append(new SWGSDRangel::SWGDeviceListItem);
|
||||||
*devices->back()->getDisplayedName() = samplingDevice.displayedName;
|
*devices->back()->getDisplayedName() = samplingDevice.displayedName;
|
||||||
*devices->back()->getHwType() = samplingDevice.hardwareId;
|
*devices->back()->getHwType() = samplingDevice.hardwareId;
|
||||||
*devices->back()->getSerial() = samplingDevice.serial;
|
*devices->back()->getSerial() = samplingDevice.serial;
|
||||||
@ -115,17 +115,17 @@ int WebAPIAdapterGUI::instanceDevices(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::instanceChannels(
|
int WebAPIAdapterGUI::instanceChannels(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGInstanceChannelsResponse& response,
|
SWGSDRangel::SWGInstanceChannelsResponse& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
PluginAPI::ChannelRegistrations *channelRegistrations = tx ? m_mainWindow.m_pluginManager->getTxChannelRegistrations() : m_mainWindow.m_pluginManager->getRxChannelRegistrations();
|
PluginAPI::ChannelRegistrations *channelRegistrations = tx ? m_mainWindow.m_pluginManager->getTxChannelRegistrations() : m_mainWindow.m_pluginManager->getRxChannelRegistrations();
|
||||||
int nbChannelDevices = channelRegistrations->size();
|
int nbChannelDevices = channelRegistrations->size();
|
||||||
response.setChannelcount(nbChannelDevices);
|
response.setChannelcount(nbChannelDevices);
|
||||||
QList<Swagger::SWGChannelListItem*> *channels = response.getChannels();
|
QList<SWGSDRangel::SWGChannelListItem*> *channels = response.getChannels();
|
||||||
|
|
||||||
for (int i = 0; i < nbChannelDevices; i++)
|
for (int i = 0; i < nbChannelDevices; i++)
|
||||||
{
|
{
|
||||||
channels->append(new Swagger::SWGChannelListItem);
|
channels->append(new SWGSDRangel::SWGChannelListItem);
|
||||||
PluginInterface *channelInterface = channelRegistrations->at(i).m_plugin;
|
PluginInterface *channelInterface = channelRegistrations->at(i).m_plugin;
|
||||||
const PluginDescriptor& pluginDescriptor = channelInterface->getPluginDescriptor();
|
const PluginDescriptor& pluginDescriptor = channelInterface->getPluginDescriptor();
|
||||||
*channels->back()->getVersion() = pluginDescriptor.version;
|
*channels->back()->getVersion() = pluginDescriptor.version;
|
||||||
@ -140,8 +140,8 @@ int WebAPIAdapterGUI::instanceChannels(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceLoggingGet(
|
int WebAPIAdapterGUI::instanceLoggingGet(
|
||||||
Swagger::SWGLoggingInfo& response,
|
SWGSDRangel::SWGLoggingInfo& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
response.setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0);
|
response.setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0);
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ int WebAPIAdapterGUI::instanceLoggingGet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceLoggingPut(
|
int WebAPIAdapterGUI::instanceLoggingPut(
|
||||||
Swagger::SWGLoggingInfo& response,
|
SWGSDRangel::SWGLoggingInfo& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
// response input is the query actually
|
// response input is the query actually
|
||||||
bool dumpToFile = (response.getDumpToFile() != 0);
|
bool dumpToFile = (response.getDumpToFile() != 0);
|
||||||
@ -193,8 +193,8 @@ int WebAPIAdapterGUI::instanceLoggingPut(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceAudioGet(
|
int WebAPIAdapterGUI::instanceAudioGet(
|
||||||
Swagger::SWGAudioDevices& response,
|
SWGSDRangel::SWGAudioDevices& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
const QList<QAudioDeviceInfo>& audioInputDevices = m_mainWindow.m_audioDeviceInfo.getInputDevices();
|
const QList<QAudioDeviceInfo>& audioInputDevices = m_mainWindow.m_audioDeviceInfo.getInputDevices();
|
||||||
const QList<QAudioDeviceInfo>& audioOutputDevices = m_mainWindow.m_audioDeviceInfo.getOutputDevices();
|
const QList<QAudioDeviceInfo>& audioOutputDevices = m_mainWindow.m_audioDeviceInfo.getOutputDevices();
|
||||||
@ -207,18 +207,18 @@ int WebAPIAdapterGUI::instanceAudioGet(
|
|||||||
response.setNbOutputDevices(nbOutputDevices);
|
response.setNbOutputDevices(nbOutputDevices);
|
||||||
response.setOutputDeviceSelectedIndex(m_mainWindow.m_audioDeviceInfo.getOutputDeviceIndex());
|
response.setOutputDeviceSelectedIndex(m_mainWindow.m_audioDeviceInfo.getOutputDeviceIndex());
|
||||||
response.setInputVolume(m_mainWindow.m_audioDeviceInfo.getInputVolume());
|
response.setInputVolume(m_mainWindow.m_audioDeviceInfo.getInputVolume());
|
||||||
QList<Swagger::SWGAudioDevice*> *inputDevices = response.getInputDevices();
|
QList<SWGSDRangel::SWGAudioDevice*> *inputDevices = response.getInputDevices();
|
||||||
QList<Swagger::SWGAudioDevice*> *outputDevices = response.getOutputDevices();
|
QList<SWGSDRangel::SWGAudioDevice*> *outputDevices = response.getOutputDevices();
|
||||||
|
|
||||||
for (int i = 0; i < nbInputDevices; i++)
|
for (int i = 0; i < nbInputDevices; i++)
|
||||||
{
|
{
|
||||||
inputDevices->append(new Swagger::SWGAudioDevice);
|
inputDevices->append(new SWGSDRangel::SWGAudioDevice);
|
||||||
*inputDevices->back()->getName() = audioInputDevices.at(i).deviceName();
|
*inputDevices->back()->getName() = audioInputDevices.at(i).deviceName();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < nbOutputDevices; i++)
|
for (int i = 0; i < nbOutputDevices; i++)
|
||||||
{
|
{
|
||||||
outputDevices->append(new Swagger::SWGAudioDevice);
|
outputDevices->append(new SWGSDRangel::SWGAudioDevice);
|
||||||
*outputDevices->back()->getName() = audioOutputDevices.at(i).deviceName();
|
*outputDevices->back()->getName() = audioOutputDevices.at(i).deviceName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +226,8 @@ int WebAPIAdapterGUI::instanceAudioGet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceAudioPatch(
|
int WebAPIAdapterGUI::instanceAudioPatch(
|
||||||
Swagger::SWGAudioDevicesSelect& response,
|
SWGSDRangel::SWGAudioDevicesSelect& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
// response input is the query actually
|
// response input is the query actually
|
||||||
float inputVolume = response.getInputVolume();
|
float inputVolume = response.getInputVolume();
|
||||||
@ -259,8 +259,8 @@ int WebAPIAdapterGUI::instanceAudioPatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceLocationGet(
|
int WebAPIAdapterGUI::instanceLocationGet(
|
||||||
Swagger::SWGLocationInformation& response,
|
SWGSDRangel::SWGLocationInformation& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
response.setLatitude(m_mainWindow.m_settings.getLatitude());
|
response.setLatitude(m_mainWindow.m_settings.getLatitude());
|
||||||
response.setLongitude(m_mainWindow.m_settings.getLongitude());
|
response.setLongitude(m_mainWindow.m_settings.getLongitude());
|
||||||
@ -269,8 +269,8 @@ int WebAPIAdapterGUI::instanceLocationGet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceLocationPut(
|
int WebAPIAdapterGUI::instanceLocationPut(
|
||||||
Swagger::SWGLocationInformation& response,
|
SWGSDRangel::SWGLocationInformation& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
float latitude = response.getLatitude();
|
float latitude = response.getLatitude();
|
||||||
float longitude = response.getLongitude();
|
float longitude = response.getLongitude();
|
||||||
@ -289,8 +289,8 @@ int WebAPIAdapterGUI::instanceLocationPut(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::instanceDVSerialPatch(
|
int WebAPIAdapterGUI::instanceDVSerialPatch(
|
||||||
bool dvserial,
|
bool dvserial,
|
||||||
Swagger::SWGDVSeralDevices& response,
|
SWGSDRangel::SWGDVSeralDevices& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
m_mainWindow.m_dspEngine->setDVSerialSupport(dvserial);
|
m_mainWindow.m_dspEngine->setDVSerialSupport(dvserial);
|
||||||
m_mainWindow.ui->action_DV_Serial->setChecked(dvserial);
|
m_mainWindow.ui->action_DV_Serial->setChecked(dvserial);
|
||||||
@ -301,14 +301,14 @@ int WebAPIAdapterGUI::instanceDVSerialPatch(
|
|||||||
std::vector<std::string> deviceNames;
|
std::vector<std::string> deviceNames;
|
||||||
m_mainWindow.m_dspEngine->getDVSerialNames(deviceNames);
|
m_mainWindow.m_dspEngine->getDVSerialNames(deviceNames);
|
||||||
response.setNbDevices((int) deviceNames.size());
|
response.setNbDevices((int) deviceNames.size());
|
||||||
QList<Swagger::SWGDVSerialDevice*> *deviceNamesList = response.getDvSerialDevices();
|
QList<SWGSDRangel::SWGDVSerialDevice*> *deviceNamesList = response.getDvSerialDevices();
|
||||||
|
|
||||||
std::vector<std::string>::iterator it = deviceNames.begin();
|
std::vector<std::string>::iterator it = deviceNames.begin();
|
||||||
std::string deviceNamesStr = "DV Serial devices found: ";
|
std::string deviceNamesStr = "DV Serial devices found: ";
|
||||||
|
|
||||||
while (it != deviceNames.end())
|
while (it != deviceNames.end())
|
||||||
{
|
{
|
||||||
deviceNamesList->append(new Swagger::SWGDVSerialDevice);
|
deviceNamesList->append(new SWGSDRangel::SWGDVSerialDevice);
|
||||||
*deviceNamesList->back()->getDeviceName() = QString::fromStdString(*it);
|
*deviceNamesList->back()->getDeviceName() = QString::fromStdString(*it);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
@ -322,16 +322,16 @@ int WebAPIAdapterGUI::instanceDVSerialPatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instancePresetGet(
|
int WebAPIAdapterGUI::instancePresetGet(
|
||||||
Swagger::SWGPresets& response,
|
SWGSDRangel::SWGPresets& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int nbPresets = m_mainWindow.m_settings.getPresetCount();
|
int nbPresets = m_mainWindow.m_settings.getPresetCount();
|
||||||
int nbGroups = 0;
|
int nbGroups = 0;
|
||||||
int nbPresetsThisGroup = 0;
|
int nbPresetsThisGroup = 0;
|
||||||
QString groupName;
|
QString groupName;
|
||||||
response.init();
|
response.init();
|
||||||
QList<Swagger::SWGPresetGroup*> *groups = response.getGroups();
|
QList<SWGSDRangel::SWGPresetGroup*> *groups = response.getGroups();
|
||||||
QList<Swagger::SWGPresetItem*> *swgPresets = 0;
|
QList<SWGSDRangel::SWGPresetItem*> *swgPresets = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// Presets are sorted by group first
|
// Presets are sorted by group first
|
||||||
@ -343,7 +343,7 @@ int WebAPIAdapterGUI::instancePresetGet(
|
|||||||
if ((i == 0) || (groupName != preset->getGroup())) // new group
|
if ((i == 0) || (groupName != preset->getGroup())) // new group
|
||||||
{
|
{
|
||||||
if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
|
if (i > 0) { groups->back()->setNbPresets(nbPresetsThisGroup); }
|
||||||
groups->append(new Swagger::SWGPresetGroup);
|
groups->append(new SWGSDRangel::SWGPresetGroup);
|
||||||
groups->back()->init();
|
groups->back()->init();
|
||||||
groupName = preset->getGroup();
|
groupName = preset->getGroup();
|
||||||
*groups->back()->getGroupName() = groupName;
|
*groups->back()->getGroupName() = groupName;
|
||||||
@ -352,7 +352,7 @@ int WebAPIAdapterGUI::instancePresetGet(
|
|||||||
nbPresetsThisGroup = 0;
|
nbPresetsThisGroup = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
swgPresets->append(new Swagger::SWGPresetItem);
|
swgPresets->append(new SWGSDRangel::SWGPresetItem);
|
||||||
swgPresets->back()->setCenterFrequency(preset->getCenterFrequency());
|
swgPresets->back()->setCenterFrequency(preset->getCenterFrequency());
|
||||||
*swgPresets->back()->getType() = preset->isSourcePreset() ? "R" : "T";
|
*swgPresets->back()->getType() = preset->isSourcePreset() ? "R" : "T";
|
||||||
*swgPresets->back()->getName() = preset->getDescription();
|
*swgPresets->back()->getName() = preset->getDescription();
|
||||||
@ -366,12 +366,12 @@ int WebAPIAdapterGUI::instancePresetGet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instancePresetPatch(
|
int WebAPIAdapterGUI::instancePresetPatch(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
int deviceSetIndex = query.getDeviceSetIndex();
|
int deviceSetIndex = query.getDeviceSetIndex();
|
||||||
Swagger::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
||||||
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
||||||
|
|
||||||
if (deviceSetIndex > nbDeviceSets)
|
if (deviceSetIndex > nbDeviceSets)
|
||||||
@ -420,12 +420,12 @@ int WebAPIAdapterGUI::instancePresetPatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instancePresetPut(
|
int WebAPIAdapterGUI::instancePresetPut(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
int deviceSetIndex = query.getDeviceSetIndex();
|
int deviceSetIndex = query.getDeviceSetIndex();
|
||||||
Swagger::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
||||||
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
||||||
|
|
||||||
if (deviceSetIndex > nbDeviceSets)
|
if (deviceSetIndex > nbDeviceSets)
|
||||||
@ -476,12 +476,12 @@ int WebAPIAdapterGUI::instancePresetPut(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instancePresetPost(
|
int WebAPIAdapterGUI::instancePresetPost(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
int deviceSetIndex = query.getDeviceSetIndex();
|
int deviceSetIndex = query.getDeviceSetIndex();
|
||||||
Swagger::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
||||||
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
||||||
|
|
||||||
if (deviceSetIndex > nbDeviceSets)
|
if (deviceSetIndex > nbDeviceSets)
|
||||||
@ -520,8 +520,8 @@ int WebAPIAdapterGUI::instancePresetPost(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instancePresetDelete(
|
int WebAPIAdapterGUI::instancePresetDelete(
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
const Preset *selectedPreset = m_mainWindow.m_settings.getPreset(*response.getGroupName(),
|
const Preset *selectedPreset = m_mainWindow.m_settings.getPreset(*response.getGroupName(),
|
||||||
response.getCenterFrequency(),
|
response.getCenterFrequency(),
|
||||||
@ -548,8 +548,8 @@ int WebAPIAdapterGUI::instancePresetDelete(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceDeviceSetsGet(
|
int WebAPIAdapterGUI::instanceDeviceSetsGet(
|
||||||
Swagger::SWGDeviceSetList& response,
|
SWGSDRangel::SWGDeviceSetList& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
getDeviceSetList(&response);
|
getDeviceSetList(&response);
|
||||||
return 200;
|
return 200;
|
||||||
@ -557,8 +557,8 @@ int WebAPIAdapterGUI::instanceDeviceSetsGet(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::instanceDeviceSetsPost(
|
int WebAPIAdapterGUI::instanceDeviceSetsPost(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGDeviceSet& response,
|
SWGSDRangel::SWGDeviceSet& response,
|
||||||
Swagger::SWGErrorResponse& error __attribute__((unused)))
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||||
{
|
{
|
||||||
MainWindow::MsgAddDeviceSet *msg = MainWindow::MsgAddDeviceSet::create(tx);
|
MainWindow::MsgAddDeviceSet *msg = MainWindow::MsgAddDeviceSet::create(tx);
|
||||||
m_mainWindow.m_inputMessageQueue.push(msg);
|
m_mainWindow.m_inputMessageQueue.push(msg);
|
||||||
@ -572,8 +572,8 @@ int WebAPIAdapterGUI::instanceDeviceSetsPost(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WebAPIAdapterGUI::instanceDeviceSetsDelete(
|
int WebAPIAdapterGUI::instanceDeviceSetsDelete(
|
||||||
Swagger::SWGDeviceSetList& response,
|
SWGSDRangel::SWGDeviceSetList& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
if (m_mainWindow.m_deviceUIs.size() > 1)
|
if (m_mainWindow.m_deviceUIs.size() > 1)
|
||||||
{
|
{
|
||||||
@ -597,8 +597,8 @@ int WebAPIAdapterGUI::instanceDeviceSetsDelete(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::devicesetGet(
|
int WebAPIAdapterGUI::devicesetGet(
|
||||||
int deviceSetIndex,
|
int deviceSetIndex,
|
||||||
Swagger::SWGDeviceSet& response,
|
SWGSDRangel::SWGDeviceSet& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size()))
|
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size()))
|
||||||
{
|
{
|
||||||
@ -618,8 +618,8 @@ int WebAPIAdapterGUI::devicesetGet(
|
|||||||
|
|
||||||
int WebAPIAdapterGUI::devicesetDevicePut(
|
int WebAPIAdapterGUI::devicesetDevicePut(
|
||||||
int deviceSetIndex,
|
int deviceSetIndex,
|
||||||
Swagger::SWGDeviceListItem& response,
|
SWGSDRangel::SWGDeviceListItem& response,
|
||||||
Swagger::SWGErrorResponse& error)
|
SWGSDRangel::SWGErrorResponse& error)
|
||||||
{
|
{
|
||||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size()))
|
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size()))
|
||||||
{
|
{
|
||||||
@ -693,7 +693,7 @@ int WebAPIAdapterGUI::devicesetDevicePut(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebAPIAdapterGUI::getDeviceSetList(Swagger::SWGDeviceSetList* deviceSetList)
|
void WebAPIAdapterGUI::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList)
|
||||||
{
|
{
|
||||||
deviceSetList->init();
|
deviceSetList->init();
|
||||||
deviceSetList->setDevicesetcount((int) m_mainWindow.m_deviceUIs.size());
|
deviceSetList->setDevicesetcount((int) m_mainWindow.m_deviceUIs.size());
|
||||||
@ -702,16 +702,16 @@ void WebAPIAdapterGUI::getDeviceSetList(Swagger::SWGDeviceSetList* deviceSetList
|
|||||||
|
|
||||||
for (int i = 0; it != m_mainWindow.m_deviceUIs.end(); ++it, i++)
|
for (int i = 0; it != m_mainWindow.m_deviceUIs.end(); ++it, i++)
|
||||||
{
|
{
|
||||||
QList<Swagger::SWGDeviceSet*> *deviceSets = deviceSetList->getDeviceSets();
|
QList<SWGSDRangel::SWGDeviceSet*> *deviceSets = deviceSetList->getDeviceSets();
|
||||||
deviceSets->append(new Swagger::SWGDeviceSet());
|
deviceSets->append(new SWGSDRangel::SWGDeviceSet());
|
||||||
|
|
||||||
getDeviceSet(deviceSets->back(), *it, i);
|
getDeviceSet(deviceSets->back(), *it, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebAPIAdapterGUI::getDeviceSet(Swagger::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex)
|
void WebAPIAdapterGUI::getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex)
|
||||||
{
|
{
|
||||||
Swagger::SWGSamplingDevice *samplingDevice = deviceSet->getSamplingDevice();
|
SWGSDRangel::SWGSamplingDevice *samplingDevice = deviceSet->getSamplingDevice();
|
||||||
samplingDevice->init();
|
samplingDevice->init();
|
||||||
samplingDevice->setIndex(deviceUISetIndex);
|
samplingDevice->setIndex(deviceUISetIndex);
|
||||||
samplingDevice->setTx(deviceUISet->m_deviceSinkEngine != 0);
|
samplingDevice->setTx(deviceUISet->m_deviceSinkEngine != 0);
|
||||||
@ -732,11 +732,11 @@ void WebAPIAdapterGUI::getDeviceSet(Swagger::SWGDeviceSet *deviceSet, const Devi
|
|||||||
}
|
}
|
||||||
|
|
||||||
deviceSet->setChannelcount(deviceUISet->m_deviceSinkAPI->getNbChannels());
|
deviceSet->setChannelcount(deviceUISet->m_deviceSinkAPI->getNbChannels());
|
||||||
QList<Swagger::SWGChannel*> *channels = deviceSet->getChannels();
|
QList<SWGSDRangel::SWGChannel*> *channels = deviceSet->getChannels();
|
||||||
|
|
||||||
for (int i = 0; i < deviceSet->getChannelcount(); i++)
|
for (int i = 0; i < deviceSet->getChannelcount(); i++)
|
||||||
{
|
{
|
||||||
channels->append(new Swagger::SWGChannel);
|
channels->append(new SWGSDRangel::SWGChannel);
|
||||||
ChannelSourceAPI *channel = deviceUISet->m_deviceSinkAPI->getChanelAPIAt(i);
|
ChannelSourceAPI *channel = deviceUISet->m_deviceSinkAPI->getChanelAPIAt(i);
|
||||||
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
|
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
|
||||||
channels->back()->setIndex(channel->getIndexInDeviceSet());
|
channels->back()->setIndex(channel->getIndexInDeviceSet());
|
||||||
@ -762,11 +762,11 @@ void WebAPIAdapterGUI::getDeviceSet(Swagger::SWGDeviceSet *deviceSet, const Devi
|
|||||||
}
|
}
|
||||||
|
|
||||||
deviceSet->setChannelcount(deviceUISet->m_deviceSourceAPI->getNbChannels());
|
deviceSet->setChannelcount(deviceUISet->m_deviceSourceAPI->getNbChannels());
|
||||||
QList<Swagger::SWGChannel*> *channels = deviceSet->getChannels();
|
QList<SWGSDRangel::SWGChannel*> *channels = deviceSet->getChannels();
|
||||||
|
|
||||||
for (int i = 0; i < deviceSet->getChannelcount(); i++)
|
for (int i = 0; i < deviceSet->getChannelcount(); i++)
|
||||||
{
|
{
|
||||||
channels->append(new Swagger::SWGChannel);
|
channels->append(new SWGSDRangel::SWGChannel);
|
||||||
ChannelSinkAPI *channel = deviceUISet->m_deviceSourceAPI->getChanelAPIAt(i);
|
ChannelSinkAPI *channel = deviceUISet->m_deviceSourceAPI->getChanelAPIAt(i);
|
||||||
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
|
channels->back()->setDeltaFrequency(channel->getDeltaFrequency());
|
||||||
channels->back()->setIndex(channel->getIndexInDeviceSet());
|
channels->back()->setIndex(channel->getIndexInDeviceSet());
|
||||||
|
@ -32,99 +32,99 @@ public:
|
|||||||
virtual ~WebAPIAdapterGUI();
|
virtual ~WebAPIAdapterGUI();
|
||||||
|
|
||||||
virtual int instanceSummary(
|
virtual int instanceSummary(
|
||||||
Swagger::SWGInstanceSummaryResponse& response,
|
SWGSDRangel::SWGInstanceSummaryResponse& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceDevices(
|
virtual int instanceDevices(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGInstanceDevicesResponse& response,
|
SWGSDRangel::SWGInstanceDevicesResponse& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceChannels(
|
virtual int instanceChannels(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGInstanceChannelsResponse& response,
|
SWGSDRangel::SWGInstanceChannelsResponse& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceLoggingGet(
|
virtual int instanceLoggingGet(
|
||||||
Swagger::SWGLoggingInfo& response,
|
SWGSDRangel::SWGLoggingInfo& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceLoggingPut(
|
virtual int instanceLoggingPut(
|
||||||
Swagger::SWGLoggingInfo& response,
|
SWGSDRangel::SWGLoggingInfo& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceAudioGet(
|
virtual int instanceAudioGet(
|
||||||
Swagger::SWGAudioDevices& response,
|
SWGSDRangel::SWGAudioDevices& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceAudioPatch(
|
virtual int instanceAudioPatch(
|
||||||
Swagger::SWGAudioDevicesSelect& response,
|
SWGSDRangel::SWGAudioDevicesSelect& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceLocationGet(
|
virtual int instanceLocationGet(
|
||||||
Swagger::SWGLocationInformation& response,
|
SWGSDRangel::SWGLocationInformation& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceLocationPut(
|
virtual int instanceLocationPut(
|
||||||
Swagger::SWGLocationInformation& response,
|
SWGSDRangel::SWGLocationInformation& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceDVSerialPatch(
|
virtual int instanceDVSerialPatch(
|
||||||
bool dvserial,
|
bool dvserial,
|
||||||
Swagger::SWGDVSeralDevices& response,
|
SWGSDRangel::SWGDVSeralDevices& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instancePresetGet(
|
virtual int instancePresetGet(
|
||||||
Swagger::SWGPresets& response,
|
SWGSDRangel::SWGPresets& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instancePresetPatch(
|
virtual int instancePresetPatch(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instancePresetPut(
|
virtual int instancePresetPut(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instancePresetPost(
|
virtual int instancePresetPost(
|
||||||
Swagger::SWGPresetTransfer& query,
|
SWGSDRangel::SWGPresetTransfer& query,
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instancePresetDelete(
|
virtual int instancePresetDelete(
|
||||||
Swagger::SWGPresetIdentifier& response,
|
SWGSDRangel::SWGPresetIdentifier& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceDeviceSetsGet(
|
virtual int instanceDeviceSetsGet(
|
||||||
Swagger::SWGDeviceSetList& response,
|
SWGSDRangel::SWGDeviceSetList& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceDeviceSetsPost(
|
virtual int instanceDeviceSetsPost(
|
||||||
bool tx,
|
bool tx,
|
||||||
Swagger::SWGDeviceSet& response,
|
SWGSDRangel::SWGDeviceSet& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int instanceDeviceSetsDelete(
|
virtual int instanceDeviceSetsDelete(
|
||||||
Swagger::SWGDeviceSetList& response,
|
SWGSDRangel::SWGDeviceSetList& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int devicesetGet(
|
virtual int devicesetGet(
|
||||||
int deviceSetIndex,
|
int deviceSetIndex,
|
||||||
Swagger::SWGDeviceSet& response,
|
SWGSDRangel::SWGDeviceSet& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
virtual int devicesetDevicePut(
|
virtual int devicesetDevicePut(
|
||||||
int deviceSetIndex,
|
int deviceSetIndex,
|
||||||
Swagger::SWGDeviceListItem& response,
|
SWGSDRangel::SWGDeviceListItem& response,
|
||||||
Swagger::SWGErrorResponse& error);
|
SWGSDRangel::SWGErrorResponse& error);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MainWindow& m_mainWindow;
|
MainWindow& m_mainWindow;
|
||||||
|
|
||||||
void getDeviceSetList(Swagger::SWGDeviceSetList* deviceSetList);
|
void getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList);
|
||||||
void getDeviceSet(Swagger::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex);
|
void getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex);
|
||||||
static QtMsgType getMsgTypeFromString(const QString& msgTypeString);
|
static QtMsgType getMsgTypeFromString(const QString& msgTypeString);
|
||||||
static void getMsgTypeString(const QtMsgType& msgType, QString& level);
|
static void getMsgTypeString(const QtMsgType& msgType, QString& level);
|
||||||
};
|
};
|
||||||
|
@ -87,7 +87,7 @@ Do not forget to start the http server for includes as described before for the
|
|||||||
Eventually to generate the code for Qt5 in the code/qt5 directory do:
|
Eventually to generate the code for Qt5 in the code/qt5 directory do:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
/opt/install/swagger/swagger-codegen generate -i api/swagger/swagger.yaml -l qt5cpp -o code/qt5
|
/opt/install/swagger/swagger-codegen generate -i api/swagger/swagger.yaml -l qt5cpp -c qt5cpp-config.json -o code/qt5
|
||||||
```
|
```
|
||||||
|
|
||||||
The language option `-l` allows to generate code or documentation in a lot of languages (invoke the command without any parameter to get a list). The most commonly used are:
|
The language option `-l` allows to generate code or documentation in a lot of languages (invoke the command without any parameter to get a list). The most commonly used are:
|
||||||
@ -95,6 +95,18 @@ The language option `-l` allows to generate code or documentation in a lot of la
|
|||||||
- html2: documentation as a single HTML file pretty printed. Used to document the API in code/html2
|
- html2: documentation as a single HTML file pretty printed. Used to document the API in code/html2
|
||||||
- python: Python client
|
- python: Python client
|
||||||
- angular2: Typescript for Angular2 client
|
- angular2: Typescript for Angular2 client
|
||||||
|
|
||||||
|
The configuration option `-c` lets you specify a configuration file which is in JSON format and for which the key, value pairs are documented in the config-help of the specified codegen language. For example the following command will return the possible key values for Qt5 C++ generator:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
/opt/install/swagger/swagger-codegen config-help -l qt5cpp
|
||||||
|
```
|
||||||
|
|
||||||
|
The following configuration files have been defined for generation in the SDRangel context:
|
||||||
|
|
||||||
|
- `qt5cpp-config.json` for Qt5/C++
|
||||||
|
- `html2-config.json` for HTML2
|
||||||
|
- `python-config.json` for Python
|
||||||
|
|
||||||
<h3>Links</h3>
|
<h3>Links</h3>
|
||||||
|
|
||||||
|
@ -5,16 +5,15 @@ info:
|
|||||||
title: SDRangel
|
title: SDRangel
|
||||||
contact:
|
contact:
|
||||||
url: "https://github.com/f4exb/sdrangel"
|
url: "https://github.com/f4exb/sdrangel"
|
||||||
email: "f4exb06@gmail.com"
|
email: "f4exb06@gmail.com"
|
||||||
# during dev, should point to your local machine
|
# during dev, should point to your local machine
|
||||||
host: localhost:10010
|
host: localhost:8091
|
||||||
# basePath prefixes all resource paths
|
# basePath prefixes all resource paths
|
||||||
basePath: /
|
basePath: /
|
||||||
#
|
#
|
||||||
schemes:
|
schemes:
|
||||||
# tip: remove http to make production-grade
|
# tip: remove http to make production-grade
|
||||||
- http
|
- http
|
||||||
- https
|
|
||||||
# format of bodies a client can send (Content-Type)
|
# format of bodies a client can send (Content-Type)
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@ -29,6 +28,8 @@ paths:
|
|||||||
description: SDRangel instance summary
|
description: SDRangel instance summary
|
||||||
# used as the method name of the controller
|
# used as the method name of the controller
|
||||||
operationId: instanceSummary
|
operationId: instanceSummary
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Success
|
description: Success
|
||||||
@ -47,6 +48,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get a list of sampling devices that can be used to take part in a device set
|
description: Get a list of sampling devices that can be used to take part in a device set
|
||||||
operationId: instanceDevices
|
operationId: instanceDevices
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
parameters:
|
parameters:
|
||||||
- name: tx
|
- name: tx
|
||||||
in: query
|
in: query
|
||||||
@ -69,6 +72,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get a list of channel plugins available in this instance
|
description: Get a list of channel plugins available in this instance
|
||||||
operationId: instanceChannels
|
operationId: instanceChannels
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
parameters:
|
parameters:
|
||||||
- name: tx
|
- name: tx
|
||||||
in: query
|
in: query
|
||||||
@ -91,6 +96,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get logging information for this instance
|
description: Get logging information for this instance
|
||||||
operationId: instanceLoggingGet
|
operationId: instanceLoggingGet
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Success
|
description: Success
|
||||||
@ -105,6 +112,8 @@ paths:
|
|||||||
put:
|
put:
|
||||||
description: Change logging parmeters for this instance
|
description: Change logging parmeters for this instance
|
||||||
operationId: instanceLoggingPut
|
operationId: instanceLoggingPut
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -120,7 +129,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/LoggingInfo"
|
$ref: "#/definitions/LoggingInfo"
|
||||||
"400":
|
"400":
|
||||||
description: Invallid data
|
description: Invalid data
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ErrorResponse"
|
$ref: "#/definitions/ErrorResponse"
|
||||||
"500":
|
"500":
|
||||||
@ -134,6 +143,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get audio devices list available to this instance
|
description: Get audio devices list available to this instance
|
||||||
operationId: instanceAudioGet
|
operationId: instanceAudioGet
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Success
|
description: Success
|
||||||
@ -148,6 +159,8 @@ paths:
|
|||||||
patch:
|
patch:
|
||||||
description: Set audio devices
|
description: Set audio devices
|
||||||
operationId: instanceAudioPatch
|
operationId: instanceAudioPatch
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -173,6 +186,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get instance geolocation information
|
description: Get instance geolocation information
|
||||||
operationId: instanceLocationGet
|
operationId: instanceLocationGet
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: On success return location
|
description: On success return location
|
||||||
@ -187,6 +202,8 @@ paths:
|
|||||||
put:
|
put:
|
||||||
description: Set instance geolocation information
|
description: Set instance geolocation information
|
||||||
operationId: instanceLocationPut
|
operationId: instanceLocationPut
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -214,6 +231,8 @@ paths:
|
|||||||
patch:
|
patch:
|
||||||
description: Set or reset DV serial processing for AMBE frames decoding in digital voice modes
|
description: Set or reset DV serial processing for AMBE frames decoding in digital voice modes
|
||||||
operationId: instanceDVSerialPatch
|
operationId: instanceDVSerialPatch
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
parameters:
|
parameters:
|
||||||
- name: dvserial
|
- name: dvserial
|
||||||
in: query
|
in: query
|
||||||
@ -236,6 +255,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: List all presets in the instance
|
description: List all presets in the instance
|
||||||
operationId: instancePresetGet
|
operationId: instancePresetGet
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: On success return preset list
|
description: On success return preset list
|
||||||
@ -250,6 +271,8 @@ paths:
|
|||||||
patch:
|
patch:
|
||||||
description: Load a preset in a device set
|
description: Load a preset in a device set
|
||||||
operationId: instancePresetPatch
|
operationId: instancePresetPatch
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -281,6 +304,8 @@ paths:
|
|||||||
put:
|
put:
|
||||||
description: Update device set settings on an existing preset.
|
description: Update device set settings on an existing preset.
|
||||||
operationId: instancePresetPut
|
operationId: instancePresetPut
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -312,6 +337,8 @@ paths:
|
|||||||
post:
|
post:
|
||||||
description: Create a new preset from a device set settings. Frequency and type is ignored and taken from the the device set values.
|
description: Create a new preset from a device set settings. Frequency and type is ignored and taken from the the device set values.
|
||||||
operationId: instancePresetPost
|
operationId: instancePresetPost
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -347,6 +374,8 @@ paths:
|
|||||||
delete:
|
delete:
|
||||||
description: Deletes a preset
|
description: Deletes a preset
|
||||||
operationId: instancePresetDelete
|
operationId: instancePresetDelete
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -380,6 +409,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get summary information about device sets opened in the instance
|
description: Get summary information about device sets opened in the instance
|
||||||
operationId: instanceDeviceSetsGet
|
operationId: instanceDeviceSetsGet
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: On success return device set list
|
description: On success return device set list
|
||||||
@ -394,6 +425,8 @@ paths:
|
|||||||
post:
|
post:
|
||||||
description: Add (append) a new device set with default values
|
description: Add (append) a new device set with default values
|
||||||
operationId: instanceDeviceSetsPost
|
operationId: instanceDeviceSetsPost
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
parameters:
|
parameters:
|
||||||
- name: tx
|
- name: tx
|
||||||
in: query
|
in: query
|
||||||
@ -414,6 +447,8 @@ paths:
|
|||||||
delete:
|
delete:
|
||||||
description: Remove last device set except the first device
|
description: Remove last device set except the first device
|
||||||
operationId: instanceDeviceSetsDelete
|
operationId: instanceDeviceSetsDelete
|
||||||
|
tags:
|
||||||
|
- Instance
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: On success return new list of device sets
|
description: On success return new list of device sets
|
||||||
@ -434,6 +469,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
description: Get device set information
|
description: Get device set information
|
||||||
operationId: devicesetGet
|
operationId: devicesetGet
|
||||||
|
tags:
|
||||||
|
- DeviceSet
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: deviceSetIndex
|
name: deviceSetIndex
|
||||||
@ -460,6 +497,8 @@ paths:
|
|||||||
put:
|
put:
|
||||||
description: Set the device used in the device set
|
description: Set the device used in the device set
|
||||||
operationId: devicesetDevicePut
|
operationId: devicesetDevicePut
|
||||||
|
tags:
|
||||||
|
- DeviceSet
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: deviceSetIndex
|
name: deviceSetIndex
|
||||||
@ -474,7 +513,7 @@ paths:
|
|||||||
$ref: "#/definitions/DeviceListItem"
|
$ref: "#/definitions/DeviceListItem"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: On success return details on the device
|
description: On success return details on the selected device
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/DeviceListItem"
|
$ref: "#/definitions/DeviceListItem"
|
||||||
"400":
|
"400":
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright {yyyy} {name of copyright owner}
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGAudioDevice::SWGAudioDevice(QString* json) {
|
SWGAudioDevice::SWGAudioDevice(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -59,7 +59,7 @@ SWGAudioDevice::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGAudioDevice::fromJsonObject(QJsonObject &pJson) {
|
SWGAudioDevice::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGAudioDevice: public SWGObject {
|
class SWGAudioDevice: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGAudioDevices::SWGAudioDevices(QString* json) {
|
SWGAudioDevices::SWGAudioDevices(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -82,16 +82,16 @@ SWGAudioDevices::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGAudioDevices::fromJsonObject(QJsonObject &pJson) {
|
SWGAudioDevices::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&input_volume, pJson["inputVolume"], "float", "");
|
::SWGSDRangel::setValue(&input_volume, pJson["inputVolume"], "float", "");
|
||||||
::Swagger::setValue(&nb_input_devices, pJson["nbInputDevices"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_input_devices, pJson["nbInputDevices"], "qint32", "");
|
||||||
::Swagger::setValue(&input_device_selected_index, pJson["inputDeviceSelectedIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&input_device_selected_index, pJson["inputDeviceSelectedIndex"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&input_devices, pJson["inputDevices"], "QList", "SWGAudioDevice");
|
::SWGSDRangel::setValue(&input_devices, pJson["inputDevices"], "QList", "SWGAudioDevice");
|
||||||
|
|
||||||
::Swagger::setValue(&nb_output_devices, pJson["nbOutputDevices"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_output_devices, pJson["nbOutputDevices"], "qint32", "");
|
||||||
::Swagger::setValue(&output_device_selected_index, pJson["outputDeviceSelectedIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&output_device_selected_index, pJson["outputDeviceSelectedIndex"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&output_devices, pJson["outputDevices"], "QList", "SWGAudioDevice");
|
::SWGSDRangel::setValue(&output_devices, pJson["outputDevices"], "QList", "SWGAudioDevice");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGAudioDevices: public SWGObject {
|
class SWGAudioDevices: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGAudioDevicesSelect::SWGAudioDevicesSelect(QString* json) {
|
SWGAudioDevicesSelect::SWGAudioDevicesSelect(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -60,9 +60,9 @@ SWGAudioDevicesSelect::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGAudioDevicesSelect::fromJsonObject(QJsonObject &pJson) {
|
SWGAudioDevicesSelect::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&input_volume, pJson["inputVolume"], "float", "");
|
::SWGSDRangel::setValue(&input_volume, pJson["inputVolume"], "float", "");
|
||||||
::Swagger::setValue(&input_index, pJson["inputIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&input_index, pJson["inputIndex"], "qint32", "");
|
||||||
::Swagger::setValue(&output_index, pJson["outputIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&output_index, pJson["outputIndex"], "qint32", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGAudioDevicesSelect: public SWGObject {
|
class SWGAudioDevicesSelect: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGChannel::SWGChannel(QString* json) {
|
SWGChannel::SWGChannel(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -70,11 +70,11 @@ SWGChannel::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGChannel::fromJsonObject(QJsonObject &pJson) {
|
SWGChannel::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&index, pJson["index"], "qint32", "");
|
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
|
||||||
::Swagger::setValue(&id, pJson["id"], "QString", "QString");
|
::SWGSDRangel::setValue(&id, pJson["id"], "QString", "QString");
|
||||||
::Swagger::setValue(&uid, pJson["uid"], "qint64", "");
|
::SWGSDRangel::setValue(&uid, pJson["uid"], "qint64", "");
|
||||||
::Swagger::setValue(&title, pJson["title"], "QString", "QString");
|
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
||||||
::Swagger::setValue(&delta_frequency, pJson["deltaFrequency"], "qint32", "");
|
::SWGSDRangel::setValue(&delta_frequency, pJson["deltaFrequency"], "qint32", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGChannel: public SWGObject {
|
class SWGChannel: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGChannelListItem::SWGChannelListItem(QString* json) {
|
SWGChannelListItem::SWGChannelListItem(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -78,12 +78,12 @@ SWGChannelListItem::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGChannelListItem::fromJsonObject(QJsonObject &pJson) {
|
SWGChannelListItem::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||||
::Swagger::setValue(&id_uri, pJson["idURI"], "QString", "QString");
|
::SWGSDRangel::setValue(&id_uri, pJson["idURI"], "QString", "QString");
|
||||||
::Swagger::setValue(&id, pJson["id"], "QString", "QString");
|
::SWGSDRangel::setValue(&id, pJson["id"], "QString", "QString");
|
||||||
::Swagger::setValue(&tx, pJson["tx"], "qint32", "");
|
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
|
||||||
::Swagger::setValue(&version, pJson["version"], "QString", "QString");
|
::SWGSDRangel::setValue(&version, pJson["version"], "QString", "QString");
|
||||||
::Swagger::setValue(&index, pJson["index"], "qint32", "");
|
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGChannelListItem: public SWGObject {
|
class SWGChannelListItem: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDVSeralDevices::SWGDVSeralDevices(QString* json) {
|
SWGDVSeralDevices::SWGDVSeralDevices(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -65,9 +65,9 @@ SWGDVSeralDevices::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGDVSeralDevices::fromJsonObject(QJsonObject &pJson) {
|
SWGDVSeralDevices::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&nb_devices, pJson["nbDevices"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_devices, pJson["nbDevices"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&dv_serial_devices, pJson["dvSerialDevices"], "QList", "SWGDVSerialDevice");
|
::SWGSDRangel::setValue(&dv_serial_devices, pJson["dvSerialDevices"], "QList", "SWGDVSerialDevice");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDVSeralDevices: public SWGObject {
|
class SWGDVSeralDevices: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDVSerialDevice::SWGDVSerialDevice(QString* json) {
|
SWGDVSerialDevice::SWGDVSerialDevice(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -59,7 +59,7 @@ SWGDVSerialDevice::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGDVSerialDevice::fromJsonObject(QJsonObject &pJson) {
|
SWGDVSerialDevice::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&device_name, pJson["deviceName"], "QString", "QString");
|
::SWGSDRangel::setValue(&device_name, pJson["deviceName"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDVSerialDevice: public SWGObject {
|
class SWGDVSerialDevice: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDeviceListItem::SWGDeviceListItem(QString* json) {
|
SWGDeviceListItem::SWGDeviceListItem(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -81,15 +81,15 @@ SWGDeviceListItem::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGDeviceListItem::fromJsonObject(QJsonObject &pJson) {
|
SWGDeviceListItem::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&displayed_name, pJson["displayedName"], "QString", "QString");
|
::SWGSDRangel::setValue(&displayed_name, pJson["displayedName"], "QString", "QString");
|
||||||
::Swagger::setValue(&hw_type, pJson["hwType"], "QString", "QString");
|
::SWGSDRangel::setValue(&hw_type, pJson["hwType"], "QString", "QString");
|
||||||
::Swagger::setValue(&serial, pJson["serial"], "QString", "QString");
|
::SWGSDRangel::setValue(&serial, pJson["serial"], "QString", "QString");
|
||||||
::Swagger::setValue(&sequence, pJson["sequence"], "qint32", "");
|
::SWGSDRangel::setValue(&sequence, pJson["sequence"], "qint32", "");
|
||||||
::Swagger::setValue(&tx, pJson["tx"], "qint32", "");
|
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
|
||||||
::Swagger::setValue(&nb_streams, pJson["nbStreams"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_streams, pJson["nbStreams"], "qint32", "");
|
||||||
::Swagger::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||||
::Swagger::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
|
||||||
::Swagger::setValue(&index, pJson["index"], "qint32", "");
|
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDeviceListItem: public SWGObject {
|
class SWGDeviceListItem: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDeviceSet::SWGDeviceSet(QString* json) {
|
SWGDeviceSet::SWGDeviceSet(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -70,10 +70,10 @@ SWGDeviceSet::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGDeviceSet::fromJsonObject(QJsonObject &pJson) {
|
SWGDeviceSet::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&sampling_device, pJson["samplingDevice"], "SWGSamplingDevice", "SWGSamplingDevice");
|
::SWGSDRangel::setValue(&sampling_device, pJson["samplingDevice"], "SWGSamplingDevice", "SWGSamplingDevice");
|
||||||
::Swagger::setValue(&channelcount, pJson["channelcount"], "qint32", "");
|
::SWGSDRangel::setValue(&channelcount, pJson["channelcount"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&channels, pJson["channels"], "QList", "SWGChannel");
|
::SWGSDRangel::setValue(&channels, pJson["channels"], "QList", "SWGChannel");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDeviceSet: public SWGObject {
|
class SWGDeviceSet: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
134
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp
Normal file
134
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
/**
|
||||||
|
* SDRangel
|
||||||
|
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 4.0.0
|
||||||
|
* Contact: f4exb06@gmail.com
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "SWGDeviceSetApi.h"
|
||||||
|
#include "SWGHelpers.h"
|
||||||
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
SWGDeviceSetApi::SWGDeviceSetApi() {}
|
||||||
|
|
||||||
|
SWGDeviceSetApi::~SWGDeviceSetApi() {}
|
||||||
|
|
||||||
|
SWGDeviceSetApi::SWGDeviceSetApi(QString host, QString basePath) {
|
||||||
|
this->host = host;
|
||||||
|
this->basePath = basePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGDeviceSetApi::devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem body) {
|
||||||
|
QString fullPath;
|
||||||
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/device");
|
||||||
|
|
||||||
|
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||||
|
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||||
|
|
||||||
|
|
||||||
|
HttpRequestWorker *worker = new HttpRequestWorker();
|
||||||
|
HttpRequestInput input(fullPath, "PUT");
|
||||||
|
|
||||||
|
|
||||||
|
QString output = body.asJson();
|
||||||
|
input.request_body.append(output);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach(QString key, this->defaultHeaders.keys()) {
|
||||||
|
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(worker,
|
||||||
|
&HttpRequestWorker::on_execution_finished,
|
||||||
|
this,
|
||||||
|
&SWGDeviceSetApi::devicesetDevicePutCallback);
|
||||||
|
|
||||||
|
worker->execute(&input);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGDeviceSetApi::devicesetDevicePutCallback(HttpRequestWorker * worker) {
|
||||||
|
QString msg;
|
||||||
|
QString error_str = worker->error_str;
|
||||||
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
|
|
||||||
|
if (worker->error_type == QNetworkReply::NoError) {
|
||||||
|
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg = "Error: " + worker->error_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString json(worker->response);
|
||||||
|
SWGDeviceListItem* output = static_cast<SWGDeviceListItem*>(create(json, QString("SWGDeviceListItem")));
|
||||||
|
worker->deleteLater();
|
||||||
|
|
||||||
|
emit devicesetDevicePutSignal(output);
|
||||||
|
emit devicesetDevicePutSignalE(output, error_type, error_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGDeviceSetApi::devicesetGet(qint32 device_set_index) {
|
||||||
|
QString fullPath;
|
||||||
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}");
|
||||||
|
|
||||||
|
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||||
|
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||||
|
|
||||||
|
|
||||||
|
HttpRequestWorker *worker = new HttpRequestWorker();
|
||||||
|
HttpRequestInput input(fullPath, "GET");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach(QString key, this->defaultHeaders.keys()) {
|
||||||
|
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(worker,
|
||||||
|
&HttpRequestWorker::on_execution_finished,
|
||||||
|
this,
|
||||||
|
&SWGDeviceSetApi::devicesetGetCallback);
|
||||||
|
|
||||||
|
worker->execute(&input);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SWGDeviceSetApi::devicesetGetCallback(HttpRequestWorker * worker) {
|
||||||
|
QString msg;
|
||||||
|
QString error_str = worker->error_str;
|
||||||
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
|
|
||||||
|
if (worker->error_type == QNetworkReply::NoError) {
|
||||||
|
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg = "Error: " + worker->error_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString json(worker->response);
|
||||||
|
SWGDeviceSet* output = static_cast<SWGDeviceSet*>(create(json, QString("SWGDeviceSet")));
|
||||||
|
worker->deleteLater();
|
||||||
|
|
||||||
|
emit devicesetGetSignal(output);
|
||||||
|
emit devicesetGetSignalE(output, error_type, error_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
55
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h
Normal file
55
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* SDRangel
|
||||||
|
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 4.0.0
|
||||||
|
* Contact: f4exb06@gmail.com
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SWG_SWGDeviceSetApi_H_
|
||||||
|
#define _SWG_SWGDeviceSetApi_H_
|
||||||
|
|
||||||
|
#include "SWGHttpRequest.h"
|
||||||
|
|
||||||
|
#include "SWGDeviceListItem.h"
|
||||||
|
#include "SWGDeviceSet.h"
|
||||||
|
#include "SWGErrorResponse.h"
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
|
class SWGDeviceSetApi: public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
SWGDeviceSetApi();
|
||||||
|
SWGDeviceSetApi(QString host, QString basePath);
|
||||||
|
~SWGDeviceSetApi();
|
||||||
|
|
||||||
|
QString host;
|
||||||
|
QString basePath;
|
||||||
|
QMap<QString, QString> defaultHeaders;
|
||||||
|
|
||||||
|
void devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem body);
|
||||||
|
void devicesetGet(qint32 device_set_index);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void devicesetDevicePutCallback (HttpRequestWorker * worker);
|
||||||
|
void devicesetGetCallback (HttpRequestWorker * worker);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void devicesetDevicePutSignal(SWGDeviceListItem* summary);
|
||||||
|
void devicesetGetSignal(SWGDeviceSet* summary);
|
||||||
|
|
||||||
|
void devicesetDevicePutSignalE(SWGDeviceListItem* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||||
|
void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDeviceSetList::SWGDeviceSetList(QString* json) {
|
SWGDeviceSetList::SWGDeviceSetList(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -65,9 +65,9 @@ SWGDeviceSetList::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGDeviceSetList::fromJsonObject(QJsonObject &pJson) {
|
SWGDeviceSetList::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&devicesetcount, pJson["devicesetcount"], "qint32", "");
|
::SWGSDRangel::setValue(&devicesetcount, pJson["devicesetcount"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&device_sets, pJson["deviceSets"], "QList", "SWGDeviceSet");
|
::SWGSDRangel::setValue(&device_sets, pJson["deviceSets"], "QList", "SWGDeviceSet");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDeviceSetList: public SWGObject {
|
class SWGDeviceSetList: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGErrorResponse::SWGErrorResponse(QString* json) {
|
SWGErrorResponse::SWGErrorResponse(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -59,7 +59,7 @@ SWGErrorResponse::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGErrorResponse::fromJsonObject(QJsonObject &pJson) {
|
SWGErrorResponse::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&message, pJson["message"], "QString", "QString");
|
::SWGSDRangel::setValue(&message, pJson["message"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGErrorResponse: public SWGObject {
|
class SWGErrorResponse: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
void
|
void
|
||||||
setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
||||||
@ -131,7 +131,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
|
|||||||
else if(type.startsWith("SWG") && obj.isObject()) {
|
else if(type.startsWith("SWG") && obj.isObject()) {
|
||||||
// complex type
|
// complex type
|
||||||
QJsonObject jsonObj = obj.toObject();
|
QJsonObject jsonObj = obj.toObject();
|
||||||
SWGObject * so = (SWGObject*)::Swagger::create(type);
|
SWGObject * so = (SWGObject*)::SWGSDRangel::create(type);
|
||||||
if(so != nullptr) {
|
if(so != nullptr) {
|
||||||
so->fromJsonObject(jsonObj);
|
so->fromJsonObject(jsonObj);
|
||||||
SWGObject **val = static_cast<SWGObject**>(value);
|
SWGObject **val = static_cast<SWGObject**>(value);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
|
||||||
void toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType);
|
void toJsonArray(QList<void*>* value, QJsonArray* output, QString innerName, QString innerType);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
HttpRequestInput::HttpRequestInput() {
|
HttpRequestInput::HttpRequestInput() {
|
||||||
initialize();
|
initialize();
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
enum HttpRequestVarLayout {NOT_SET, ADDRESS, URL_ENCODED, MULTIPART};
|
enum HttpRequestVarLayout {NOT_SET, ADDRESS, URL_ENCODED, MULTIPART};
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGHttpRequestInputFileElement {
|
class SWGHttpRequestInputFileElement {
|
||||||
|
|
||||||
|
@ -10,126 +10,26 @@
|
|||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SWGDefaultApi.h"
|
#include "SWGInstanceApi.h"
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
#include "SWGModelFactory.h"
|
#include "SWGModelFactory.h"
|
||||||
|
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDefaultApi::SWGDefaultApi() {}
|
SWGInstanceApi::SWGInstanceApi() {}
|
||||||
|
|
||||||
SWGDefaultApi::~SWGDefaultApi() {}
|
SWGInstanceApi::~SWGInstanceApi() {}
|
||||||
|
|
||||||
SWGDefaultApi::SWGDefaultApi(QString host, QString basePath) {
|
SWGInstanceApi::SWGInstanceApi(QString host, QString basePath) {
|
||||||
this->host = host;
|
this->host = host;
|
||||||
this->basePath = basePath;
|
this->basePath = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::devicesetDevicePut(qint32 device_set_index) {
|
SWGInstanceApi::instanceAudioGet() {
|
||||||
QString fullPath;
|
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/device");
|
|
||||||
|
|
||||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
|
||||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
|
||||||
|
|
||||||
|
|
||||||
HttpRequestWorker *worker = new HttpRequestWorker();
|
|
||||||
HttpRequestInput input(fullPath, "PUT");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach(QString key, this->defaultHeaders.keys()) {
|
|
||||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
connect(worker,
|
|
||||||
&HttpRequestWorker::on_execution_finished,
|
|
||||||
this,
|
|
||||||
&SWGDefaultApi::devicesetDevicePutCallback);
|
|
||||||
|
|
||||||
worker->execute(&input);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SWGDefaultApi::devicesetDevicePutCallback(HttpRequestWorker * worker) {
|
|
||||||
QString msg;
|
|
||||||
QString error_str = worker->error_str;
|
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
|
||||||
|
|
||||||
if (worker->error_type == QNetworkReply::NoError) {
|
|
||||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
msg = "Error: " + worker->error_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
|
||||||
SWGDeviceSet* output = static_cast<SWGDeviceSet*>(create(json, QString("SWGDeviceSet")));
|
|
||||||
worker->deleteLater();
|
|
||||||
|
|
||||||
emit devicesetDevicePutSignal(output);
|
|
||||||
emit devicesetDevicePutSignalE(output, error_type, error_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SWGDefaultApi::devicesetGet(qint32 device_set_index) {
|
|
||||||
QString fullPath;
|
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}");
|
|
||||||
|
|
||||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
|
||||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
|
||||||
|
|
||||||
|
|
||||||
HttpRequestWorker *worker = new HttpRequestWorker();
|
|
||||||
HttpRequestInput input(fullPath, "GET");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach(QString key, this->defaultHeaders.keys()) {
|
|
||||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
connect(worker,
|
|
||||||
&HttpRequestWorker::on_execution_finished,
|
|
||||||
this,
|
|
||||||
&SWGDefaultApi::devicesetGetCallback);
|
|
||||||
|
|
||||||
worker->execute(&input);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SWGDefaultApi::devicesetGetCallback(HttpRequestWorker * worker) {
|
|
||||||
QString msg;
|
|
||||||
QString error_str = worker->error_str;
|
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
|
||||||
|
|
||||||
if (worker->error_type == QNetworkReply::NoError) {
|
|
||||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
msg = "Error: " + worker->error_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString json(worker->response);
|
|
||||||
SWGDeviceSet* output = static_cast<SWGDeviceSet*>(create(json, QString("SWGDeviceSet")));
|
|
||||||
worker->deleteLater();
|
|
||||||
|
|
||||||
emit devicesetGetSignal(output);
|
|
||||||
emit devicesetGetSignalE(output, error_type, error_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SWGDefaultApi::instanceAudioGet() {
|
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio");
|
||||||
|
|
||||||
@ -149,13 +49,13 @@ SWGDefaultApi::instanceAudioGet() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceAudioGetCallback);
|
&SWGInstanceApi::instanceAudioGetCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceAudioGetCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceAudioGetCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -177,7 +77,7 @@ SWGDefaultApi::instanceAudioGetCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
|
SWGInstanceApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio");
|
||||||
|
|
||||||
@ -199,13 +99,13 @@ SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceAudioPatchCallback);
|
&SWGInstanceApi::instanceAudioPatchCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceAudioPatchCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceAudioPatchCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -227,7 +127,7 @@ SWGDefaultApi::instanceAudioPatchCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceChannels(qint32 tx) {
|
SWGInstanceApi::instanceChannels(qint32 tx) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/channels");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/channels");
|
||||||
|
|
||||||
@ -255,13 +155,13 @@ SWGDefaultApi::instanceChannels(qint32 tx) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceChannelsCallback);
|
&SWGInstanceApi::instanceChannelsCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceChannelsCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceChannelsCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -283,7 +183,7 @@ SWGDefaultApi::instanceChannelsCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDVSerialPatch(qint32 dvserial) {
|
SWGInstanceApi::instanceDVSerialPatch(qint32 dvserial) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/dvserial");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/dvserial");
|
||||||
|
|
||||||
@ -311,13 +211,13 @@ SWGDefaultApi::instanceDVSerialPatch(qint32 dvserial) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceDVSerialPatchCallback);
|
&SWGInstanceApi::instanceDVSerialPatchCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -339,7 +239,7 @@ SWGDefaultApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsDelete() {
|
SWGInstanceApi::instanceDeviceSetsDelete() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
||||||
|
|
||||||
@ -359,13 +259,13 @@ SWGDefaultApi::instanceDeviceSetsDelete() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceDeviceSetsDeleteCallback);
|
&SWGInstanceApi::instanceDeviceSetsDeleteCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -387,7 +287,7 @@ SWGDefaultApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsGet() {
|
SWGInstanceApi::instanceDeviceSetsGet() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
||||||
|
|
||||||
@ -407,13 +307,13 @@ SWGDefaultApi::instanceDeviceSetsGet() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceDeviceSetsGetCallback);
|
&SWGInstanceApi::instanceDeviceSetsGetCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -435,7 +335,7 @@ SWGDefaultApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsPost(qint32 tx) {
|
SWGInstanceApi::instanceDeviceSetsPost(qint32 tx) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets");
|
||||||
|
|
||||||
@ -463,13 +363,13 @@ SWGDefaultApi::instanceDeviceSetsPost(qint32 tx) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceDeviceSetsPostCallback);
|
&SWGInstanceApi::instanceDeviceSetsPostCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -491,7 +391,7 @@ SWGDefaultApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDevices(qint32 tx) {
|
SWGInstanceApi::instanceDevices(qint32 tx) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devices");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/devices");
|
||||||
|
|
||||||
@ -519,13 +419,13 @@ SWGDefaultApi::instanceDevices(qint32 tx) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceDevicesCallback);
|
&SWGInstanceApi::instanceDevicesCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceDevicesCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceDevicesCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -547,7 +447,7 @@ SWGDefaultApi::instanceDevicesCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLocationGet() {
|
SWGInstanceApi::instanceLocationGet() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/location");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/location");
|
||||||
|
|
||||||
@ -567,13 +467,13 @@ SWGDefaultApi::instanceLocationGet() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceLocationGetCallback);
|
&SWGInstanceApi::instanceLocationGetCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLocationGetCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceLocationGetCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -595,7 +495,7 @@ SWGDefaultApi::instanceLocationGetCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
|
SWGInstanceApi::instanceLocationPut(SWGLocationInformation body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/location");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/location");
|
||||||
|
|
||||||
@ -617,13 +517,13 @@ SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceLocationPutCallback);
|
&SWGInstanceApi::instanceLocationPutCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLocationPutCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceLocationPutCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -645,7 +545,7 @@ SWGDefaultApi::instanceLocationPutCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLoggingGet() {
|
SWGInstanceApi::instanceLoggingGet() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging");
|
||||||
|
|
||||||
@ -665,13 +565,13 @@ SWGDefaultApi::instanceLoggingGet() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceLoggingGetCallback);
|
&SWGInstanceApi::instanceLoggingGetCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLoggingGetCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceLoggingGetCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -693,7 +593,7 @@ SWGDefaultApi::instanceLoggingGetCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
|
SWGInstanceApi::instanceLoggingPut(SWGLoggingInfo body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging");
|
||||||
|
|
||||||
@ -715,13 +615,13 @@ SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceLoggingPutCallback);
|
&SWGInstanceApi::instanceLoggingPutCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceLoggingPutCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceLoggingPutCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -743,7 +643,7 @@ SWGDefaultApi::instanceLoggingPutCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
|
SWGInstanceApi::instancePresetDelete(SWGPresetIdentifier body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
||||||
|
|
||||||
@ -765,13 +665,13 @@ SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instancePresetDeleteCallback);
|
&SWGInstanceApi::instancePresetDeleteCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetDeleteCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instancePresetDeleteCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -793,7 +693,7 @@ SWGDefaultApi::instancePresetDeleteCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetGet() {
|
SWGInstanceApi::instancePresetGet() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
||||||
|
|
||||||
@ -813,13 +713,13 @@ SWGDefaultApi::instancePresetGet() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instancePresetGetCallback);
|
&SWGInstanceApi::instancePresetGetCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetGetCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instancePresetGetCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -841,7 +741,7 @@ SWGDefaultApi::instancePresetGetCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
|
SWGInstanceApi::instancePresetPatch(SWGPresetTransfer body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
||||||
|
|
||||||
@ -863,13 +763,13 @@ SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instancePresetPatchCallback);
|
&SWGInstanceApi::instancePresetPatchCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPatchCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instancePresetPatchCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -891,7 +791,7 @@ SWGDefaultApi::instancePresetPatchCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
|
SWGInstanceApi::instancePresetPost(SWGPresetTransfer body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
||||||
|
|
||||||
@ -913,13 +813,13 @@ SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instancePresetPostCallback);
|
&SWGInstanceApi::instancePresetPostCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPostCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instancePresetPostCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -941,7 +841,7 @@ SWGDefaultApi::instancePresetPostCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
|
SWGInstanceApi::instancePresetPut(SWGPresetTransfer body) {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset");
|
||||||
|
|
||||||
@ -963,13 +863,13 @@ SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instancePresetPutCallback);
|
&SWGInstanceApi::instancePresetPutCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instancePresetPutCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instancePresetPutCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||||
@ -991,7 +891,7 @@ SWGDefaultApi::instancePresetPutCallback(HttpRequestWorker * worker) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceSummary() {
|
SWGInstanceApi::instanceSummary() {
|
||||||
QString fullPath;
|
QString fullPath;
|
||||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel");
|
fullPath.append(this->host).append(this->basePath).append("/sdrangel");
|
||||||
|
|
||||||
@ -1011,13 +911,13 @@ SWGDefaultApi::instanceSummary() {
|
|||||||
connect(worker,
|
connect(worker,
|
||||||
&HttpRequestWorker::on_execution_finished,
|
&HttpRequestWorker::on_execution_finished,
|
||||||
this,
|
this,
|
||||||
&SWGDefaultApi::instanceSummaryCallback);
|
&SWGInstanceApi::instanceSummaryCallback);
|
||||||
|
|
||||||
worker->execute(&input);
|
worker->execute(&input);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDefaultApi::instanceSummaryCallback(HttpRequestWorker * worker) {
|
SWGInstanceApi::instanceSummaryCallback(HttpRequestWorker * worker) {
|
||||||
QString msg;
|
QString msg;
|
||||||
QString error_str = worker->error_str;
|
QString error_str = worker->error_str;
|
||||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
QNetworkReply::NetworkError error_type = worker->error_type;
|
@ -10,8 +10,8 @@
|
|||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SWG_SWGDefaultApi_H_
|
#ifndef _SWG_SWGInstanceApi_H_
|
||||||
#define _SWG_SWGDefaultApi_H_
|
#define _SWG_SWGInstanceApi_H_
|
||||||
|
|
||||||
#include "SWGHttpRequest.h"
|
#include "SWGHttpRequest.h"
|
||||||
|
|
||||||
@ -32,22 +32,20 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGDefaultApi: public QObject {
|
class SWGInstanceApi: public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SWGDefaultApi();
|
SWGInstanceApi();
|
||||||
SWGDefaultApi(QString host, QString basePath);
|
SWGInstanceApi(QString host, QString basePath);
|
||||||
~SWGDefaultApi();
|
~SWGInstanceApi();
|
||||||
|
|
||||||
QString host;
|
QString host;
|
||||||
QString basePath;
|
QString basePath;
|
||||||
QMap<QString, QString> defaultHeaders;
|
QMap<QString, QString> defaultHeaders;
|
||||||
|
|
||||||
void devicesetDevicePut(qint32 device_set_index);
|
|
||||||
void devicesetGet(qint32 device_set_index);
|
|
||||||
void instanceAudioGet();
|
void instanceAudioGet();
|
||||||
void instanceAudioPatch(SWGAudioDevicesSelect body);
|
void instanceAudioPatch(SWGAudioDevicesSelect body);
|
||||||
void instanceChannels(qint32 tx);
|
void instanceChannels(qint32 tx);
|
||||||
@ -68,8 +66,6 @@ public:
|
|||||||
void instanceSummary();
|
void instanceSummary();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void devicesetDevicePutCallback (HttpRequestWorker * worker);
|
|
||||||
void devicesetGetCallback (HttpRequestWorker * worker);
|
|
||||||
void instanceAudioGetCallback (HttpRequestWorker * worker);
|
void instanceAudioGetCallback (HttpRequestWorker * worker);
|
||||||
void instanceAudioPatchCallback (HttpRequestWorker * worker);
|
void instanceAudioPatchCallback (HttpRequestWorker * worker);
|
||||||
void instanceChannelsCallback (HttpRequestWorker * worker);
|
void instanceChannelsCallback (HttpRequestWorker * worker);
|
||||||
@ -90,8 +86,6 @@ private:
|
|||||||
void instanceSummaryCallback (HttpRequestWorker * worker);
|
void instanceSummaryCallback (HttpRequestWorker * worker);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void devicesetDevicePutSignal(SWGDeviceSet* summary);
|
|
||||||
void devicesetGetSignal(SWGDeviceSet* summary);
|
|
||||||
void instanceAudioGetSignal(SWGAudioDevices* summary);
|
void instanceAudioGetSignal(SWGAudioDevices* summary);
|
||||||
void instanceAudioPatchSignal(SWGAudioDevicesSelect* summary);
|
void instanceAudioPatchSignal(SWGAudioDevicesSelect* summary);
|
||||||
void instanceChannelsSignal(SWGInstanceChannelsResponse* summary);
|
void instanceChannelsSignal(SWGInstanceChannelsResponse* summary);
|
||||||
@ -111,8 +105,6 @@ signals:
|
|||||||
void instancePresetPutSignal(SWGPresetIdentifier* summary);
|
void instancePresetPutSignal(SWGPresetIdentifier* summary);
|
||||||
void instanceSummarySignal(SWGInstanceSummaryResponse* summary);
|
void instanceSummarySignal(SWGInstanceSummaryResponse* summary);
|
||||||
|
|
||||||
void devicesetDevicePutSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
|
||||||
void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
|
||||||
void instanceAudioGetSignalE(SWGAudioDevices* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
void instanceAudioGetSignalE(SWGAudioDevices* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||||
void instanceAudioPatchSignalE(SWGAudioDevicesSelect* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
void instanceAudioPatchSignalE(SWGAudioDevicesSelect* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||||
void instanceChannelsSignalE(SWGInstanceChannelsResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
void instanceChannelsSignalE(SWGInstanceChannelsResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGInstanceChannelsResponse::SWGInstanceChannelsResponse(QString* json) {
|
SWGInstanceChannelsResponse::SWGInstanceChannelsResponse(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -65,9 +65,9 @@ SWGInstanceChannelsResponse::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGInstanceChannelsResponse::fromJsonObject(QJsonObject &pJson) {
|
SWGInstanceChannelsResponse::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&channelcount, pJson["channelcount"], "qint32", "");
|
::SWGSDRangel::setValue(&channelcount, pJson["channelcount"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&channels, pJson["channels"], "QList", "SWGChannelListItem");
|
::SWGSDRangel::setValue(&channels, pJson["channels"], "QList", "SWGChannelListItem");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGInstanceChannelsResponse: public SWGObject {
|
class SWGInstanceChannelsResponse: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGInstanceDevicesResponse::SWGInstanceDevicesResponse(QString* json) {
|
SWGInstanceDevicesResponse::SWGInstanceDevicesResponse(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -65,9 +65,9 @@ SWGInstanceDevicesResponse::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGInstanceDevicesResponse::fromJsonObject(QJsonObject &pJson) {
|
SWGInstanceDevicesResponse::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&devicecount, pJson["devicecount"], "qint32", "");
|
::SWGSDRangel::setValue(&devicecount, pJson["devicecount"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&devices, pJson["devices"], "QList", "SWGDeviceListItem");
|
::SWGSDRangel::setValue(&devices, pJson["devices"], "QList", "SWGDeviceListItem");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGInstanceDevicesResponse: public SWGObject {
|
class SWGInstanceDevicesResponse: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGInstanceSummaryResponse::SWGInstanceSummaryResponse(QString* json) {
|
SWGInstanceSummaryResponse::SWGInstanceSummaryResponse(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -74,10 +74,10 @@ SWGInstanceSummaryResponse::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGInstanceSummaryResponse::fromJsonObject(QJsonObject &pJson) {
|
SWGInstanceSummaryResponse::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&version, pJson["version"], "QString", "QString");
|
::SWGSDRangel::setValue(&version, pJson["version"], "QString", "QString");
|
||||||
::Swagger::setValue(&logging, pJson["logging"], "SWGLoggingInfo", "SWGLoggingInfo");
|
::SWGSDRangel::setValue(&logging, pJson["logging"], "SWGLoggingInfo", "SWGLoggingInfo");
|
||||||
::Swagger::setValue(&devicesetlist, pJson["devicesetlist"], "SWGDeviceSetList", "SWGDeviceSetList");
|
::SWGSDRangel::setValue(&devicesetlist, pJson["devicesetlist"], "SWGDeviceSetList", "SWGDeviceSetList");
|
||||||
::Swagger::setValue(&user, pJson["user"], "SWGUser", "SWGUser");
|
::SWGSDRangel::setValue(&user, pJson["user"], "SWGUser", "SWGUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGInstanceSummaryResponse: public SWGObject {
|
class SWGInstanceSummaryResponse: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGLocationInformation::SWGLocationInformation(QString* json) {
|
SWGLocationInformation::SWGLocationInformation(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -58,8 +58,8 @@ SWGLocationInformation::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGLocationInformation::fromJsonObject(QJsonObject &pJson) {
|
SWGLocationInformation::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&latitude, pJson["latitude"], "float", "");
|
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", "");
|
||||||
::Swagger::setValue(&longitude, pJson["longitude"], "float", "");
|
::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGLocationInformation: public SWGObject {
|
class SWGLocationInformation: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGLoggingInfo::SWGLoggingInfo(QString* json) {
|
SWGLoggingInfo::SWGLoggingInfo(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -71,10 +71,10 @@ SWGLoggingInfo::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGLoggingInfo::fromJsonObject(QJsonObject &pJson) {
|
SWGLoggingInfo::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&console_level, pJson["consoleLevel"], "QString", "QString");
|
::SWGSDRangel::setValue(&console_level, pJson["consoleLevel"], "QString", "QString");
|
||||||
::Swagger::setValue(&file_level, pJson["fileLevel"], "QString", "QString");
|
::SWGSDRangel::setValue(&file_level, pJson["fileLevel"], "QString", "QString");
|
||||||
::Swagger::setValue(&dump_to_file, pJson["dumpToFile"], "qint32", "");
|
::SWGSDRangel::setValue(&dump_to_file, pJson["dumpToFile"], "qint32", "");
|
||||||
::Swagger::setValue(&file_name, pJson["fileName"], "QString", "QString");
|
::SWGSDRangel::setValue(&file_name, pJson["fileName"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGLoggingInfo: public SWGObject {
|
class SWGLoggingInfo: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "SWGSamplingDevice.h"
|
#include "SWGSamplingDevice.h"
|
||||||
#include "SWGUser.h"
|
#include "SWGUser.h"
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
inline void* create(QString type) {
|
inline void* create(QString type) {
|
||||||
if(QString("SWGAudioDevice").compare(type) == 0) {
|
if(QString("SWGAudioDevice").compare(type) == 0) {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGObject {
|
class SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGPresetGroup::SWGPresetGroup(QString* json) {
|
SWGPresetGroup::SWGPresetGroup(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -70,10 +70,10 @@ SWGPresetGroup::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGPresetGroup::fromJsonObject(QJsonObject &pJson) {
|
SWGPresetGroup::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&group_name, pJson["groupName"], "QString", "QString");
|
::SWGSDRangel::setValue(&group_name, pJson["groupName"], "QString", "QString");
|
||||||
::Swagger::setValue(&nb_presets, pJson["nbPresets"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_presets, pJson["nbPresets"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&presets, pJson["presets"], "QList", "SWGPresetItem");
|
::SWGSDRangel::setValue(&presets, pJson["presets"], "QList", "SWGPresetItem");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGPresetGroup: public SWGObject {
|
class SWGPresetGroup: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGPresetIdentifier::SWGPresetIdentifier(QString* json) {
|
SWGPresetIdentifier::SWGPresetIdentifier(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -71,10 +71,10 @@ SWGPresetIdentifier::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGPresetIdentifier::fromJsonObject(QJsonObject &pJson) {
|
SWGPresetIdentifier::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&group_name, pJson["groupName"], "QString", "QString");
|
::SWGSDRangel::setValue(&group_name, pJson["groupName"], "QString", "QString");
|
||||||
::Swagger::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||||
::Swagger::setValue(&type, pJson["type"], "QString", "QString");
|
::SWGSDRangel::setValue(&type, pJson["type"], "QString", "QString");
|
||||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGPresetIdentifier: public SWGObject {
|
class SWGPresetIdentifier: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGPresetItem::SWGPresetItem(QString* json) {
|
SWGPresetItem::SWGPresetItem(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -66,9 +66,9 @@ SWGPresetItem::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGPresetItem::fromJsonObject(QJsonObject &pJson) {
|
SWGPresetItem::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||||
::Swagger::setValue(&type, pJson["type"], "QString", "QString");
|
::SWGSDRangel::setValue(&type, pJson["type"], "QString", "QString");
|
||||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGPresetItem: public SWGObject {
|
class SWGPresetItem: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGPresetTransfer::SWGPresetTransfer(QString* json) {
|
SWGPresetTransfer::SWGPresetTransfer(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -61,8 +61,8 @@ SWGPresetTransfer::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGPresetTransfer::fromJsonObject(QJsonObject &pJson) {
|
SWGPresetTransfer::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
|
||||||
::Swagger::setValue(&preset, pJson["preset"], "SWGPresetIdentifier", "SWGPresetIdentifier");
|
::SWGSDRangel::setValue(&preset, pJson["preset"], "SWGPresetIdentifier", "SWGPresetIdentifier");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGPresetTransfer: public SWGObject {
|
class SWGPresetTransfer: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGPresets::SWGPresets(QString* json) {
|
SWGPresets::SWGPresets(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -65,9 +65,9 @@ SWGPresets::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGPresets::fromJsonObject(QJsonObject &pJson) {
|
SWGPresets::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&nb_groups, pJson["nbGroups"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_groups, pJson["nbGroups"], "qint32", "");
|
||||||
|
|
||||||
::Swagger::setValue(&groups, pJson["groups"], "QList", "SWGPresetGroup");
|
::SWGSDRangel::setValue(&groups, pJson["groups"], "QList", "SWGPresetGroup");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGPresets: public SWGObject {
|
class SWGPresets: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGSamplingDevice::SWGSamplingDevice(QString* json) {
|
SWGSamplingDevice::SWGSamplingDevice(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -83,16 +83,16 @@ SWGSamplingDevice::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGSamplingDevice::fromJsonObject(QJsonObject &pJson) {
|
SWGSamplingDevice::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&index, pJson["index"], "qint32", "");
|
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
|
||||||
::Swagger::setValue(&hw_type, pJson["hwType"], "QString", "QString");
|
::SWGSDRangel::setValue(&hw_type, pJson["hwType"], "QString", "QString");
|
||||||
::Swagger::setValue(&tx, pJson["tx"], "qint32", "");
|
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
|
||||||
::Swagger::setValue(&nb_streams, pJson["nbStreams"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_streams, pJson["nbStreams"], "qint32", "");
|
||||||
::Swagger::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||||
::Swagger::setValue(&sequence, pJson["sequence"], "qint32", "");
|
::SWGSDRangel::setValue(&sequence, pJson["sequence"], "qint32", "");
|
||||||
::Swagger::setValue(&serial, pJson["serial"], "QString", "QString");
|
::SWGSDRangel::setValue(&serial, pJson["serial"], "QString", "QString");
|
||||||
::Swagger::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", "");
|
||||||
::Swagger::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
|
::SWGSDRangel::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
|
||||||
::Swagger::setValue(&state, pJson["state"], "QString", "QString");
|
::SWGSDRangel::setValue(&state, pJson["state"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGSamplingDevice: public SWGObject {
|
class SWGSamplingDevice: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGUser::SWGUser(QString* json) {
|
SWGUser::SWGUser(QString* json) {
|
||||||
init();
|
init();
|
||||||
@ -61,8 +61,8 @@ SWGUser::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGUser::fromJsonObject(QJsonObject &pJson) {
|
SWGUser::fromJsonObject(QJsonObject &pJson) {
|
||||||
::Swagger::setValue(&index, pJson["index"], "qint32", "");
|
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
|
||||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "SWGObject.h"
|
#include "SWGObject.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Swagger {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWGUser: public SWGObject {
|
class SWGUser: public SWGObject {
|
||||||
public:
|
public:
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
BASEDIR=$(dirname "$0")
|
|
||||||
sed -i '1s/^/#include <QDateTime>\n/' ${BASEDIR}/../client/SWGHelpers.cpp
|
|
7
swagger/sdrangel/html2-config.json
Normal file
7
swagger/sdrangel/html2-config.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"perlModuleName": "SWGSDRangel",
|
||||||
|
"pythonPackageName": "swagger_sdrangel",
|
||||||
|
"packageName": "SWGSDRangel",
|
||||||
|
"invokerPackage": "SWGSDRangel",
|
||||||
|
"phpInvokerPackage": "SWGSDRangel"
|
||||||
|
}
|
3
swagger/sdrangel/python-config.json
Normal file
3
swagger/sdrangel/python-config.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"packageName": "swagger_sdrangel"
|
||||||
|
}
|
3
swagger/sdrangel/qt5cpp-config.json
Normal file
3
swagger/sdrangel/qt5cpp-config.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cppNamespace": "SWGSDRangel"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user