From 036432ae58645715f849f604bae08184c834e339 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 25 Nov 2017 05:28:43 +0100 Subject: [PATCH] Web API: added missing files --- .../code/qt5/client/SWGDVSerialDevice.cpp | 95 +++++++++++++++++++ .../code/qt5/client/SWGDVSerialDevice.h | 55 +++++++++++ 2 files changed, 150 insertions(+) create mode 100644 swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.h diff --git a/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.cpp b/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.cpp new file mode 100644 index 000000000..15de050e1 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.cpp @@ -0,0 +1,95 @@ +/** + * 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 "SWGDVSerialDevice.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + +SWGDVSerialDevice::SWGDVSerialDevice(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDVSerialDevice::SWGDVSerialDevice() { + init(); +} + +SWGDVSerialDevice::~SWGDVSerialDevice() { + this->cleanup(); +} + +void +SWGDVSerialDevice::init() { + device_name = new QString(""); +} + +void +SWGDVSerialDevice::cleanup() { + + if(device_name != nullptr) { + delete device_name; + } +} + +SWGDVSerialDevice* +SWGDVSerialDevice::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDVSerialDevice::fromJsonObject(QJsonObject &pJson) { + ::Swagger::setValue(&device_name, pJson["deviceName"], "QString", "QString"); +} + +QString +SWGDVSerialDevice::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGDVSerialDevice::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + toJsonValue(QString("deviceName"), device_name, obj, QString("QString")); + + return obj; +} + +QString* +SWGDVSerialDevice::getDeviceName() { + return device_name; +} +void +SWGDVSerialDevice::setDeviceName(QString* device_name) { + this->device_name = device_name; +} + + +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.h b/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.h new file mode 100644 index 000000000..7c19ee2f2 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDVSerialDevice.h @@ -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. + */ + +/* + * SWGDVSerialDevice.h + * + * DV serial device details + */ + +#ifndef SWGDVSerialDevice_H_ +#define SWGDVSerialDevice_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGDVSerialDevice: public SWGObject { +public: + SWGDVSerialDevice(); + SWGDVSerialDevice(QString* json); + virtual ~SWGDVSerialDevice(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGDVSerialDevice* fromJson(QString &jsonString); + + QString* getDeviceName(); + void setDeviceName(QString* device_name); + + +private: + QString* device_name; +}; + +} + +#endif /* SWGDVSerialDevice_H_ */