|
|
|
|
@ -8,18 +8,6 @@
@@ -8,18 +8,6 @@
|
|
|
|
|
* 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. |
|
|
|
|
* |
|
|
|
|
* 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. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#include "SWGDefaultApi.h" |
|
|
|
|
@ -30,6 +18,7 @@
@@ -30,6 +18,7 @@
|
|
|
|
|
#include <QJsonDocument> |
|
|
|
|
|
|
|
|
|
namespace Swagger { |
|
|
|
|
|
|
|
|
|
SWGDefaultApi::SWGDefaultApi() {} |
|
|
|
|
|
|
|
|
|
SWGDefaultApi::~SWGDefaultApi() {} |
|
|
|
|
@ -49,10 +38,14 @@ SWGDefaultApi::instanceAudioGet() {
@@ -49,10 +38,14 @@ SWGDefaultApi::instanceAudioGet() {
|
|
|
|
|
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, |
|
|
|
|
@ -64,6 +57,9 @@ SWGDefaultApi::instanceAudioGet() {
@@ -64,6 +57,9 @@ SWGDefaultApi::instanceAudioGet() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceAudioGetCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -71,16 +67,15 @@ SWGDefaultApi::instanceAudioGetCallback(HttpRequestWorker * worker) {
@@ -71,16 +67,15 @@ SWGDefaultApi::instanceAudioGetCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGAudioDevices* output = static_cast<SWGAudioDevices*>(create(json, QString("SWGAudioDevices"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGAudioDevices* output = static_cast<SWGAudioDevices*>(create(json, QString("SWGAudioDevices"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceAudioGetSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceAudioGetSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -91,12 +86,16 @@ SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
@@ -91,12 +86,16 @@ SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "PATCH"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, |
|
|
|
|
@ -108,6 +107,9 @@ SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
@@ -108,6 +107,9 @@ SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceAudioPatchCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -115,16 +117,15 @@ SWGDefaultApi::instanceAudioPatchCallback(HttpRequestWorker * worker) {
@@ -115,16 +117,15 @@ SWGDefaultApi::instanceAudioPatchCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGAudioDevicesSelect* output = static_cast<SWGAudioDevicesSelect*>(create(json, QString("SWGAudioDevicesSelect"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGAudioDevicesSelect* output = static_cast<SWGAudioDevicesSelect*>(create(json, QString("SWGAudioDevicesSelect"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceAudioPatchSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceAudioPatchSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceChannels(bool tx) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -143,10 +144,14 @@ SWGDefaultApi::instanceChannels(bool tx) {
@@ -143,10 +144,14 @@ SWGDefaultApi::instanceChannels(bool tx) {
|
|
|
|
|
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, |
|
|
|
|
@ -158,6 +163,9 @@ SWGDefaultApi::instanceChannels(bool tx) {
@@ -158,6 +163,9 @@ SWGDefaultApi::instanceChannels(bool tx) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceChannelsCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -165,16 +173,15 @@ SWGDefaultApi::instanceChannelsCallback(HttpRequestWorker * worker) {
@@ -165,16 +173,15 @@ SWGDefaultApi::instanceChannelsCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceChannelsResponse* output = static_cast<SWGInstanceChannelsResponse*>(create(json, QString("SWGInstanceChannelsResponse"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceChannelsResponse* output = static_cast<SWGInstanceChannelsResponse*>(create(json, QString("SWGInstanceChannelsResponse"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceChannelsSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceChannelsSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDVSerialPatch(bool dvserial) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -193,10 +200,14 @@ SWGDefaultApi::instanceDVSerialPatch(bool dvserial) {
@@ -193,10 +200,14 @@ SWGDefaultApi::instanceDVSerialPatch(bool dvserial) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "PATCH"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(QString key, this->defaultHeaders.keys()) { |
|
|
|
|
input.headers.insert(key, this->defaultHeaders.value(key)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
connect(worker, |
|
|
|
|
&HttpRequestWorker::on_execution_finished, |
|
|
|
|
this, |
|
|
|
|
@ -208,6 +219,9 @@ SWGDefaultApi::instanceDVSerialPatch(bool dvserial) {
@@ -208,6 +219,9 @@ SWGDefaultApi::instanceDVSerialPatch(bool dvserial) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDVSerialPatchCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -215,16 +229,15 @@ SWGDefaultApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) {
@@ -215,16 +229,15 @@ SWGDefaultApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDVSeralDevices* output = static_cast<SWGDVSeralDevices*>(create(json, QString("SWGDVSeralDevices"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDVSeralDevices* output = static_cast<SWGDVSeralDevices*>(create(json, QString("SWGDVSeralDevices"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceDVSerialPatchSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceDVSerialPatchSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsDelete() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -235,10 +248,14 @@ SWGDefaultApi::instanceDeviceSetsDelete() {
@@ -235,10 +248,14 @@ SWGDefaultApi::instanceDeviceSetsDelete() {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "DELETE"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(QString key, this->defaultHeaders.keys()) { |
|
|
|
|
input.headers.insert(key, this->defaultHeaders.value(key)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
connect(worker, |
|
|
|
|
&HttpRequestWorker::on_execution_finished, |
|
|
|
|
this, |
|
|
|
|
@ -250,6 +267,9 @@ SWGDefaultApi::instanceDeviceSetsDelete() {
@@ -250,6 +267,9 @@ SWGDefaultApi::instanceDeviceSetsDelete() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsDeleteCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -257,16 +277,15 @@ SWGDefaultApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) {
@@ -257,16 +277,15 @@ SWGDefaultApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSetList* output = static_cast<SWGDeviceSetList*>(create(json, QString("SWGDeviceSetList"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSetList* output = static_cast<SWGDeviceSetList*>(create(json, QString("SWGDeviceSetList"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsDeleteSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsDeleteSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsGet() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -277,10 +296,14 @@ SWGDefaultApi::instanceDeviceSetsGet() {
@@ -277,10 +296,14 @@ SWGDefaultApi::instanceDeviceSetsGet() {
|
|
|
|
|
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, |
|
|
|
|
@ -292,6 +315,9 @@ SWGDefaultApi::instanceDeviceSetsGet() {
@@ -292,6 +315,9 @@ SWGDefaultApi::instanceDeviceSetsGet() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsGetCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -299,16 +325,15 @@ SWGDefaultApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) {
@@ -299,16 +325,15 @@ SWGDefaultApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSetList* output = static_cast<SWGDeviceSetList*>(create(json, QString("SWGDeviceSetList"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSetList* output = static_cast<SWGDeviceSetList*>(create(json, QString("SWGDeviceSetList"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsGetSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsGetSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsPost(bool tx) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -327,10 +352,14 @@ SWGDefaultApi::instanceDeviceSetsPost(bool tx) {
@@ -327,10 +352,14 @@ SWGDefaultApi::instanceDeviceSetsPost(bool tx) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "POST"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(QString key, this->defaultHeaders.keys()) { |
|
|
|
|
input.headers.insert(key, this->defaultHeaders.value(key)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
connect(worker, |
|
|
|
|
&HttpRequestWorker::on_execution_finished, |
|
|
|
|
this, |
|
|
|
|
@ -342,6 +371,9 @@ SWGDefaultApi::instanceDeviceSetsPost(bool tx) {
@@ -342,6 +371,9 @@ SWGDefaultApi::instanceDeviceSetsPost(bool tx) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDeviceSetsPostCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -349,16 +381,15 @@ SWGDefaultApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) {
@@ -349,16 +381,15 @@ SWGDefaultApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSet* output = static_cast<SWGDeviceSet*>(create(json, QString("SWGDeviceSet"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGDeviceSet* output = static_cast<SWGDeviceSet*>(create(json, QString("SWGDeviceSet"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsPostSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceDeviceSetsPostSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDevices(bool tx) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -377,10 +408,14 @@ SWGDefaultApi::instanceDevices(bool tx) {
@@ -377,10 +408,14 @@ SWGDefaultApi::instanceDevices(bool tx) {
|
|
|
|
|
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, |
|
|
|
|
@ -392,6 +427,9 @@ SWGDefaultApi::instanceDevices(bool tx) {
@@ -392,6 +427,9 @@ SWGDefaultApi::instanceDevices(bool tx) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceDevicesCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -399,16 +437,15 @@ SWGDefaultApi::instanceDevicesCallback(HttpRequestWorker * worker) {
@@ -399,16 +437,15 @@ SWGDefaultApi::instanceDevicesCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceDevicesResponse* output = static_cast<SWGInstanceDevicesResponse*>(create(json, QString("SWGInstanceDevicesResponse"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceDevicesResponse* output = static_cast<SWGInstanceDevicesResponse*>(create(json, QString("SWGInstanceDevicesResponse"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceDevicesSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceDevicesSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLocationGet() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -419,10 +456,14 @@ SWGDefaultApi::instanceLocationGet() {
@@ -419,10 +456,14 @@ SWGDefaultApi::instanceLocationGet() {
|
|
|
|
|
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, |
|
|
|
|
@ -434,6 +475,9 @@ SWGDefaultApi::instanceLocationGet() {
@@ -434,6 +475,9 @@ SWGDefaultApi::instanceLocationGet() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLocationGetCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -441,16 +485,15 @@ SWGDefaultApi::instanceLocationGetCallback(HttpRequestWorker * worker) {
@@ -441,16 +485,15 @@ SWGDefaultApi::instanceLocationGetCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLocationInformation* output = static_cast<SWGLocationInformation*>(create(json, QString("SWGLocationInformation"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLocationInformation* output = static_cast<SWGLocationInformation*>(create(json, QString("SWGLocationInformation"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceLocationGetSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceLocationGetSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -461,12 +504,16 @@ SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
@@ -461,12 +504,16 @@ SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
|
|
|
|
|
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, |
|
|
|
|
@ -478,6 +525,9 @@ SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
@@ -478,6 +525,9 @@ SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLocationPutCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -485,16 +535,15 @@ SWGDefaultApi::instanceLocationPutCallback(HttpRequestWorker * worker) {
@@ -485,16 +535,15 @@ SWGDefaultApi::instanceLocationPutCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLocationInformation* output = static_cast<SWGLocationInformation*>(create(json, QString("SWGLocationInformation"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLocationInformation* output = static_cast<SWGLocationInformation*>(create(json, QString("SWGLocationInformation"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceLocationPutSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceLocationPutSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLoggingGet() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -505,10 +554,14 @@ SWGDefaultApi::instanceLoggingGet() {
@@ -505,10 +554,14 @@ SWGDefaultApi::instanceLoggingGet() {
|
|
|
|
|
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, |
|
|
|
|
@ -520,6 +573,9 @@ SWGDefaultApi::instanceLoggingGet() {
@@ -520,6 +573,9 @@ SWGDefaultApi::instanceLoggingGet() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLoggingGetCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -527,16 +583,15 @@ SWGDefaultApi::instanceLoggingGetCallback(HttpRequestWorker * worker) {
@@ -527,16 +583,15 @@ SWGDefaultApi::instanceLoggingGetCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLoggingInfo* output = static_cast<SWGLoggingInfo*>(create(json, QString("SWGLoggingInfo"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLoggingInfo* output = static_cast<SWGLoggingInfo*>(create(json, QString("SWGLoggingInfo"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceLoggingGetSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceLoggingGetSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -547,12 +602,16 @@ SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
@@ -547,12 +602,16 @@ SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
|
|
|
|
|
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, |
|
|
|
|
@ -564,6 +623,9 @@ SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
@@ -564,6 +623,9 @@ SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceLoggingPutCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -571,16 +633,15 @@ SWGDefaultApi::instanceLoggingPutCallback(HttpRequestWorker * worker) {
@@ -571,16 +633,15 @@ SWGDefaultApi::instanceLoggingPutCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLoggingInfo* output = static_cast<SWGLoggingInfo*>(create(json, QString("SWGLoggingInfo"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGLoggingInfo* output = static_cast<SWGLoggingInfo*>(create(json, QString("SWGLoggingInfo"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceLoggingPutSignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceLoggingPutSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -591,12 +652,16 @@ SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
@@ -591,12 +652,16 @@ SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "DELETE"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, |
|
|
|
|
@ -608,6 +673,9 @@ SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
@@ -608,6 +673,9 @@ SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetDeleteCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -615,16 +683,15 @@ SWGDefaultApi::instancePresetDeleteCallback(HttpRequestWorker * worker) {
@@ -615,16 +683,15 @@ SWGDefaultApi::instancePresetDeleteCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instancePresetDeleteSignal(output); |
|
|
|
|
|
|
|
|
|
emit instancePresetDeleteSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetGet() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -635,10 +702,14 @@ SWGDefaultApi::instancePresetGet() {
@@ -635,10 +702,14 @@ SWGDefaultApi::instancePresetGet() {
|
|
|
|
|
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, |
|
|
|
|
@ -650,6 +721,9 @@ SWGDefaultApi::instancePresetGet() {
@@ -650,6 +721,9 @@ SWGDefaultApi::instancePresetGet() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetGetCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -657,16 +731,15 @@ SWGDefaultApi::instancePresetGetCallback(HttpRequestWorker * worker) {
@@ -657,16 +731,15 @@ SWGDefaultApi::instancePresetGetCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresets* output = static_cast<SWGPresets*>(create(json, QString("SWGPresets"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresets* output = static_cast<SWGPresets*>(create(json, QString("SWGPresets"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instancePresetGetSignal(output); |
|
|
|
|
|
|
|
|
|
emit instancePresetGetSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -677,12 +750,16 @@ SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
@@ -677,12 +750,16 @@ SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "PATCH"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, |
|
|
|
|
@ -694,6 +771,9 @@ SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
@@ -694,6 +771,9 @@ SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPatchCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -701,16 +781,15 @@ SWGDefaultApi::instancePresetPatchCallback(HttpRequestWorker * worker) {
@@ -701,16 +781,15 @@ SWGDefaultApi::instancePresetPatchCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instancePresetPatchSignal(output); |
|
|
|
|
|
|
|
|
|
emit instancePresetPatchSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -721,12 +800,16 @@ SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
@@ -721,12 +800,16 @@ SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
|
|
|
|
|
HttpRequestWorker *worker = new HttpRequestWorker(); |
|
|
|
|
HttpRequestInput input(fullPath, "POST"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, |
|
|
|
|
@ -738,6 +821,9 @@ SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
@@ -738,6 +821,9 @@ SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPostCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -745,16 +831,15 @@ SWGDefaultApi::instancePresetPostCallback(HttpRequestWorker * worker) {
@@ -745,16 +831,15 @@ SWGDefaultApi::instancePresetPostCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instancePresetPostSignal(output); |
|
|
|
|
|
|
|
|
|
emit instancePresetPostSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -765,12 +850,16 @@ SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
@@ -765,12 +850,16 @@ SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
|
|
|
|
|
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, |
|
|
|
|
@ -782,6 +871,9 @@ SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
@@ -782,6 +871,9 @@ SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instancePresetPutCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -789,16 +881,15 @@ SWGDefaultApi::instancePresetPutCallback(HttpRequestWorker * worker) {
@@ -789,16 +881,15 @@ SWGDefaultApi::instancePresetPutCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGPresetIdentifier* output = static_cast<SWGPresetIdentifier*>(create(json, QString("SWGPresetIdentifier"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instancePresetPutSignal(output); |
|
|
|
|
|
|
|
|
|
emit instancePresetPutSignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceSummary() { |
|
|
|
|
QString fullPath; |
|
|
|
|
@ -809,10 +900,14 @@ SWGDefaultApi::instanceSummary() {
@@ -809,10 +900,14 @@ SWGDefaultApi::instanceSummary() {
|
|
|
|
|
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, |
|
|
|
|
@ -824,6 +919,9 @@ SWGDefaultApi::instanceSummary() {
@@ -824,6 +919,9 @@ SWGDefaultApi::instanceSummary() {
|
|
|
|
|
void |
|
|
|
|
SWGDefaultApi::instanceSummaryCallback(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()); |
|
|
|
|
} |
|
|
|
|
@ -831,14 +929,14 @@ SWGDefaultApi::instanceSummaryCallback(HttpRequestWorker * worker) {
@@ -831,14 +929,14 @@ SWGDefaultApi::instanceSummaryCallback(HttpRequestWorker * worker) {
|
|
|
|
|
msg = "Error: " + worker->error_str; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceSummaryResponse* output = static_cast<SWGInstanceSummaryResponse*>(create(json, QString("SWGInstanceSummaryResponse"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString json(worker->response); |
|
|
|
|
SWGInstanceSummaryResponse* output = static_cast<SWGInstanceSummaryResponse*>(create(json, QString("SWGInstanceSummaryResponse"))); |
|
|
|
|
worker->deleteLater(); |
|
|
|
|
|
|
|
|
|
emit instanceSummarySignal(output); |
|
|
|
|
|
|
|
|
|
emit instanceSummarySignalE(output, error_type, error_str); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} /* namespace Swagger */ |
|
|
|
|
|