/** * 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 "SWGAudioDevice.h" #include "SWGHelpers.h" #include #include #include #include namespace SWGSDRangel { SWGAudioDevice::SWGAudioDevice(QString* json) { init(); this->fromJson(*json); } SWGAudioDevice::SWGAudioDevice() { init(); } SWGAudioDevice::~SWGAudioDevice() { this->cleanup(); } void SWGAudioDevice::init() { name = new QString(""); } void SWGAudioDevice::cleanup() { if(name != nullptr) { delete name; } } SWGAudioDevice* SWGAudioDevice::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); this->fromJsonObject(jsonObject); return this; } void SWGAudioDevice::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); } QString SWGAudioDevice::asJson () { QJsonObject* obj = this->asJsonObject(); QJsonDocument doc(*obj); QByteArray bytes = doc.toJson(); return QString(bytes); } QJsonObject* SWGAudioDevice::asJsonObject() { QJsonObject* obj = new QJsonObject(); toJsonValue(QString("name"), name, obj, QString("QString")); return obj; } QString* SWGAudioDevice::getName() { return name; } void SWGAudioDevice::setName(QString* name) { this->name = name; } }