mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-03-17 05:29:36 -04:00
REST API: added listening address and port to websocket spectrum server information. Generated code
This commit is contained in:
parent
a9bd87074d
commit
cd511ad104
@ -7323,6 +7323,12 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Boolean: 1: websocket spectrum server running 0: not running"
|
||||
},
|
||||
"listeningAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"listeningPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"clients" : {
|
||||
"type" : "array",
|
||||
"description" : "List of clients",
|
||||
@ -37239,7 +37245,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2020-05-05T14:20:39.487+02:00
|
||||
Generated 2020-05-06T16:46:35.280+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -7323,6 +7323,12 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Boolean: 1: websocket spectrum server running 0: not running"
|
||||
},
|
||||
"listeningAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"listeningPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"clients" : {
|
||||
"type" : "array",
|
||||
"description" : "List of clients",
|
||||
@ -37239,7 +37245,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2020-05-05T14:20:39.487+02:00
|
||||
Generated 2020-05-06T16:46:35.280+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -30,6 +30,10 @@ SWGSpectrumServer::SWGSpectrumServer(QString* json) {
|
||||
SWGSpectrumServer::SWGSpectrumServer() {
|
||||
run = 0;
|
||||
m_run_isSet = false;
|
||||
listening_address = nullptr;
|
||||
m_listening_address_isSet = false;
|
||||
listening_port = 0;
|
||||
m_listening_port_isSet = false;
|
||||
clients = nullptr;
|
||||
m_clients_isSet = false;
|
||||
}
|
||||
@ -42,6 +46,10 @@ void
|
||||
SWGSpectrumServer::init() {
|
||||
run = 0;
|
||||
m_run_isSet = false;
|
||||
listening_address = new QString("");
|
||||
m_listening_address_isSet = false;
|
||||
listening_port = 0;
|
||||
m_listening_port_isSet = false;
|
||||
clients = new QList<SWGSpectrumServer_clients*>();
|
||||
m_clients_isSet = false;
|
||||
}
|
||||
@ -49,6 +57,10 @@ SWGSpectrumServer::init() {
|
||||
void
|
||||
SWGSpectrumServer::cleanup() {
|
||||
|
||||
if(listening_address != nullptr) {
|
||||
delete listening_address;
|
||||
}
|
||||
|
||||
if(clients != nullptr) {
|
||||
auto arr = clients;
|
||||
for(auto o: *arr) {
|
||||
@ -71,6 +83,10 @@ void
|
||||
SWGSpectrumServer::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&run, pJson["run"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&listening_address, pJson["listeningAddress"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&listening_port, pJson["listeningPort"], "qint32", "");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&clients, pJson["clients"], "QList", "SWGSpectrumServer_clients");
|
||||
}
|
||||
@ -92,6 +108,12 @@ SWGSpectrumServer::asJsonObject() {
|
||||
if(m_run_isSet){
|
||||
obj->insert("run", QJsonValue(run));
|
||||
}
|
||||
if(listening_address != nullptr && *listening_address != QString("")){
|
||||
toJsonValue(QString("listeningAddress"), listening_address, obj, QString("QString"));
|
||||
}
|
||||
if(m_listening_port_isSet){
|
||||
obj->insert("listeningPort", QJsonValue(listening_port));
|
||||
}
|
||||
if(clients && clients->size() > 0){
|
||||
toJsonArray((QList<void*>*)clients, obj, "clients", "SWGSpectrumServer_clients");
|
||||
}
|
||||
@ -109,6 +131,26 @@ SWGSpectrumServer::setRun(qint32 run) {
|
||||
this->m_run_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSpectrumServer::getListeningAddress() {
|
||||
return listening_address;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer::setListeningAddress(QString* listening_address) {
|
||||
this->listening_address = listening_address;
|
||||
this->m_listening_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSpectrumServer::getListeningPort() {
|
||||
return listening_port;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer::setListeningPort(qint32 listening_port) {
|
||||
this->listening_port = listening_port;
|
||||
this->m_listening_port_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGSpectrumServer_clients*>*
|
||||
SWGSpectrumServer::getClients() {
|
||||
return clients;
|
||||
@ -127,6 +169,12 @@ SWGSpectrumServer::isSet(){
|
||||
if(m_run_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(listening_address && *listening_address != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_listening_port_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(clients && (clients->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
#include "SWGSpectrumServer_clients.h"
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
@ -46,6 +47,12 @@ public:
|
||||
qint32 getRun();
|
||||
void setRun(qint32 run);
|
||||
|
||||
QString* getListeningAddress();
|
||||
void setListeningAddress(QString* listening_address);
|
||||
|
||||
qint32 getListeningPort();
|
||||
void setListeningPort(qint32 listening_port);
|
||||
|
||||
QList<SWGSpectrumServer_clients*>* getClients();
|
||||
void setClients(QList<SWGSpectrumServer_clients*>* clients);
|
||||
|
||||
@ -56,6 +63,12 @@ private:
|
||||
qint32 run;
|
||||
bool m_run_isSet;
|
||||
|
||||
QString* listening_address;
|
||||
bool m_listening_address_isSet;
|
||||
|
||||
qint32 listening_port;
|
||||
bool m_listening_port_isSet;
|
||||
|
||||
QList<SWGSpectrumServer_clients*>* clients;
|
||||
bool m_clients_isSet;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user