From b0eb838f151b8102a73bb6b4d605bbc5de803e75 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 17 Nov 2017 03:17:15 +0100 Subject: [PATCH] Added Swagger generated code and skeleton of webapi --- CMakeLists.txt | 1 + sdrbase/CMakeLists.txt | 10 +- sdrbase/webapi/webapiadapterinterface.h | 39 + sdrbase/webapi/webapirequestmapper.cpp | 41 + sdrbase/webapi/webapirequestmapper.h | 38 + swagger/CMakeLists.txt | 36 + swagger/sdrangel/api/swagger/swagger.yaml | 4 + .../code/html2/.swagger-codegen-ignore | 23 + swagger/sdrangel/code/html2/LICENSE | 201 + swagger/sdrangel/code/html2/index.html | 10051 ++++++++++++++++ .../sdrangel/code/qt5/.swagger-codegen-ignore | 23 + swagger/sdrangel/code/qt5/LICENSE | 201 + .../code/qt5/client/SWGAudioDevices.cpp | 170 + .../code/qt5/client/SWGAudioDevices.h | 76 + .../code/qt5/client/SWGAudioDevicesSelect.cpp | 130 + .../code/qt5/client/SWGAudioDevicesSelect.h | 69 + .../sdrangel/code/qt5/client/SWGChannel.cpp | 137 + swagger/sdrangel/code/qt5/client/SWGChannel.h | 72 + .../code/qt5/client/SWGChannelListItem.cpp | 162 + .../code/qt5/client/SWGChannelListItem.h | 75 + .../code/qt5/client/SWGDVSeralDevices.cpp | 131 + .../code/qt5/client/SWGDVSeralDevices.h | 70 + .../code/qt5/client/SWGDefaultApi.cpp | 844 ++ .../sdrangel/code/qt5/client/SWGDefaultApi.h | 121 + .../code/qt5/client/SWGDeviceListItem.cpp | 182 + .../code/qt5/client/SWGDeviceListItem.h | 81 + .../sdrangel/code/qt5/client/SWGDeviceSet.cpp | 150 + .../sdrangel/code/qt5/client/SWGDeviceSet.h | 74 + .../code/qt5/client/SWGDeviceSetList.cpp | 131 + .../code/qt5/client/SWGDeviceSetList.h | 70 + .../code/qt5/client/SWGErrorResponse.cpp | 111 + .../code/qt5/client/SWGErrorResponse.h | 66 + .../sdrangel/code/qt5/client/SWGHelpers.cpp | 305 + swagger/sdrangel/code/qt5/client/SWGHelpers.h | 41 + .../code/qt5/client/SWGHttpRequest.cpp | 323 + .../sdrangel/code/qt5/client/SWGHttpRequest.h | 99 + .../client/SWGInstanceChannelsResponse.cpp | 131 + .../qt5/client/SWGInstanceChannelsResponse.h | 70 + .../qt5/client/SWGInstanceDevicesResponse.cpp | 131 + .../qt5/client/SWGInstanceDevicesResponse.h | 70 + .../qt5/client/SWGInstanceSummaryResponse.cpp | 168 + .../qt5/client/SWGInstanceSummaryResponse.h | 78 + .../qt5/client/SWGLocationInformation.cpp | 118 + .../code/qt5/client/SWGLocationInformation.h | 68 + .../code/qt5/client/SWGLoggingInfo.cpp | 162 + .../sdrangel/code/qt5/client/SWGLoggingInfo.h | 75 + .../code/qt5/client/SWGModelFactory.h | 133 + swagger/sdrangel/code/qt5/client/SWGObject.h | 48 + .../code/qt5/client/SWGPresetGroup.cpp | 150 + .../sdrangel/code/qt5/client/SWGPresetGroup.h | 74 + .../code/qt5/client/SWGPresetIdentifier.cpp | 162 + .../code/qt5/client/SWGPresetIdentifier.h | 75 + .../code/qt5/client/SWGPresetItem.cpp | 143 + .../sdrangel/code/qt5/client/SWGPresetItem.h | 72 + .../code/qt5/client/SWGPresetTransfer.cpp | 124 + .../code/qt5/client/SWGPresetTransfer.h | 69 + .../sdrangel/code/qt5/client/SWGPresets.cpp | 131 + swagger/sdrangel/code/qt5/client/SWGPresets.h | 70 + .../code/qt5/client/SWGSamplingDevice.cpp | 221 + .../code/qt5/client/SWGSamplingDevice.h | 90 + swagger/sdrangel/code/qt5/client/SWGUser.cpp | 124 + swagger/sdrangel/code/qt5/client/SWGUser.h | 69 + swagger/sdrangel/code/qt5/fix/fixhelper.sh | 2 + 63 files changed, 17185 insertions(+), 1 deletion(-) create mode 100644 sdrbase/webapi/webapiadapterinterface.h create mode 100644 sdrbase/webapi/webapirequestmapper.cpp create mode 100644 sdrbase/webapi/webapirequestmapper.h create mode 100644 swagger/CMakeLists.txt create mode 100644 swagger/sdrangel/code/html2/.swagger-codegen-ignore create mode 100644 swagger/sdrangel/code/html2/LICENSE create mode 100644 swagger/sdrangel/code/html2/index.html create mode 100644 swagger/sdrangel/code/qt5/.swagger-codegen-ignore create mode 100644 swagger/sdrangel/code/qt5/LICENSE create mode 100644 swagger/sdrangel/code/qt5/client/SWGAudioDevices.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGAudioDevices.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannel.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannel.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGChannelListItem.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDefaultApi.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDefaultApi.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceListItem.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceListItem.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceSet.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceSet.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceSetList.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGDeviceSetList.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGErrorResponse.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGErrorResponse.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGHelpers.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGHelpers.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGHttpRequest.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGLocationInformation.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGLocationInformation.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGLoggingInfo.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGLoggingInfo.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGModelFactory.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGObject.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetGroup.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetGroup.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetItem.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetItem.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetTransfer.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresetTransfer.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresets.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGPresets.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSamplingDevice.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSamplingDevice.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGUser.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGUser.h create mode 100755 swagger/sdrangel/code/qt5/fix/fixhelper.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 46efabf32..5275d71cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,6 +190,7 @@ add_subdirectory(sdrbase) add_subdirectory(sdrgui) add_subdirectory(httpserver) add_subdirectory(logging) +add_subdirectory(swagger) include_directories( ${CMAKE_CURRENT_BINARY_DIR} diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index 38a5e8e2e..199dd4428 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -63,7 +63,9 @@ set(sdrbase_SOURCES plugin/plugininterface.cpp plugin/pluginapi.cpp - plugin/pluginmanager.cpp + plugin/pluginmanager.cpp + + webapi/webapirequestmapper.cpp ) set(sdrbase_HEADERS @@ -150,6 +152,9 @@ set(sdrbase_HEADERS util/samplesourceserializer.h util/simpleserializer.h #util/spinlock.h + + webapi/webapiadapterinterface.h + webapi/webapirequestmapper.h ) set(sdrbase_SOURCES @@ -222,10 +227,13 @@ add_library(sdrbase SHARED include_directories( ${CMAKE_CURRENT_BINARY_DIR} . + ${CMAKE_SOURCE_DIR}/httpserver + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ) target_link_libraries(sdrbase ${QT_LIBRARIES} + httpserver ) if(FFTW3F_FOUND) diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h new file mode 100644 index 000000000..f03fce2d7 --- /dev/null +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2017 Edouard Griffiths, F4EXB. // +// // +// Swagger server adapter interface // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef SDRBASE_WEBAPI_WEBAPIADAPTERINTERFACE_H_ +#define SDRBASE_WEBAPI_WEBAPIADAPTERINTERFACE_H_ + +#include "SWGInstanceSummaryResponse.h" +#include "SWGErrorResponse.h" +#include "SWGErrorResponse.h" + +class WebAPIAdapterInterface +{ +public: + virtual ~WebAPIAdapterInterface() {} + + virtual int instanceSummary( + Swagger::SWGInstanceSummaryResponse& response __attribute__((unused)), + Swagger::SWGErrorResponse& error __attribute__((unused))) + { return 0; } +}; + + + +#endif /* SDRBASE_WEBAPI_WEBAPIADAPTERINTERFACE_H_ */ diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp new file mode 100644 index 000000000..db9fdd5b6 --- /dev/null +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2017 Edouard Griffiths, F4EXB. // +// // +// Swagger server adapter interface // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#include "webapirequestmapper.h" + +WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) : + HttpRequestHandler(parent), + m_adapter(0) +{ } + +void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response __attribute__((unused))) +{ + if (m_adapter == 0) // format service unavailable if adapter is null + { + + } + else // normal processing + { + QByteArray path=request.getPath(); + + if (path == "/sdrangel") + { + + } + } +} diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h new file mode 100644 index 000000000..e3404c868 --- /dev/null +++ b/sdrbase/webapi/webapirequestmapper.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2017 Edouard Griffiths, F4EXB. // +// // +// Swagger server adapter interface // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef SDRBASE_WEBAPI_WEBAPIREQUESTMAPPER_H_ +#define SDRBASE_WEBAPI_WEBAPIREQUESTMAPPER_H_ + +#include "httprequesthandler.h" +#include "httprequest.h" +#include "httpresponse.h" +#include "webapiadapterinterface.h" + +class WebAPIRequestMapper : public qtwebapp::HttpRequestHandler { + Q_OBJECT +public: + WebAPIRequestMapper(QObject* parent=0); + void service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void setAdapter(WebAPIAdapterInterface *adapter) { m_adapter = adapter; } + +private: + WebAPIAdapterInterface *m_adapter; +}; + +#endif /* SDRBASE_WEBAPI_WEBAPIREQUESTMAPPER_H_ */ diff --git a/swagger/CMakeLists.txt b/swagger/CMakeLists.txt new file mode 100644 index 000000000..328839492 --- /dev/null +++ b/swagger/CMakeLists.txt @@ -0,0 +1,36 @@ +project (swagger) + +file(GLOB swagger_SOURCES + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client/*.cpp +) + +file(GLOB swagger_HEADERS + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client/*.h +) + +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_SHARED) + +add_library(swagger SHARED + ${swagger_SOURCES} + ${swagger_HEADERS_MOC} +) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + . + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client +) + +set_target_properties(swagger PROPERTIES COMPILE_FLAGS "-Wno-conversion-null -Wno-unused-variable -Wno-unused-parameter") + +target_link_libraries(swagger + ${QT_LIBRARIES} +) + +set_target_properties(swagger PROPERTIES DEFINE_SYMBOL "sdrangel_EXPORTS") +target_compile_features(sdrbase PRIVATE cxx_generalized_initializers) # cmake >= 3.1.0 + +qt5_use_modules(swagger Core Network) + +install(TARGETS swagger DESTINATION lib) diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 1fb4469c4..fc64ab7a2 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -594,9 +594,11 @@ definitions: latitude: description: "Lautitude in decimal degrees positive to the north" type: number + format: float longitude: description: "Longitude in decimal degrees positive to the east" type: number + format: float DVSeralDevices: description: "List of DV serial devices available in the system" required: @@ -652,6 +654,7 @@ definitions: centerFrequency: description: "Center freqeuency in MHz" type: number + format: float type: description: "Type of device set (R: Rx, T: Tx)" type: string @@ -668,6 +671,7 @@ definitions: centerFrequency: description: "Center freqeuency in MHz" type: number + format: float type: description: "Type of device set (R: Rx, T: Tx)" type: string diff --git a/swagger/sdrangel/code/html2/.swagger-codegen-ignore b/swagger/sdrangel/code/html2/.swagger-codegen-ignore new file mode 100644 index 000000000..c5fa491b4 --- /dev/null +++ b/swagger/sdrangel/code/html2/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/swagger/sdrangel/code/html2/LICENSE b/swagger/sdrangel/code/html2/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/swagger/sdrangel/code/html2/LICENSE @@ -0,0 +1,201 @@ + 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. diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html new file mode 100644 index 000000000..14f1dfe12 --- /dev/null +++ b/swagger/sdrangel/code/html2/index.html @@ -0,0 +1,10051 @@ + + + + + SDRangel + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+

SDRangel

+
+
+
+ +
+ + +
+

Default

+ + + + + + + +
+ +
+
+

instanceAudioGet

+
+
+ +
+
+ +

+

Get audio devices list available to this instance

+

+
+ +
/sdrangel/audio
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/audio"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            AudioDevices result = apiInstance.instanceAudioGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            AudioDevices result = apiInstance.instanceAudioGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceAudioGetWithCompletionHandler: 
+              ^(AudioDevices output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceAudioGet(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceAudioGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                AudioDevices result = apiInstance.instanceAudioGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceAudioGet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceAudioGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceAudioGet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceAudioPatch

+
+
+ +
+
+ +

+

Set audio devices

+

+
+ +
/sdrangel/audio
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X patch -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/audio"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        AudioDevicesSelect body = ; // AudioDevicesSelect | Select audio devices to use for this instance
+        try {
+            AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        AudioDevicesSelect body = ; // AudioDevicesSelect | Select audio devices to use for this instance
+        try {
+            AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceAudioPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+AudioDevicesSelect *body = ; // Select audio devices to use for this instance
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceAudioPatchWith:body
+              completionHandler: ^(AudioDevicesSelect output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {AudioDevicesSelect} Select audio devices to use for this instance
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceAudioPatch(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceAudioPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new AudioDevicesSelect(); // AudioDevicesSelect | Select audio devices to use for this instance
+
+            try
+            {
+                AudioDevicesSelect result = apiInstance.instanceAudioPatch(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceAudioPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceAudioPatch($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceAudioPatch: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceChannels

+
+
+ +
+
+ +

+

Get a list of channel plugins available in this instance

+

+
+ +
/sdrangel/channels
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/channels?tx="
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx channels
+        try {
+            InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceChannels");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx channels
+        try {
+            InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceChannels");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+Boolean *tx = true; // Set to true for Tx channels (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceChannelsWith:tx
+              completionHandler: ^(InstanceChannelsResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for Tx channels
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceChannels(opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceChannelsExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for Tx channels (optional) 
+
+            try
+            {
+                InstanceChannelsResponse result = apiInstance.instanceChannels(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceChannels: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceChannels($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceChannels: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + +
Query parameters
+ + + + + + + + + + +
NameDescription
tx + + + +
+
+ +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceDVSerialPatch

+
+
+ +
+
+ +

+

Set or reset DV serial processing for AMBE frames decoding in digital voice modes

+

+
+ +
/sdrangel/dvserial
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X patch -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/dvserial?dvserial="
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean dvserial = true; // Boolean | Set to true to set DV serial processing
+        try {
+            DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDVSerialPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean dvserial = true; // Boolean | Set to true to set DV serial processing
+        try {
+            DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDVSerialPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+Boolean *dvserial = true; // Set to true to set DV serial processing (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDVSerialPatchWith:dvserial
+              completionHandler: ^(DVSeralDevices output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var opts = { 
+  'dvserial': true // {Boolean} Set to true to set DV serial processing
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDVSerialPatch(opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceDVSerialPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var dvserial = true;  // Boolean | Set to true to set DV serial processing (optional) 
+
+            try
+            {
+                DVSeralDevices result = apiInstance.instanceDVSerialPatch(dvserial);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDVSerialPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceDVSerialPatch($dvserial);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDVSerialPatch: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + +
Query parameters
+ + + + + + + + + + +
NameDescription
dvserial + + + +
+
+ +

Responses

+ +

Status: 200 - On success return list of devices or empty list if unset

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceDeviceSetsDelete

+
+
+ +
+
+ +

+

Remove last device set

+

+
+ +
/sdrangel/devicesets
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/devicesets"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsDeleteWithCompletionHandler: 
+              ^(DeviceSetList output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsDelete(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceDeviceSetsDeleteExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                DeviceSetList result = apiInstance.instanceDeviceSetsDelete();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsDelete: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceDeviceSetsDelete();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsDelete: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - On success return new list of device sets

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - No more device sets opened in this instance

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceDeviceSetsGet

+
+
+ +
+
+ +

+

Get summary information about device sets opened in the instance

+

+
+ +
/sdrangel/devicesets
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/devicesets"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsGetWithCompletionHandler: 
+              ^(DeviceSetList output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsGet(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceDeviceSetsGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                DeviceSetList result = apiInstance.instanceDeviceSetsGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsGet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceDeviceSetsGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsGet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - On success return device set list

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceDeviceSetsPost

+
+
+ +
+
+ +

+

Add (append) a new device set

+

+
+ +
/sdrangel/devicesets
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/devicesets?tx="
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for a Tx device set
+        try {
+            DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for a Tx device set
+        try {
+            DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDeviceSetsPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+Boolean *tx = true; // Set to true for a Tx device set (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDeviceSetsPostWith:tx
+              completionHandler: ^(DeviceSet output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for a Tx device set
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDeviceSetsPost(opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceDeviceSetsPostExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for a Tx device set (optional) 
+
+            try
+            {
+                DeviceSet result = apiInstance.instanceDeviceSetsPost(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDeviceSetsPost: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceDeviceSetsPost($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDeviceSetsPost: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + +
Query parameters
+ + + + + + + + + + +
NameDescription
tx + + + +
+
+ +

Responses

+ +

Status: 200 - On success return new device set

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceDevices

+
+
+ +
+
+ +

+

Get a list of sampling devices that can be used to take part in a device set

+

+
+ +
/sdrangel/devices
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/devices?tx="
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx direction
+        try {
+            InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDevices");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        Boolean tx = true; // Boolean | Set to true for Tx direction
+        try {
+            InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceDevices");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+Boolean *tx = true; // Set to true for Tx direction (optional)
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceDevicesWith:tx
+              completionHandler: ^(InstanceDevicesResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var opts = { 
+  'tx': true // {Boolean} Set to true for Tx direction
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceDevices(opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceDevicesExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var tx = true;  // Boolean | Set to true for Tx direction (optional) 
+
+            try
+            {
+                InstanceDevicesResponse result = apiInstance.instanceDevices(tx);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceDevices: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceDevices($tx);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceDevices: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + +
Query parameters
+ + + + + + + + + + +
NameDescription
tx + + + +
+
+ +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceLocationGet

+
+
+ +
+
+ +

+

Get instance geolocation information

+

+
+ +
/sdrangel/location
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/location"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LocationInformation result = apiInstance.instanceLocationGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LocationInformation result = apiInstance.instanceLocationGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLocationGetWithCompletionHandler: 
+              ^(LocationInformation output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLocationGet(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceLocationGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                LocationInformation result = apiInstance.instanceLocationGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLocationGet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceLocationGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLocationGet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - On success return location

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceLocationPut

+
+
+ +
+
+ +

+

Set instance geolocation information

+

+
+ +
/sdrangel/location
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/location"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        LocationInformation body = ; // LocationInformation | Location of instance in latitude and longitude
+        try {
+            LocationInformation result = apiInstance.instanceLocationPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        LocationInformation body = ; // LocationInformation | Location of instance in latitude and longitude
+        try {
+            LocationInformation result = apiInstance.instanceLocationPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLocationPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+LocationInformation *body = ; // Location of instance in latitude and longitude
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLocationPutWith:body
+              completionHandler: ^(LocationInformation output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {LocationInformation} Location of instance in latitude and longitude
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLocationPut(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceLocationPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new LocationInformation(); // LocationInformation | Location of instance in latitude and longitude
+
+            try
+            {
+                LocationInformation result = apiInstance.instanceLocationPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLocationPut: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceLocationPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLocationPut: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - On success return location

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Location invalid

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceLoggingGet

+
+
+ +
+
+ +

+

Get logging information for this instance

+

+
+ +
/sdrangel/logging
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/logging"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLoggingGetWithCompletionHandler: 
+              ^(LoggingInfo output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLoggingGet(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceLoggingGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                LoggingInfo result = apiInstance.instanceLoggingGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLoggingGet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceLoggingGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLoggingGet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceLoggingPut

+
+
+ +
+
+ +

+

Change logging parmeters for this instance

+

+
+ +
/sdrangel/logging
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/logging"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        LoggingInfo body = ; // LoggingInfo | Logging information
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        LoggingInfo body = ; // LoggingInfo | Logging information
+        try {
+            LoggingInfo result = apiInstance.instanceLoggingPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceLoggingPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+LoggingInfo *body = ; // Logging information
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceLoggingPutWith:body
+              completionHandler: ^(LoggingInfo output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {LoggingInfo} Logging information
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceLoggingPut(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceLoggingPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new LoggingInfo(); // LoggingInfo | Logging information
+
+            try
+            {
+                LoggingInfo result = apiInstance.instanceLoggingPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceLoggingPut: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceLoggingPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceLoggingPut: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - Return new data on success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Invallid data

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instancePresetDelete

+
+
+ +
+
+ +

+

Deletes a preset

+

+
+ +
/sdrangel/preset
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/preset"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetIdentifier body = ; // PresetIdentifier | delete this preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetDelete(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetIdentifier body = ; // PresetIdentifier | delete this preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetDelete(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetDelete");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+PresetIdentifier *body = ; // delete this preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetDeleteWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {PresetIdentifier} delete this preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetDelete(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instancePresetDeleteExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetIdentifier(); // PresetIdentifier | delete this preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetDelete(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetDelete: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instancePresetDelete($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetDelete: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - On success return deleted preset identification

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Invalid frequency

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Preset not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instancePresetGet

+
+
+ +
+
+ +

+

List all presets in the instance

+

+
+ +
/sdrangel/preset
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/preset"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            Presets result = apiInstance.instancePresetGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            Presets result = apiInstance.instancePresetGet();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetGet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetGetWithCompletionHandler: 
+              ^(Presets output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetGet(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instancePresetGetExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                Presets result = apiInstance.instancePresetGet();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetGet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instancePresetGet();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetGet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - On success return preset list

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instancePresetPatch

+
+
+ +
+
+ +

+

Load a preset in a device set

+

+
+ +
/sdrangel/preset
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X patch -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/preset"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | Load preset settings to the device set
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | Load preset settings to the device set
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPatch(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPatch");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+PresetTransfer *body = ; // Load preset settings to the device set
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPatchWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {PresetTransfer} Load preset settings to the device set
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPatch(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instancePresetPatchExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | Load preset settings to the device set
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPatch(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPatch: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instancePresetPatch($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPatch: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - On success return preset identification

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Invalid frequency

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - No preset or device set found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instancePresetPost

+
+
+ +
+
+ +

+

Create a new preset from a device set settings

+

+
+ +
/sdrangel/preset
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/preset"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings on a new preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPost(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings on a new preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPost(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPost");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+PresetTransfer *body = ; // save device set settings on a new preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPostWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {PresetTransfer} save device set settings on a new preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPost(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instancePresetPostExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | save device set settings on a new preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPost(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPost: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instancePresetPost($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPost: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - On success return preset identification

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Invalid frequency

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Device set not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 409 - Preset already exists

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instancePresetPut

+
+
+ +
+
+ +

+

Save device set settings on a preset

+

+
+ +
/sdrangel/preset
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel/preset"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings to the preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        PresetTransfer body = ; // PresetTransfer | save device set settings to the preset
+        try {
+            PresetIdentifier result = apiInstance.instancePresetPut(body);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instancePresetPut");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+PresetTransfer *body = ; // save device set settings to the preset
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instancePresetPutWith:body
+              completionHandler: ^(PresetIdentifier output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var body = ; // {PresetTransfer} save device set settings to the preset
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instancePresetPut(body, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instancePresetPutExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+            var body = new PresetTransfer(); // PresetTransfer | save device set settings to the preset
+
+            try
+            {
+                PresetIdentifier result = apiInstance.instancePresetPut(body);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instancePresetPut: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instancePresetPut($body);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instancePresetPut: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
body * + + + +
+
+ + +

Responses

+ +

Status: 200 - On success return preset identification

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Invalid frequency

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - No preset or device set found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

instanceSummary

+
+
+ +
+
+ +

+

SDRangel instance summary

+

+
+ +
/sdrangel
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "http://localhost:10010//sdrangel"
+
+
+
+
+ +
+

+import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import .DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            InstanceSummaryResponse result = apiInstance.instanceSummary();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceSummary");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import .DefaultApi;
+
+public class DefaultApiExample {
+
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        try {
+            InstanceSummaryResponse result = apiInstance.instanceSummary();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#instanceSummary");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+
+
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+[apiInstance instanceSummaryWithCompletionHandler: 
+              ^(InstanceSummaryResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+
+var api = new .DefaultApi()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.instanceSummary(callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using ;
+
+namespace Example
+{
+    public class instanceSummaryExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new DefaultApi();
+
+            try
+            {
+                InstanceSummaryResponse result = apiInstance.instanceSummary();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling DefaultApi.instanceSummary: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+instanceSummary();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->instanceSummary: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + + +

Responses

+ +

Status: 200 - Success

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 0 - Error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ +
+ + + + + + +
+ + + + + + + +
+
+ Generated 2017-11-17T03:16:05.120+01:00 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/swagger/sdrangel/code/qt5/.swagger-codegen-ignore b/swagger/sdrangel/code/qt5/.swagger-codegen-ignore new file mode 100644 index 000000000..c5fa491b4 --- /dev/null +++ b/swagger/sdrangel/code/qt5/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/swagger/sdrangel/code/qt5/LICENSE b/swagger/sdrangel/code/qt5/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/swagger/sdrangel/code/qt5/LICENSE @@ -0,0 +1,201 @@ + 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. diff --git a/swagger/sdrangel/code/qt5/client/SWGAudioDevices.cpp b/swagger/sdrangel/code/qt5/client/SWGAudioDevices.cpp new file mode 100644 index 000000000..6f7d24694 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAudioDevices.cpp @@ -0,0 +1,170 @@ +/** + * 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. + * + * 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 "SWGAudioDevices.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGAudioDevices::SWGAudioDevices(QString* json) { + init(); + this->fromJson(*json); +} + +SWGAudioDevices::SWGAudioDevices() { + init(); +} + +SWGAudioDevices::~SWGAudioDevices() { + this->cleanup(); +} + +void +SWGAudioDevices::init() { + nbInputDevices = NULL; +inputDevices = new QList(); +nbOutputDevices = NULL; +outputDevices = new QList(); +} + +void +SWGAudioDevices::cleanup() { + +if(inputDevices != NULL) { + QList* arr = inputDevices; + foreach(QString* o, *arr) { + delete o; + } + delete inputDevices; + } + +if(outputDevices != NULL) { + QList* arr = outputDevices; + foreach(QString* o, *arr) { + delete o; + } + delete outputDevices; + } +} + +SWGAudioDevices* +SWGAudioDevices::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGAudioDevices::fromJsonObject(QJsonObject &pJson) { + setValue(&nbInputDevices, pJson["nbInputDevices"], "qint32", ""); +setValue(&inputDevices, pJson["inputDevices"], "QList", "QString"); +setValue(&nbOutputDevices, pJson["nbOutputDevices"], "qint32", ""); +setValue(&outputDevices, pJson["outputDevices"], "QList", "QString"); +} + +QString +SWGAudioDevices::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGAudioDevices::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("nbInputDevices", QJsonValue(nbInputDevices)); + + + QList* inputDevicesList = inputDevices; + QJsonArray inputDevicesJsonArray; + toJsonArray((QList*)inputDevices, &inputDevicesJsonArray, "inputDevices", "QString"); + + obj->insert("inputDevices", inputDevicesJsonArray); + +obj->insert("nbOutputDevices", QJsonValue(nbOutputDevices)); + + + QList* outputDevicesList = outputDevices; + QJsonArray outputDevicesJsonArray; + toJsonArray((QList*)outputDevices, &outputDevicesJsonArray, "outputDevices", "QString"); + + obj->insert("outputDevices", outputDevicesJsonArray); + + + return obj; +} + +qint32 +SWGAudioDevices::getNbInputDevices() { + return nbInputDevices; +} +void +SWGAudioDevices::setNbInputDevices(qint32 nbInputDevices) { + this->nbInputDevices = nbInputDevices; +} + +QList* +SWGAudioDevices::getInputDevices() { + return inputDevices; +} +void +SWGAudioDevices::setInputDevices(QList* inputDevices) { + this->inputDevices = inputDevices; +} + +qint32 +SWGAudioDevices::getNbOutputDevices() { + return nbOutputDevices; +} +void +SWGAudioDevices::setNbOutputDevices(qint32 nbOutputDevices) { + this->nbOutputDevices = nbOutputDevices; +} + +QList* +SWGAudioDevices::getOutputDevices() { + return outputDevices; +} +void +SWGAudioDevices::setOutputDevices(QList* outputDevices) { + this->outputDevices = outputDevices; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGAudioDevices.h b/swagger/sdrangel/code/qt5/client/SWGAudioDevices.h new file mode 100644 index 000000000..e3ceea929 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAudioDevices.h @@ -0,0 +1,76 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGAudioDevices.h + * + * List of audio devices available in the system + */ + +#ifndef SWGAudioDevices_H_ +#define SWGAudioDevices_H_ + +#include + + +#include +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGAudioDevices: public SWGObject { +public: + SWGAudioDevices(); + SWGAudioDevices(QString* json); + virtual ~SWGAudioDevices(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGAudioDevices* fromJson(QString &jsonString); + + qint32 getNbInputDevices(); + void setNbInputDevices(qint32 nbInputDevices); +QList* getInputDevices(); + void setInputDevices(QList* inputDevices); +qint32 getNbOutputDevices(); + void setNbOutputDevices(qint32 nbOutputDevices); +QList* getOutputDevices(); + void setOutputDevices(QList* outputDevices); + +private: + qint32 nbInputDevices; +QList* inputDevices; +qint32 nbOutputDevices; +QList* outputDevices; +}; + +} /* namespace Swagger */ + +#endif /* SWGAudioDevices_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.cpp b/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.cpp new file mode 100644 index 000000000..607d0c67d --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.cpp @@ -0,0 +1,130 @@ +/** + * 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. + * + * 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 "SWGAudioDevicesSelect.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGAudioDevicesSelect::SWGAudioDevicesSelect(QString* json) { + init(); + this->fromJson(*json); +} + +SWGAudioDevicesSelect::SWGAudioDevicesSelect() { + init(); +} + +SWGAudioDevicesSelect::~SWGAudioDevicesSelect() { + this->cleanup(); +} + +void +SWGAudioDevicesSelect::init() { + input = new QString(""); +output = new QString(""); +} + +void +SWGAudioDevicesSelect::cleanup() { + if(input != NULL) { + delete input; + } +if(output != NULL) { + delete output; + } +} + +SWGAudioDevicesSelect* +SWGAudioDevicesSelect::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGAudioDevicesSelect::fromJsonObject(QJsonObject &pJson) { + setValue(&input, pJson["input"], "QString", "QString"); +setValue(&output, pJson["output"], "QString", "QString"); +} + +QString +SWGAudioDevicesSelect::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGAudioDevicesSelect::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("input"), input, obj, QString("QString")); + + + + + toJsonValue(QString("output"), output, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGAudioDevicesSelect::getInput() { + return input; +} +void +SWGAudioDevicesSelect::setInput(QString* input) { + this->input = input; +} + +QString* +SWGAudioDevicesSelect::getOutput() { + return output; +} +void +SWGAudioDevicesSelect::setOutput(QString* output) { + this->output = output; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.h b/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.h new file mode 100644 index 000000000..6af2bbe25 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGAudioDevicesSelect.h @@ -0,0 +1,69 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGAudioDevicesSelect.h + * + * Audio devices selected + */ + +#ifndef SWGAudioDevicesSelect_H_ +#define SWGAudioDevicesSelect_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGAudioDevicesSelect: public SWGObject { +public: + SWGAudioDevicesSelect(); + SWGAudioDevicesSelect(QString* json); + virtual ~SWGAudioDevicesSelect(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGAudioDevicesSelect* fromJson(QString &jsonString); + + QString* getInput(); + void setInput(QString* input); +QString* getOutput(); + void setOutput(QString* output); + +private: + QString* input; +QString* output; +}; + +} /* namespace Swagger */ + +#endif /* SWGAudioDevicesSelect_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGChannel.cpp b/swagger/sdrangel/code/qt5/client/SWGChannel.cpp new file mode 100644 index 000000000..0a536bf91 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannel.cpp @@ -0,0 +1,137 @@ +/** + * 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. + * + * 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 "SWGChannel.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGChannel::SWGChannel(QString* json) { + init(); + this->fromJson(*json); +} + +SWGChannel::SWGChannel() { + init(); +} + +SWGChannel::~SWGChannel() { + this->cleanup(); +} + +void +SWGChannel::init() { + index = NULL; +id = new QString(""); +deltaFrequency = NULL; +} + +void +SWGChannel::cleanup() { + +if(id != NULL) { + delete id; + } + +} + +SWGChannel* +SWGChannel::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGChannel::fromJsonObject(QJsonObject &pJson) { + setValue(&index, pJson["index"], "qint32", ""); +setValue(&id, pJson["id"], "QString", "QString"); +setValue(&deltaFrequency, pJson["deltaFrequency"], "qint32", ""); +} + +QString +SWGChannel::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGChannel::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("index", QJsonValue(index)); + + + toJsonValue(QString("id"), id, obj, QString("QString")); + + +obj->insert("deltaFrequency", QJsonValue(deltaFrequency)); + + return obj; +} + +qint32 +SWGChannel::getIndex() { + return index; +} +void +SWGChannel::setIndex(qint32 index) { + this->index = index; +} + +QString* +SWGChannel::getId() { + return id; +} +void +SWGChannel::setId(QString* id) { + this->id = id; +} + +qint32 +SWGChannel::getDeltaFrequency() { + return deltaFrequency; +} +void +SWGChannel::setDeltaFrequency(qint32 deltaFrequency) { + this->deltaFrequency = deltaFrequency; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGChannel.h b/swagger/sdrangel/code/qt5/client/SWGChannel.h new file mode 100644 index 000000000..7b6371ab7 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannel.h @@ -0,0 +1,72 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGChannel.h + * + * Channel summarized information + */ + +#ifndef SWGChannel_H_ +#define SWGChannel_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGChannel: public SWGObject { +public: + SWGChannel(); + SWGChannel(QString* json); + virtual ~SWGChannel(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGChannel* fromJson(QString &jsonString); + + qint32 getIndex(); + void setIndex(qint32 index); +QString* getId(); + void setId(QString* id); +qint32 getDeltaFrequency(); + void setDeltaFrequency(qint32 deltaFrequency); + +private: + qint32 index; +QString* id; +qint32 deltaFrequency; +}; + +} /* namespace Swagger */ + +#endif /* SWGChannel_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp new file mode 100644 index 000000000..0a41b6c5a --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.cpp @@ -0,0 +1,162 @@ +/** + * 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. + * + * 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 "SWGChannelListItem.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGChannelListItem::SWGChannelListItem(QString* json) { + init(); + this->fromJson(*json); +} + +SWGChannelListItem::SWGChannelListItem() { + init(); +} + +SWGChannelListItem::~SWGChannelListItem() { + this->cleanup(); +} + +void +SWGChannelListItem::init() { + name = new QString(""); +id = new QString(""); +tx = false; +version = new QString(""); +} + +void +SWGChannelListItem::cleanup() { + if(name != NULL) { + delete name; + } +if(id != NULL) { + delete id; + } + +if(version != NULL) { + delete version; + } +} + +SWGChannelListItem* +SWGChannelListItem::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGChannelListItem::fromJsonObject(QJsonObject &pJson) { + setValue(&name, pJson["name"], "QString", "QString"); +setValue(&id, pJson["id"], "QString", "QString"); +setValue(&tx, pJson["tx"], "bool", ""); +setValue(&version, pJson["version"], "QString", "QString"); +} + +QString +SWGChannelListItem::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGChannelListItem::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("name"), name, obj, QString("QString")); + + + + + toJsonValue(QString("id"), id, obj, QString("QString")); + + +obj->insert("tx", QJsonValue(tx)); + + + toJsonValue(QString("version"), version, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGChannelListItem::getName() { + return name; +} +void +SWGChannelListItem::setName(QString* name) { + this->name = name; +} + +QString* +SWGChannelListItem::getId() { + return id; +} +void +SWGChannelListItem::setId(QString* id) { + this->id = id; +} + +bool +SWGChannelListItem::getTx() { + return tx; +} +void +SWGChannelListItem::setTx(bool tx) { + this->tx = tx; +} + +QString* +SWGChannelListItem::getVersion() { + return version; +} +void +SWGChannelListItem::setVersion(QString* version) { + this->version = version; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h new file mode 100644 index 000000000..df44dc386 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGChannelListItem.h @@ -0,0 +1,75 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGChannelListItem.h + * + * Summarized information about channel plugin + */ + +#ifndef SWGChannelListItem_H_ +#define SWGChannelListItem_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGChannelListItem: public SWGObject { +public: + SWGChannelListItem(); + SWGChannelListItem(QString* json); + virtual ~SWGChannelListItem(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGChannelListItem* fromJson(QString &jsonString); + + QString* getName(); + void setName(QString* name); +QString* getId(); + void setId(QString* id); +bool getTx(); + void setTx(bool tx); +QString* getVersion(); + void setVersion(QString* version); + +private: + QString* name; +QString* id; +bool tx; +QString* version; +}; + +} /* namespace Swagger */ + +#endif /* SWGChannelListItem_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.cpp b/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.cpp new file mode 100644 index 000000000..4c4c85b88 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.cpp @@ -0,0 +1,131 @@ +/** + * 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. + * + * 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 "SWGDVSeralDevices.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGDVSeralDevices::SWGDVSeralDevices(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDVSeralDevices::SWGDVSeralDevices() { + init(); +} + +SWGDVSeralDevices::~SWGDVSeralDevices() { + this->cleanup(); +} + +void +SWGDVSeralDevices::init() { + nbDevices = NULL; +dvSerialDevices = new QList(); +} + +void +SWGDVSeralDevices::cleanup() { + +if(dvSerialDevices != NULL) { + QList* arr = dvSerialDevices; + foreach(QString* o, *arr) { + delete o; + } + delete dvSerialDevices; + } +} + +SWGDVSeralDevices* +SWGDVSeralDevices::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDVSeralDevices::fromJsonObject(QJsonObject &pJson) { + setValue(&nbDevices, pJson["nbDevices"], "qint32", ""); +setValue(&dvSerialDevices, pJson["dvSerialDevices"], "QList", "QString"); +} + +QString +SWGDVSeralDevices::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGDVSeralDevices::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("nbDevices", QJsonValue(nbDevices)); + + + QList* dvSerialDevicesList = dvSerialDevices; + QJsonArray dvSerialDevicesJsonArray; + toJsonArray((QList*)dvSerialDevices, &dvSerialDevicesJsonArray, "dvSerialDevices", "QString"); + + obj->insert("dvSerialDevices", dvSerialDevicesJsonArray); + + + return obj; +} + +qint32 +SWGDVSeralDevices::getNbDevices() { + return nbDevices; +} +void +SWGDVSeralDevices::setNbDevices(qint32 nbDevices) { + this->nbDevices = nbDevices; +} + +QList* +SWGDVSeralDevices::getDvSerialDevices() { + return dvSerialDevices; +} +void +SWGDVSeralDevices::setDvSerialDevices(QList* dvSerialDevices) { + this->dvSerialDevices = dvSerialDevices; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.h b/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.h new file mode 100644 index 000000000..a21f66046 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDVSeralDevices.h @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGDVSeralDevices.h + * + * List of DV serial devices available in the system + */ + +#ifndef SWGDVSeralDevices_H_ +#define SWGDVSeralDevices_H_ + +#include + + +#include +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGDVSeralDevices: public SWGObject { +public: + SWGDVSeralDevices(); + SWGDVSeralDevices(QString* json); + virtual ~SWGDVSeralDevices(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGDVSeralDevices* fromJson(QString &jsonString); + + qint32 getNbDevices(); + void setNbDevices(qint32 nbDevices); +QList* getDvSerialDevices(); + void setDvSerialDevices(QList* dvSerialDevices); + +private: + qint32 nbDevices; +QList* dvSerialDevices; +}; + +} /* namespace Swagger */ + +#endif /* SWGDVSeralDevices_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDefaultApi.cpp b/swagger/sdrangel/code/qt5/client/SWGDefaultApi.cpp new file mode 100644 index 000000000..37f755f94 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDefaultApi.cpp @@ -0,0 +1,844 @@ +/** + * 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. + * + * 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" +#include "SWGHelpers.h" +#include "SWGModelFactory.h" + +#include +#include + +namespace Swagger { +SWGDefaultApi::SWGDefaultApi() {} + +SWGDefaultApi::~SWGDefaultApi() {} + +SWGDefaultApi::SWGDefaultApi(QString host, QString basePath) { + this->host = host; + this->basePath = basePath; +} + +void +SWGDefaultApi::instanceAudioGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceAudioGetCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceAudioGetCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGAudioDevices* output = static_cast(create(json, QString("SWGAudioDevices"))); + + + worker->deleteLater(); + + emit instanceAudioGetSignal(output); + +} +void +SWGDefaultApi::instanceAudioPatch(SWGAudioDevicesSelect body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/audio"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PATCH"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceAudioPatchCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceAudioPatchCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGAudioDevicesSelect* output = static_cast(create(json, QString("SWGAudioDevicesSelect"))); + + + worker->deleteLater(); + + emit instanceAudioPatchSignal(output); + +} +void +SWGDefaultApi::instanceChannels(bool tx) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/channels"); + + + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?"); + fullPath.append(QUrl::toPercentEncoding("tx")) + .append("=") + .append(QUrl::toPercentEncoding(stringValue(tx))); + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceChannelsCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceChannelsCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGInstanceChannelsResponse* output = static_cast(create(json, QString("SWGInstanceChannelsResponse"))); + + + worker->deleteLater(); + + emit instanceChannelsSignal(output); + +} +void +SWGDefaultApi::instanceDVSerialPatch(bool dvserial) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/dvserial"); + + + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?"); + fullPath.append(QUrl::toPercentEncoding("dvserial")) + .append("=") + .append(QUrl::toPercentEncoding(stringValue(dvserial))); + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PATCH"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceDVSerialPatchCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceDVSerialPatchCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGDVSeralDevices* output = static_cast(create(json, QString("SWGDVSeralDevices"))); + + + worker->deleteLater(); + + emit instanceDVSerialPatchSignal(output); + +} +void +SWGDefaultApi::instanceDeviceSetsDelete() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "DELETE"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceDeviceSetsDeleteCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceDeviceSetsDeleteCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGDeviceSetList* output = static_cast(create(json, QString("SWGDeviceSetList"))); + + + worker->deleteLater(); + + emit instanceDeviceSetsDeleteSignal(output); + +} +void +SWGDefaultApi::instanceDeviceSetsGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceDeviceSetsGetCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceDeviceSetsGetCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGDeviceSetList* output = static_cast(create(json, QString("SWGDeviceSetList"))); + + + worker->deleteLater(); + + emit instanceDeviceSetsGetSignal(output); + +} +void +SWGDefaultApi::instanceDeviceSetsPost(bool tx) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/devicesets"); + + + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?"); + fullPath.append(QUrl::toPercentEncoding("tx")) + .append("=") + .append(QUrl::toPercentEncoding(stringValue(tx))); + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "POST"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceDeviceSetsPostCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceDeviceSetsPostCallback(HttpRequestWorker * worker) { + QString msg; + 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(create(json, QString("SWGDeviceSet"))); + + + worker->deleteLater(); + + emit instanceDeviceSetsPostSignal(output); + +} +void +SWGDefaultApi::instanceDevices(bool tx) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/devices"); + + + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?"); + fullPath.append(QUrl::toPercentEncoding("tx")) + .append("=") + .append(QUrl::toPercentEncoding(stringValue(tx))); + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceDevicesCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceDevicesCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGInstanceDevicesResponse* output = static_cast(create(json, QString("SWGInstanceDevicesResponse"))); + + + worker->deleteLater(); + + emit instanceDevicesSignal(output); + +} +void +SWGDefaultApi::instanceLocationGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/location"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceLocationGetCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceLocationGetCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGLocationInformation* output = static_cast(create(json, QString("SWGLocationInformation"))); + + + worker->deleteLater(); + + emit instanceLocationGetSignal(output); + +} +void +SWGDefaultApi::instanceLocationPut(SWGLocationInformation body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/location"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PUT"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceLocationPutCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceLocationPutCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGLocationInformation* output = static_cast(create(json, QString("SWGLocationInformation"))); + + + worker->deleteLater(); + + emit instanceLocationPutSignal(output); + +} +void +SWGDefaultApi::instanceLoggingGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceLoggingGetCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceLoggingGetCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGLoggingInfo* output = static_cast(create(json, QString("SWGLoggingInfo"))); + + + worker->deleteLater(); + + emit instanceLoggingGetSignal(output); + +} +void +SWGDefaultApi::instanceLoggingPut(SWGLoggingInfo body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/logging"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PUT"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceLoggingPutCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceLoggingPutCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGLoggingInfo* output = static_cast(create(json, QString("SWGLoggingInfo"))); + + + worker->deleteLater(); + + emit instanceLoggingPutSignal(output); + +} +void +SWGDefaultApi::instancePresetDelete(SWGPresetIdentifier body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "DELETE"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instancePresetDeleteCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instancePresetDeleteCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGPresetIdentifier* output = static_cast(create(json, QString("SWGPresetIdentifier"))); + + + worker->deleteLater(); + + emit instancePresetDeleteSignal(output); + +} +void +SWGDefaultApi::instancePresetGet() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instancePresetGetCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instancePresetGetCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGPresets* output = static_cast(create(json, QString("SWGPresets"))); + + + worker->deleteLater(); + + emit instancePresetGetSignal(output); + +} +void +SWGDefaultApi::instancePresetPatch(SWGPresetTransfer body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PATCH"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instancePresetPatchCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instancePresetPatchCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGPresetIdentifier* output = static_cast(create(json, QString("SWGPresetIdentifier"))); + + + worker->deleteLater(); + + emit instancePresetPatchSignal(output); + +} +void +SWGDefaultApi::instancePresetPost(SWGPresetTransfer body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "POST"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instancePresetPostCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instancePresetPostCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGPresetIdentifier* output = static_cast(create(json, QString("SWGPresetIdentifier"))); + + + worker->deleteLater(); + + emit instancePresetPostSignal(output); + +} +void +SWGDefaultApi::instancePresetPut(SWGPresetTransfer body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/preset"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "PUT"); + + + QString output = body.asJson(); + input.request_body.append(output); + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instancePresetPutCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instancePresetPutCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGPresetIdentifier* output = static_cast(create(json, QString("SWGPresetIdentifier"))); + + + worker->deleteLater(); + + emit instancePresetPutSignal(output); + +} +void +SWGDefaultApi::instanceSummary() { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel"); + + + + HttpRequestWorker *worker = new HttpRequestWorker(); + HttpRequestInput input(fullPath, "GET"); + + + + + + connect(worker, + &HttpRequestWorker::on_execution_finished, + this, + &SWGDefaultApi::instanceSummaryCallback); + + worker->execute(&input); +} + +void +SWGDefaultApi::instanceSummaryCallback(HttpRequestWorker * worker) { + QString msg; + 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); + SWGInstanceSummaryResponse* output = static_cast(create(json, QString("SWGInstanceSummaryResponse"))); + + + worker->deleteLater(); + + emit instanceSummarySignal(output); + +} +} /* namespace Swagger */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDefaultApi.h b/swagger/sdrangel/code/qt5/client/SWGDefaultApi.h new file mode 100644 index 000000000..2a809f62a --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDefaultApi.h @@ -0,0 +1,121 @@ +/** + * 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. + * + * 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. + */ + +#ifndef _SWG_SWGDefaultApi_H_ +#define _SWG_SWGDefaultApi_H_ + +#include "SWGHttpRequest.h" + +#include "SWGErrorResponse.h" +#include "SWGAudioDevices.h" +#include "SWGAudioDevicesSelect.h" +#include "SWGInstanceChannelsResponse.h" +#include "SWGDVSeralDevices.h" +#include "SWGDeviceSetList.h" +#include "SWGDeviceSet.h" +#include "SWGInstanceDevicesResponse.h" +#include "SWGLocationInformation.h" +#include "SWGLoggingInfo.h" +#include "SWGPresetIdentifier.h" +#include "SWGPresets.h" +#include "SWGPresetTransfer.h" +#include "SWGInstanceSummaryResponse.h" + +#include + +namespace Swagger { + +class SWGDefaultApi: public QObject { + Q_OBJECT + +public: + SWGDefaultApi(); + SWGDefaultApi(QString host, QString basePath); + ~SWGDefaultApi(); + + QString host; + QString basePath; + + void instanceAudioGet(); + void instanceAudioPatch(SWGAudioDevicesSelect body); + void instanceChannels(bool tx); + void instanceDVSerialPatch(bool dvserial); + void instanceDeviceSetsDelete(); + void instanceDeviceSetsGet(); + void instanceDeviceSetsPost(bool tx); + void instanceDevices(bool tx); + void instanceLocationGet(); + void instanceLocationPut(SWGLocationInformation body); + void instanceLoggingGet(); + void instanceLoggingPut(SWGLoggingInfo body); + void instancePresetDelete(SWGPresetIdentifier body); + void instancePresetGet(); + void instancePresetPatch(SWGPresetTransfer body); + void instancePresetPost(SWGPresetTransfer body); + void instancePresetPut(SWGPresetTransfer body); + void instanceSummary(); + +private: + void instanceAudioGetCallback (HttpRequestWorker * worker); + void instanceAudioPatchCallback (HttpRequestWorker * worker); + void instanceChannelsCallback (HttpRequestWorker * worker); + void instanceDVSerialPatchCallback (HttpRequestWorker * worker); + void instanceDeviceSetsDeleteCallback (HttpRequestWorker * worker); + void instanceDeviceSetsGetCallback (HttpRequestWorker * worker); + void instanceDeviceSetsPostCallback (HttpRequestWorker * worker); + void instanceDevicesCallback (HttpRequestWorker * worker); + void instanceLocationGetCallback (HttpRequestWorker * worker); + void instanceLocationPutCallback (HttpRequestWorker * worker); + void instanceLoggingGetCallback (HttpRequestWorker * worker); + void instanceLoggingPutCallback (HttpRequestWorker * worker); + void instancePresetDeleteCallback (HttpRequestWorker * worker); + void instancePresetGetCallback (HttpRequestWorker * worker); + void instancePresetPatchCallback (HttpRequestWorker * worker); + void instancePresetPostCallback (HttpRequestWorker * worker); + void instancePresetPutCallback (HttpRequestWorker * worker); + void instanceSummaryCallback (HttpRequestWorker * worker); + +signals: + void instanceAudioGetSignal(SWGAudioDevices* summary); + void instanceAudioPatchSignal(SWGAudioDevicesSelect* summary); + void instanceChannelsSignal(SWGInstanceChannelsResponse* summary); + void instanceDVSerialPatchSignal(SWGDVSeralDevices* summary); + void instanceDeviceSetsDeleteSignal(SWGDeviceSetList* summary); + void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary); + void instanceDeviceSetsPostSignal(SWGDeviceSet* summary); + void instanceDevicesSignal(SWGInstanceDevicesResponse* summary); + void instanceLocationGetSignal(SWGLocationInformation* summary); + void instanceLocationPutSignal(SWGLocationInformation* summary); + void instanceLoggingGetSignal(SWGLoggingInfo* summary); + void instanceLoggingPutSignal(SWGLoggingInfo* summary); + void instancePresetDeleteSignal(SWGPresetIdentifier* summary); + void instancePresetGetSignal(SWGPresets* summary); + void instancePresetPatchSignal(SWGPresetIdentifier* summary); + void instancePresetPostSignal(SWGPresetIdentifier* summary); + void instancePresetPutSignal(SWGPresetIdentifier* summary); + void instanceSummarySignal(SWGInstanceSummaryResponse* summary); + +}; +} +#endif diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.cpp new file mode 100644 index 000000000..20d7bb561 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.cpp @@ -0,0 +1,182 @@ +/** + * 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. + * + * 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 "SWGDeviceListItem.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGDeviceListItem::SWGDeviceListItem(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDeviceListItem::SWGDeviceListItem() { + init(); +} + +SWGDeviceListItem::~SWGDeviceListItem() { + this->cleanup(); +} + +void +SWGDeviceListItem::init() { + hwType = new QString(""); +tx = false; +nbStreams = NULL; +streamIndex = NULL; +sequence = NULL; +serial = new QString(""); +} + +void +SWGDeviceListItem::cleanup() { + if(hwType != NULL) { + delete hwType; + } + + + + +if(serial != NULL) { + delete serial; + } +} + +SWGDeviceListItem* +SWGDeviceListItem::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDeviceListItem::fromJsonObject(QJsonObject &pJson) { + setValue(&hwType, pJson["hwType"], "QString", "QString"); +setValue(&tx, pJson["tx"], "bool", ""); +setValue(&nbStreams, pJson["nbStreams"], "qint32", ""); +setValue(&streamIndex, pJson["streamIndex"], "qint32", ""); +setValue(&sequence, pJson["sequence"], "qint32", ""); +setValue(&serial, pJson["serial"], "QString", "QString"); +} + +QString +SWGDeviceListItem::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGDeviceListItem::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("hwType"), hwType, obj, QString("QString")); + + +obj->insert("tx", QJsonValue(tx)); +obj->insert("nbStreams", QJsonValue(nbStreams)); +obj->insert("streamIndex", QJsonValue(streamIndex)); +obj->insert("sequence", QJsonValue(sequence)); + + + toJsonValue(QString("serial"), serial, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGDeviceListItem::getHwType() { + return hwType; +} +void +SWGDeviceListItem::setHwType(QString* hwType) { + this->hwType = hwType; +} + +bool +SWGDeviceListItem::getTx() { + return tx; +} +void +SWGDeviceListItem::setTx(bool tx) { + this->tx = tx; +} + +qint32 +SWGDeviceListItem::getNbStreams() { + return nbStreams; +} +void +SWGDeviceListItem::setNbStreams(qint32 nbStreams) { + this->nbStreams = nbStreams; +} + +qint32 +SWGDeviceListItem::getStreamIndex() { + return streamIndex; +} +void +SWGDeviceListItem::setStreamIndex(qint32 streamIndex) { + this->streamIndex = streamIndex; +} + +qint32 +SWGDeviceListItem::getSequence() { + return sequence; +} +void +SWGDeviceListItem::setSequence(qint32 sequence) { + this->sequence = sequence; +} + +QString* +SWGDeviceListItem::getSerial() { + return serial; +} +void +SWGDeviceListItem::setSerial(QString* serial) { + this->serial = serial; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.h b/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.h new file mode 100644 index 000000000..ca9979953 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceListItem.h @@ -0,0 +1,81 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGDeviceListItem.h + * + * Summarized information about attached hardware device + */ + +#ifndef SWGDeviceListItem_H_ +#define SWGDeviceListItem_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGDeviceListItem: public SWGObject { +public: + SWGDeviceListItem(); + SWGDeviceListItem(QString* json); + virtual ~SWGDeviceListItem(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGDeviceListItem* fromJson(QString &jsonString); + + QString* getHwType(); + void setHwType(QString* hwType); +bool getTx(); + void setTx(bool tx); +qint32 getNbStreams(); + void setNbStreams(qint32 nbStreams); +qint32 getStreamIndex(); + void setStreamIndex(qint32 streamIndex); +qint32 getSequence(); + void setSequence(qint32 sequence); +QString* getSerial(); + void setSerial(QString* serial); + +private: + QString* hwType; +bool tx; +qint32 nbStreams; +qint32 streamIndex; +qint32 sequence; +QString* serial; +}; + +} /* namespace Swagger */ + +#endif /* SWGDeviceListItem_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSet.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSet.cpp new file mode 100644 index 000000000..d6f82fd6c --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSet.cpp @@ -0,0 +1,150 @@ +/** + * 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. + * + * 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 "SWGDeviceSet.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGDeviceSet::SWGDeviceSet(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDeviceSet::SWGDeviceSet() { + init(); +} + +SWGDeviceSet::~SWGDeviceSet() { + this->cleanup(); +} + +void +SWGDeviceSet::init() { + samplingDevice = new SWGSamplingDevice(); +channelcount = NULL; +channels = new QList(); +} + +void +SWGDeviceSet::cleanup() { + if(samplingDevice != NULL) { + delete samplingDevice; + } + +if(channels != NULL) { + QList* arr = channels; + foreach(SWGChannel* o, *arr) { + delete o; + } + delete channels; + } +} + +SWGDeviceSet* +SWGDeviceSet::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDeviceSet::fromJsonObject(QJsonObject &pJson) { + setValue(&samplingDevice, pJson["samplingDevice"], "SWGSamplingDevice", "SWGSamplingDevice"); +setValue(&channelcount, pJson["channelcount"], "qint32", ""); +setValue(&channels, pJson["channels"], "QList", "SWGChannel"); +} + +QString +SWGDeviceSet::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGDeviceSet::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("samplingDevice"), samplingDevice, obj, QString("SWGSamplingDevice")); + + +obj->insert("channelcount", QJsonValue(channelcount)); + + + QList* channelsList = channels; + QJsonArray channelsJsonArray; + toJsonArray((QList*)channels, &channelsJsonArray, "channels", "SWGChannel"); + + obj->insert("channels", channelsJsonArray); + + + return obj; +} + +SWGSamplingDevice* +SWGDeviceSet::getSamplingDevice() { + return samplingDevice; +} +void +SWGDeviceSet::setSamplingDevice(SWGSamplingDevice* samplingDevice) { + this->samplingDevice = samplingDevice; +} + +qint32 +SWGDeviceSet::getChannelcount() { + return channelcount; +} +void +SWGDeviceSet::setChannelcount(qint32 channelcount) { + this->channelcount = channelcount; +} + +QList* +SWGDeviceSet::getChannels() { + return channels; +} +void +SWGDeviceSet::setChannels(QList* channels) { + this->channels = channels; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSet.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSet.h new file mode 100644 index 000000000..85f9aa048 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSet.h @@ -0,0 +1,74 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGDeviceSet.h + * + * Sampling device and its associated channels + */ + +#ifndef SWGDeviceSet_H_ +#define SWGDeviceSet_H_ + +#include + + +#include "SWGChannel.h" +#include "SWGSamplingDevice.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGDeviceSet: public SWGObject { +public: + SWGDeviceSet(); + SWGDeviceSet(QString* json); + virtual ~SWGDeviceSet(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGDeviceSet* fromJson(QString &jsonString); + + SWGSamplingDevice* getSamplingDevice(); + void setSamplingDevice(SWGSamplingDevice* samplingDevice); +qint32 getChannelcount(); + void setChannelcount(qint32 channelcount); +QList* getChannels(); + void setChannels(QList* channels); + +private: + SWGSamplingDevice* samplingDevice; +qint32 channelcount; +QList* channels; +}; + +} /* namespace Swagger */ + +#endif /* SWGDeviceSet_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.cpp new file mode 100644 index 000000000..32008b80c --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.cpp @@ -0,0 +1,131 @@ +/** + * 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. + * + * 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 "SWGDeviceSetList.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGDeviceSetList::SWGDeviceSetList(QString* json) { + init(); + this->fromJson(*json); +} + +SWGDeviceSetList::SWGDeviceSetList() { + init(); +} + +SWGDeviceSetList::~SWGDeviceSetList() { + this->cleanup(); +} + +void +SWGDeviceSetList::init() { + devicesetcount = NULL; +deviceSets = new QList(); +} + +void +SWGDeviceSetList::cleanup() { + +if(deviceSets != NULL) { + QList* arr = deviceSets; + foreach(SWGDeviceSet* o, *arr) { + delete o; + } + delete deviceSets; + } +} + +SWGDeviceSetList* +SWGDeviceSetList::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGDeviceSetList::fromJsonObject(QJsonObject &pJson) { + setValue(&devicesetcount, pJson["devicesetcount"], "qint32", ""); +setValue(&deviceSets, pJson["deviceSets"], "QList", "SWGDeviceSet"); +} + +QString +SWGDeviceSetList::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGDeviceSetList::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("devicesetcount", QJsonValue(devicesetcount)); + + + QList* deviceSetsList = deviceSets; + QJsonArray deviceSetsJsonArray; + toJsonArray((QList*)deviceSets, &deviceSetsJsonArray, "deviceSets", "SWGDeviceSet"); + + obj->insert("deviceSets", deviceSetsJsonArray); + + + return obj; +} + +qint32 +SWGDeviceSetList::getDevicesetcount() { + return devicesetcount; +} +void +SWGDeviceSetList::setDevicesetcount(qint32 devicesetcount) { + this->devicesetcount = devicesetcount; +} + +QList* +SWGDeviceSetList::getDeviceSets() { + return deviceSets; +} +void +SWGDeviceSetList::setDeviceSets(QList* deviceSets) { + this->deviceSets = deviceSets; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.h new file mode 100644 index 000000000..33f9c56ca --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetList.h @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGDeviceSetList.h + * + * List of device sets opened in this instance + */ + +#ifndef SWGDeviceSetList_H_ +#define SWGDeviceSetList_H_ + +#include + + +#include "SWGDeviceSet.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGDeviceSetList: public SWGObject { +public: + SWGDeviceSetList(); + SWGDeviceSetList(QString* json); + virtual ~SWGDeviceSetList(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGDeviceSetList* fromJson(QString &jsonString); + + qint32 getDevicesetcount(); + void setDevicesetcount(qint32 devicesetcount); +QList* getDeviceSets(); + void setDeviceSets(QList* deviceSets); + +private: + qint32 devicesetcount; +QList* deviceSets; +}; + +} /* namespace Swagger */ + +#endif /* SWGDeviceSetList_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGErrorResponse.cpp b/swagger/sdrangel/code/qt5/client/SWGErrorResponse.cpp new file mode 100644 index 000000000..2bb738ded --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGErrorResponse.cpp @@ -0,0 +1,111 @@ +/** + * 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. + * + * 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 "SWGErrorResponse.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGErrorResponse::SWGErrorResponse(QString* json) { + init(); + this->fromJson(*json); +} + +SWGErrorResponse::SWGErrorResponse() { + init(); +} + +SWGErrorResponse::~SWGErrorResponse() { + this->cleanup(); +} + +void +SWGErrorResponse::init() { + message = new QString(""); +} + +void +SWGErrorResponse::cleanup() { + if(message != NULL) { + delete message; + } +} + +SWGErrorResponse* +SWGErrorResponse::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGErrorResponse::fromJsonObject(QJsonObject &pJson) { + setValue(&message, pJson["message"], "QString", "QString"); +} + +QString +SWGErrorResponse::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGErrorResponse::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("message"), message, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGErrorResponse::getMessage() { + return message; +} +void +SWGErrorResponse::setMessage(QString* message) { + this->message = message; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGErrorResponse.h b/swagger/sdrangel/code/qt5/client/SWGErrorResponse.h new file mode 100644 index 000000000..e2dc276ba --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGErrorResponse.h @@ -0,0 +1,66 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGErrorResponse.h + * + * + */ + +#ifndef SWGErrorResponse_H_ +#define SWGErrorResponse_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGErrorResponse: public SWGObject { +public: + SWGErrorResponse(); + SWGErrorResponse(QString* json); + virtual ~SWGErrorResponse(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGErrorResponse* fromJson(QString &jsonString); + + QString* getMessage(); + void setMessage(QString* message); + +private: + QString* message; +}; + +} /* namespace Swagger */ + +#endif /* SWGErrorResponse_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGHelpers.cpp b/swagger/sdrangel/code/qt5/client/SWGHelpers.cpp new file mode 100644 index 000000000..a5f345c87 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGHelpers.cpp @@ -0,0 +1,305 @@ +#include +/** + * 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. + * + * 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 "SWGHelpers.h" +#include "SWGModelFactory.h" +#include "SWGObject.h" +#include +#include +#include + +namespace Swagger { + +void +setValue(void* value, QJsonValue obj, QString type, QString complexType) { + if(value == NULL) { + // can't set value with a null pointer + return; + } + if(QStringLiteral("bool").compare(type) == 0) { + bool * val = static_cast(value); + *val = obj.toBool(); + } + else if(QStringLiteral("qint32").compare(type) == 0) { + qint32 *val = static_cast(value); + *val = obj.toInt(); + } + else if(QStringLiteral("qint64").compare(type) == 0) { + qint64 *val = static_cast(value); + *val = obj.toVariant().toLongLong(); + } + else if(QStringLiteral("float").compare(type) == 0) { + float *val = static_cast(value); + *val = obj.toDouble(); + } + else if(QStringLiteral("double").compare(type) == 0) { + double *val = static_cast(value); + *val = obj.toDouble(); + } + else if (QStringLiteral("QString").compare(type) == 0) { + QString **val = static_cast(value); + + if(val != NULL) { + if(!obj.isNull()) { + // create a new value and return + delete *val; + *val = new QString(obj.toString()); + return; + } + else { + // set target to NULL + delete *val; + *val = NULL; + } + } + else { + qDebug() << "Can't set value because the target pointer is NULL"; + } + } + else if (QStringLiteral("QDateTime").compare(type) == 0) { + QDateTime **val = static_cast(value); + + if(val != NULL) { + if(!obj.isNull()) { + // create a new value and return + delete *val; + *val = new QDateTime(QDateTime::fromString(obj.toString(), Qt::ISODate)); + return; + } + else { + // set target to NULL + delete *val; + *val = NULL; + } + } + else { + qDebug() << "Can't set value because the target pointer is NULL"; + } + } + else if (QStringLiteral("QDate").compare(type) == 0) { + QDate **val = static_cast(value); + + if(val != NULL) { + if(!obj.isNull()) { + // create a new value and return + delete *val; + *val = new QDate(QDate::fromString(obj.toString(), Qt::ISODate)); + return; + } + else { + // set target to NULL + delete *val; + *val = NULL; + } + } + else { + qDebug() << "Can't set value because the target pointer is NULL"; + } + } + else if (QStringLiteral("QByteArray").compare(type) == 0) { + QByteArray **val = static_cast(value); + + if(val != NULL) { + if(!obj.isNull()) { + // create a new value and return + delete *val; + + *val = new QByteArray(QByteArray::fromBase64(QByteArray::fromStdString(obj.toString().toStdString()))); + return; + } + else { + // set target to NULL + delete *val; + *val = NULL; + } + } + else { + qDebug() << "Can't set value because the target pointer is NULL"; + } + } + else if(type.startsWith("SWG") && obj.isObject()) { + // complex type + QJsonObject jsonObj = obj.toObject(); + SWGObject * so = (SWGObject*)Swagger::create(type); + if(so != NULL) { + so->fromJsonObject(jsonObj); + SWGObject **val = static_cast(value); + delete *val; + *val = so; + } + } + else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) { + // list of values + QList* output = new QList(); + QJsonArray arr = obj.toArray(); + foreach (const QJsonValue & jval, arr) { + if(complexType.startsWith("SWG")) { + // it's an object + SWGObject * val = (SWGObject*)create(complexType); + QJsonObject t = jval.toObject(); + + val->fromJsonObject(t); + output->append(val); + } + else { + // primitives + if(QStringLiteral("qint32").compare(complexType) == 0) { + qint32 val; + setValue(&val, jval, QStringLiteral("qint32"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("qint64").compare(complexType) == 0) { + qint64 val; + setValue(&val, jval, QStringLiteral("qint64"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("bool").compare(complexType) == 0) { + bool val; + setValue(&val, jval, QStringLiteral("bool"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("float").compare(complexType) == 0) { + float val; + setValue(&val, jval, QStringLiteral("float"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("double").compare(complexType) == 0) { + double val; + setValue(&val, jval, QStringLiteral("double"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("QString").compare(complexType) == 0) { + QString val; + setValue(&val, jval, QStringLiteral("QString"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("QDate").compare(complexType) == 0) { + QDate val; + setValue(&val, jval, QStringLiteral("QDate"), QStringLiteral("")); + output->append((void*)&val); + } + else if(QStringLiteral("QDateTime").compare(complexType) == 0) { + QDateTime val; + setValue(&val, jval, QStringLiteral("QDateTime"), QStringLiteral("")); + output->append((void*)&val); + } + } + } + QList **val = static_cast**>(value); + delete *val; + *val = output; + } +} + +void +toJsonValue(QString name, void* value, QJsonObject* output, QString type) { + if(value == NULL) { + return; + } + if(type.startsWith("SWG")) { + SWGObject *swgObject = reinterpret_cast(value); + if(swgObject != NULL) { + QJsonObject* o = (*swgObject).asJsonObject(); + if(name != NULL) { + output->insert(name, *o); + delete o; + } + else { + output->empty(); + foreach(QString key, o->keys()) { + output->insert(key, o->value(key)); + } + } + } + } + else if(QStringLiteral("QString").compare(type) == 0) { + QString* str = static_cast(value); + output->insert(name, QJsonValue(*str)); + } + else if(QStringLiteral("qint32").compare(type) == 0) { + qint32* str = static_cast(value); + output->insert(name, QJsonValue(*str)); + } + else if(QStringLiteral("qint64").compare(type) == 0) { + qint64* str = static_cast(value); + output->insert(name, QJsonValue(*str)); + } + else if(QStringLiteral("bool").compare(type) == 0) { + bool* str = static_cast(value); + output->insert(name, QJsonValue(*str)); + } + else if(QStringLiteral("float").compare(type) == 0) { + float* str = static_cast(value); + output->insert(name, QJsonValue((double)*str)); + } + else if(QStringLiteral("double").compare(type) == 0) { + double* str = static_cast(value); + output->insert(name, QJsonValue(*str)); + } + else if(QStringLiteral("QDate").compare(type) == 0) { + QDate* date = static_cast(value); + output->insert(name, QJsonValue(date->toString(Qt::ISODate))); + } + else if(QStringLiteral("QDateTime").compare(type) == 0) { + QDateTime* datetime = static_cast(value); + output->insert(name, QJsonValue(datetime->toString(Qt::ISODate))); + } + else if(QStringLiteral("QByteArray").compare(type) == 0) { + QByteArray* byteArray = static_cast(value); + output->insert(name, QJsonValue(QString(byteArray->toBase64()))); + } +} + +void +toJsonArray(QList* value, QJsonArray* output, QString innerName, QString innerType) { + foreach(void* obj, *value) { + QJsonObject element; + + toJsonValue(NULL, obj, &element, innerType); + output->append(element); + } +} + +QString +stringValue(QString* value) { + QString* str = static_cast(value); + return QString(*str); +} + +QString +stringValue(qint32 value) { + return QString::number(value); +} + +QString +stringValue(qint64 value) { + return QString::number(value); +} + +QString +stringValue(bool value) { + return QString(value ? "true" : "false"); +} +} /* namespace Swagger */ diff --git a/swagger/sdrangel/code/qt5/client/SWGHelpers.h b/swagger/sdrangel/code/qt5/client/SWGHelpers.h new file mode 100644 index 000000000..829349da1 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGHelpers.h @@ -0,0 +1,41 @@ +/** + * 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. + * + * 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. + */ + +#ifndef SWGHELPERS_H +#define SWGHELPERS_H + +#include + +namespace Swagger { + void setValue(void* value, QJsonValue obj, QString type, QString complexType); + void toJsonArray(QList* value, QJsonArray* output, QString innerName, QString innerType); + void toJsonValue(QString name, void* value, QJsonObject* output, QString type); + bool isCompatibleJsonValue(QString type); + QString stringValue(QString* value); + QString stringValue(qint32 value); + QString stringValue(qint64 value); + QString stringValue(bool value); +} + +#endif // SWGHELPERS_H diff --git a/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp new file mode 100644 index 000000000..8e6b9d135 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp @@ -0,0 +1,323 @@ +/** + * 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. + * + * 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 "SWGHttpRequest.h" +#include +#include +#include +#include + + +HttpRequestInput::HttpRequestInput() { + initialize(); +} + +HttpRequestInput::HttpRequestInput(QString v_url_str, QString v_http_method) { + initialize(); + url_str = v_url_str; + http_method = v_http_method; +} + +void HttpRequestInput::initialize() { + var_layout = NOT_SET; + url_str = ""; + http_method = "GET"; +} + +void HttpRequestInput::add_var(QString key, QString value) { + vars[key] = value; +} + +void HttpRequestInput::add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type) { + SWGHttpRequestInputFileElement file; + file.variable_name = variable_name; + file.local_filename = local_filename; + file.request_filename = request_filename; + file.mime_type = mime_type; + files.append(file); +} + + +HttpRequestWorker::HttpRequestWorker(QObject *parent) + : QObject(parent), manager(NULL) +{ + qsrand(QDateTime::currentDateTime().toTime_t()); + + manager = new QNetworkAccessManager(this); + connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*))); +} + +HttpRequestWorker::~HttpRequestWorker() { +} + +QString HttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) { + // result structure follows RFC 5987 + bool need_utf_encoding = false; + QString result = ""; + QByteArray input_c = input.toLocal8Bit(); + char c; + for (int i = 0; i < input_c.length(); i++) { + c = input_c.at(i); + if (c == '\\' || c == '/' || c == '\0' || c < ' ' || c > '~') { + // ignore and request utf-8 version + need_utf_encoding = true; + } + else if (c == '"') { + result += "\\\""; + } + else { + result += c; + } + } + + if (result.length() == 0) { + need_utf_encoding = true; + } + + if (!need_utf_encoding) { + // return simple version + return QString("%1=\"%2\"").arg(attribute_name, result); + } + + QString result_utf8 = ""; + for (int i = 0; i < input_c.length(); i++) { + c = input_c.at(i); + if ( + (c >= '0' && c <= '9') + || (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z') + ) { + result_utf8 += c; + } + else { + result_utf8 += "%" + QString::number(static_cast(input_c.at(i)), 16).toUpper(); + } + } + + // return enhanced version with UTF-8 support + return QString("%1=\"%2\"; %1*=utf-8''%3").arg(attribute_name, result, result_utf8); +} + +void HttpRequestWorker::execute(HttpRequestInput *input) { + + // reset variables + + QByteArray request_content = ""; + response = ""; + error_type = QNetworkReply::NoError; + error_str = ""; + bool isFormData = false; + + + // decide on the variable layout + + if (input->files.length() > 0) { + input->var_layout = MULTIPART; + } + if (input->var_layout == NOT_SET) { + input->var_layout = input->http_method == "GET" || input->http_method == "HEAD" ? ADDRESS : URL_ENCODED; + } + + + // prepare request content + + QString boundary = ""; + + if (input->var_layout == ADDRESS || input->var_layout == URL_ENCODED) { + // variable layout is ADDRESS or URL_ENCODED + + if (input->vars.count() > 0) { + bool first = true; + isFormData = true; + foreach (QString key, input->vars.keys()) { + if (!first) { + request_content.append("&"); + } + first = false; + + request_content.append(QUrl::toPercentEncoding(key)); + request_content.append("="); + request_content.append(QUrl::toPercentEncoding(input->vars.value(key))); + } + + if (input->var_layout == ADDRESS) { + input->url_str += "?" + request_content; + request_content = ""; + } + } + } + else { + // variable layout is MULTIPART + + boundary = "__-----------------------" + + QString::number(QDateTime::currentDateTime().toTime_t()) + + QString::number(qrand()); + QString boundary_delimiter = "--"; + QString new_line = "\r\n"; + + // add variables + foreach (QString key, input->vars.keys()) { + // add boundary + request_content.append(boundary_delimiter); + request_content.append(boundary); + request_content.append(new_line); + + // add header + request_content.append("Content-Disposition: form-data; "); + request_content.append(http_attribute_encode("name", key)); + request_content.append(new_line); + request_content.append("Content-Type: text/plain"); + request_content.append(new_line); + + // add header to body splitter + request_content.append(new_line); + + // add variable content + request_content.append(input->vars.value(key)); + request_content.append(new_line); + } + + // add files + for (QList::iterator file_info = input->files.begin(); file_info != input->files.end(); file_info++) { + QFileInfo fi(file_info->local_filename); + + // ensure necessary variables are available + if ( + file_info->local_filename == NULL || file_info->local_filename.isEmpty() + || file_info->variable_name == NULL || file_info->variable_name.isEmpty() + || !fi.exists() || !fi.isFile() || !fi.isReadable() + ) { + // silent abort for the current file + continue; + } + + QFile file(file_info->local_filename); + if (!file.open(QIODevice::ReadOnly)) { + // silent abort for the current file + continue; + } + + // ensure filename for the request + if (file_info->request_filename == NULL || file_info->request_filename.isEmpty()) { + file_info->request_filename = fi.fileName(); + if (file_info->request_filename.isEmpty()) { + file_info->request_filename = "file"; + } + } + + // add boundary + request_content.append(boundary_delimiter); + request_content.append(boundary); + request_content.append(new_line); + + // add header + request_content.append(QString("Content-Disposition: form-data; %1; %2").arg( + http_attribute_encode("name", file_info->variable_name), + http_attribute_encode("filename", file_info->request_filename) + )); + request_content.append(new_line); + + if (file_info->mime_type != NULL && !file_info->mime_type.isEmpty()) { + request_content.append("Content-Type: "); + request_content.append(file_info->mime_type); + request_content.append(new_line); + } + + request_content.append("Content-Transfer-Encoding: binary"); + request_content.append(new_line); + + // add header to body splitter + request_content.append(new_line); + + // add file content + request_content.append(file.readAll()); + request_content.append(new_line); + + file.close(); + } + + // add end of body + request_content.append(boundary_delimiter); + request_content.append(boundary); + request_content.append(boundary_delimiter); + } + + if(input->request_body.size() > 0) { + qDebug() << "got a request body"; + request_content.clear(); + request_content.append(input->request_body); + } + // prepare connection + + QNetworkRequest request = QNetworkRequest(QUrl(input->url_str)); + request.setRawHeader("User-Agent", "Swagger-Client"); + foreach(QString key, input->headers.keys()) { + request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); + } + + if (request_content.size() > 0 && !isFormData) { + request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); + } + else if (input->var_layout == URL_ENCODED) { + request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); + } + else if (input->var_layout == MULTIPART) { + request.setHeader(QNetworkRequest::ContentTypeHeader, "multipart/form-data; boundary=" + boundary); + } + + if (input->http_method == "GET") { + manager->get(request); + } + else if (input->http_method == "POST") { + manager->post(request, request_content); + } + else if (input->http_method == "PUT") { + manager->put(request, request_content); + } + else if (input->http_method == "HEAD") { + manager->head(request); + } + else if (input->http_method == "DELETE") { + manager->deleteResource(request); + } + else { + QBuffer buff(&request_content); + manager->sendCustomRequest(request, input->http_method.toLatin1(), &buff); + } + +} + +void HttpRequestWorker::on_manager_finished(QNetworkReply *reply) { + error_type = reply->error(); + if (error_type == QNetworkReply::NoError) { + response = reply->readAll(); + } + else { + error_str = reply->errorString(); + } + + reply->deleteLater(); + + emit on_execution_finished(this); +} diff --git a/swagger/sdrangel/code/qt5/client/SWGHttpRequest.h b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.h new file mode 100644 index 000000000..03c73ea97 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.h @@ -0,0 +1,99 @@ +/** + * 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. + * + * 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. + */ + +/** + * Based on http://www.creativepulse.gr/en/blog/2014/restful-api-requests-using-qt-cpp-for-linux-mac-osx-ms-windows + * By Alex Stylianos + * + **/ + +#ifndef HTTPREQUESTWORKER_H +#define HTTPREQUESTWORKER_H + +#include +#include +#include +#include +#include + +enum HttpRequestVarLayout {NOT_SET, ADDRESS, URL_ENCODED, MULTIPART}; + + +class SWGHttpRequestInputFileElement { + +public: + QString variable_name; + QString local_filename; + QString request_filename; + QString mime_type; + +}; + + +class HttpRequestInput { + +public: + QString url_str; + QString http_method; + HttpRequestVarLayout var_layout; + QMap vars; + QMap headers; + QList files; + QByteArray request_body; + + HttpRequestInput(); + HttpRequestInput(QString v_url_str, QString v_http_method); + void initialize(); + void add_var(QString key, QString value); + void add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type); + +}; + + +class HttpRequestWorker : public QObject { + Q_OBJECT + +public: + QByteArray response; + QNetworkReply::NetworkError error_type; + QString error_str; + + explicit HttpRequestWorker(QObject *parent = 0); + virtual ~HttpRequestWorker(); + + QString http_attribute_encode(QString attribute_name, QString input); + void execute(HttpRequestInput *input); + +signals: + void on_execution_finished(HttpRequestWorker *worker); + +private: + QNetworkAccessManager *manager; + +private slots: + void on_manager_finished(QNetworkReply *reply); + +}; + +#endif // HTTPREQUESTWORKER_H diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.cpp new file mode 100644 index 000000000..7e90aa666 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.cpp @@ -0,0 +1,131 @@ +/** + * 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. + * + * 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 "SWGInstanceChannelsResponse.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGInstanceChannelsResponse::SWGInstanceChannelsResponse(QString* json) { + init(); + this->fromJson(*json); +} + +SWGInstanceChannelsResponse::SWGInstanceChannelsResponse() { + init(); +} + +SWGInstanceChannelsResponse::~SWGInstanceChannelsResponse() { + this->cleanup(); +} + +void +SWGInstanceChannelsResponse::init() { + channelcount = NULL; +channels = new QList(); +} + +void +SWGInstanceChannelsResponse::cleanup() { + +if(channels != NULL) { + QList* arr = channels; + foreach(SWGChannelListItem* o, *arr) { + delete o; + } + delete channels; + } +} + +SWGInstanceChannelsResponse* +SWGInstanceChannelsResponse::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGInstanceChannelsResponse::fromJsonObject(QJsonObject &pJson) { + setValue(&channelcount, pJson["channelcount"], "qint32", ""); +setValue(&channels, pJson["channels"], "QList", "SWGChannelListItem"); +} + +QString +SWGInstanceChannelsResponse::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGInstanceChannelsResponse::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("channelcount", QJsonValue(channelcount)); + + + QList* channelsList = channels; + QJsonArray channelsJsonArray; + toJsonArray((QList*)channels, &channelsJsonArray, "channels", "SWGChannelListItem"); + + obj->insert("channels", channelsJsonArray); + + + return obj; +} + +qint32 +SWGInstanceChannelsResponse::getChannelcount() { + return channelcount; +} +void +SWGInstanceChannelsResponse::setChannelcount(qint32 channelcount) { + this->channelcount = channelcount; +} + +QList* +SWGInstanceChannelsResponse::getChannels() { + return channels; +} +void +SWGInstanceChannelsResponse::setChannels(QList* channels) { + this->channels = channels; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.h b/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.h new file mode 100644 index 000000000..e7de15131 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceChannelsResponse.h @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGInstanceChannelsResponse.h + * + * Summarized information about channel plugins available in this SDRangel instance + */ + +#ifndef SWGInstanceChannelsResponse_H_ +#define SWGInstanceChannelsResponse_H_ + +#include + + +#include "SWGChannelListItem.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGInstanceChannelsResponse: public SWGObject { +public: + SWGInstanceChannelsResponse(); + SWGInstanceChannelsResponse(QString* json); + virtual ~SWGInstanceChannelsResponse(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGInstanceChannelsResponse* fromJson(QString &jsonString); + + qint32 getChannelcount(); + void setChannelcount(qint32 channelcount); +QList* getChannels(); + void setChannels(QList* channels); + +private: + qint32 channelcount; +QList* channels; +}; + +} /* namespace Swagger */ + +#endif /* SWGInstanceChannelsResponse_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.cpp new file mode 100644 index 000000000..854a2a779 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.cpp @@ -0,0 +1,131 @@ +/** + * 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. + * + * 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 "SWGInstanceDevicesResponse.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGInstanceDevicesResponse::SWGInstanceDevicesResponse(QString* json) { + init(); + this->fromJson(*json); +} + +SWGInstanceDevicesResponse::SWGInstanceDevicesResponse() { + init(); +} + +SWGInstanceDevicesResponse::~SWGInstanceDevicesResponse() { + this->cleanup(); +} + +void +SWGInstanceDevicesResponse::init() { + devicecount = NULL; +devices = new QList(); +} + +void +SWGInstanceDevicesResponse::cleanup() { + +if(devices != NULL) { + QList* arr = devices; + foreach(SWGDeviceListItem* o, *arr) { + delete o; + } + delete devices; + } +} + +SWGInstanceDevicesResponse* +SWGInstanceDevicesResponse::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGInstanceDevicesResponse::fromJsonObject(QJsonObject &pJson) { + setValue(&devicecount, pJson["devicecount"], "qint32", ""); +setValue(&devices, pJson["devices"], "QList", "SWGDeviceListItem"); +} + +QString +SWGInstanceDevicesResponse::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGInstanceDevicesResponse::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("devicecount", QJsonValue(devicecount)); + + + QList* devicesList = devices; + QJsonArray devicesJsonArray; + toJsonArray((QList*)devices, &devicesJsonArray, "devices", "SWGDeviceListItem"); + + obj->insert("devices", devicesJsonArray); + + + return obj; +} + +qint32 +SWGInstanceDevicesResponse::getDevicecount() { + return devicecount; +} +void +SWGInstanceDevicesResponse::setDevicecount(qint32 devicecount) { + this->devicecount = devicecount; +} + +QList* +SWGInstanceDevicesResponse::getDevices() { + return devices; +} +void +SWGInstanceDevicesResponse::setDevices(QList* devices) { + this->devices = devices; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.h b/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.h new file mode 100644 index 000000000..66044d6a8 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceDevicesResponse.h @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGInstanceDevicesResponse.h + * + * Summarized information about logical devices from hardware devices attached to this SDRangel instance + */ + +#ifndef SWGInstanceDevicesResponse_H_ +#define SWGInstanceDevicesResponse_H_ + +#include + + +#include "SWGDeviceListItem.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGInstanceDevicesResponse: public SWGObject { +public: + SWGInstanceDevicesResponse(); + SWGInstanceDevicesResponse(QString* json); + virtual ~SWGInstanceDevicesResponse(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGInstanceDevicesResponse* fromJson(QString &jsonString); + + qint32 getDevicecount(); + void setDevicecount(qint32 devicecount); +QList* getDevices(); + void setDevices(QList* devices); + +private: + qint32 devicecount; +QList* devices; +}; + +} /* namespace Swagger */ + +#endif /* SWGInstanceDevicesResponse_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.cpp b/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.cpp new file mode 100644 index 000000000..2d9852e7d --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.cpp @@ -0,0 +1,168 @@ +/** + * 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. + * + * 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 "SWGInstanceSummaryResponse.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGInstanceSummaryResponse::SWGInstanceSummaryResponse(QString* json) { + init(); + this->fromJson(*json); +} + +SWGInstanceSummaryResponse::SWGInstanceSummaryResponse() { + init(); +} + +SWGInstanceSummaryResponse::~SWGInstanceSummaryResponse() { + this->cleanup(); +} + +void +SWGInstanceSummaryResponse::init() { + version = new QString(""); +logging = new SWGLoggingInfo(); +devicesetlist = new SWGDeviceSetList(); +user = new SWGUser(); +} + +void +SWGInstanceSummaryResponse::cleanup() { + if(version != NULL) { + delete version; + } +if(logging != NULL) { + delete logging; + } +if(devicesetlist != NULL) { + delete devicesetlist; + } +if(user != NULL) { + delete user; + } +} + +SWGInstanceSummaryResponse* +SWGInstanceSummaryResponse::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGInstanceSummaryResponse::fromJsonObject(QJsonObject &pJson) { + setValue(&version, pJson["version"], "QString", "QString"); +setValue(&logging, pJson["logging"], "SWGLoggingInfo", "SWGLoggingInfo"); +setValue(&devicesetlist, pJson["devicesetlist"], "SWGDeviceSetList", "SWGDeviceSetList"); +setValue(&user, pJson["user"], "SWGUser", "SWGUser"); +} + +QString +SWGInstanceSummaryResponse::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGInstanceSummaryResponse::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("version"), version, obj, QString("QString")); + + + + + toJsonValue(QString("logging"), logging, obj, QString("SWGLoggingInfo")); + + + + + toJsonValue(QString("devicesetlist"), devicesetlist, obj, QString("SWGDeviceSetList")); + + + + + toJsonValue(QString("user"), user, obj, QString("SWGUser")); + + + + return obj; +} + +QString* +SWGInstanceSummaryResponse::getVersion() { + return version; +} +void +SWGInstanceSummaryResponse::setVersion(QString* version) { + this->version = version; +} + +SWGLoggingInfo* +SWGInstanceSummaryResponse::getLogging() { + return logging; +} +void +SWGInstanceSummaryResponse::setLogging(SWGLoggingInfo* logging) { + this->logging = logging; +} + +SWGDeviceSetList* +SWGInstanceSummaryResponse::getDevicesetlist() { + return devicesetlist; +} +void +SWGInstanceSummaryResponse::setDevicesetlist(SWGDeviceSetList* devicesetlist) { + this->devicesetlist = devicesetlist; +} + +SWGUser* +SWGInstanceSummaryResponse::getUser() { + return user; +} +void +SWGInstanceSummaryResponse::setUser(SWGUser* user) { + this->user = user; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.h b/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.h new file mode 100644 index 000000000..e6a759f3e --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGInstanceSummaryResponse.h @@ -0,0 +1,78 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGInstanceSummaryResponse.h + * + * Summarized information about this SDRangel instance + */ + +#ifndef SWGInstanceSummaryResponse_H_ +#define SWGInstanceSummaryResponse_H_ + +#include + + +#include "SWGDeviceSetList.h" +#include "SWGLoggingInfo.h" +#include "SWGUser.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGInstanceSummaryResponse: public SWGObject { +public: + SWGInstanceSummaryResponse(); + SWGInstanceSummaryResponse(QString* json); + virtual ~SWGInstanceSummaryResponse(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGInstanceSummaryResponse* fromJson(QString &jsonString); + + QString* getVersion(); + void setVersion(QString* version); +SWGLoggingInfo* getLogging(); + void setLogging(SWGLoggingInfo* logging); +SWGDeviceSetList* getDevicesetlist(); + void setDevicesetlist(SWGDeviceSetList* devicesetlist); +SWGUser* getUser(); + void setUser(SWGUser* user); + +private: + QString* version; +SWGLoggingInfo* logging; +SWGDeviceSetList* devicesetlist; +SWGUser* user; +}; + +} /* namespace Swagger */ + +#endif /* SWGInstanceSummaryResponse_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGLocationInformation.cpp b/swagger/sdrangel/code/qt5/client/SWGLocationInformation.cpp new file mode 100644 index 000000000..bbcca0215 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLocationInformation.cpp @@ -0,0 +1,118 @@ +/** + * 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. + * + * 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 "SWGLocationInformation.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGLocationInformation::SWGLocationInformation(QString* json) { + init(); + this->fromJson(*json); +} + +SWGLocationInformation::SWGLocationInformation() { + init(); +} + +SWGLocationInformation::~SWGLocationInformation() { + this->cleanup(); +} + +void +SWGLocationInformation::init() { + latitude = 0.0f; +longitude = 0.0f; +} + +void +SWGLocationInformation::cleanup() { + + +} + +SWGLocationInformation* +SWGLocationInformation::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGLocationInformation::fromJsonObject(QJsonObject &pJson) { + setValue(&latitude, pJson["latitude"], "float", ""); +setValue(&longitude, pJson["longitude"], "float", ""); +} + +QString +SWGLocationInformation::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGLocationInformation::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("latitude", QJsonValue(latitude)); +obj->insert("longitude", QJsonValue(longitude)); + + return obj; +} + +float +SWGLocationInformation::getLatitude() { + return latitude; +} +void +SWGLocationInformation::setLatitude(float latitude) { + this->latitude = latitude; +} + +float +SWGLocationInformation::getLongitude() { + return longitude; +} +void +SWGLocationInformation::setLongitude(float longitude) { + this->longitude = longitude; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGLocationInformation.h b/swagger/sdrangel/code/qt5/client/SWGLocationInformation.h new file mode 100644 index 000000000..9e1d97bdf --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLocationInformation.h @@ -0,0 +1,68 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGLocationInformation.h + * + * Instance geolocation information + */ + +#ifndef SWGLocationInformation_H_ +#define SWGLocationInformation_H_ + +#include + + + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGLocationInformation: public SWGObject { +public: + SWGLocationInformation(); + SWGLocationInformation(QString* json); + virtual ~SWGLocationInformation(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGLocationInformation* fromJson(QString &jsonString); + + float getLatitude(); + void setLatitude(float latitude); +float getLongitude(); + void setLongitude(float longitude); + +private: + float latitude; +float longitude; +}; + +} /* namespace Swagger */ + +#endif /* SWGLocationInformation_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.cpp b/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.cpp new file mode 100644 index 000000000..a8125a1cc --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.cpp @@ -0,0 +1,162 @@ +/** + * 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. + * + * 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 "SWGLoggingInfo.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGLoggingInfo::SWGLoggingInfo(QString* json) { + init(); + this->fromJson(*json); +} + +SWGLoggingInfo::SWGLoggingInfo() { + init(); +} + +SWGLoggingInfo::~SWGLoggingInfo() { + this->cleanup(); +} + +void +SWGLoggingInfo::init() { + consoleLevel = new QString(""); +fileLevel = new QString(""); +dumpToFile = false; +fileName = new QString(""); +} + +void +SWGLoggingInfo::cleanup() { + if(consoleLevel != NULL) { + delete consoleLevel; + } +if(fileLevel != NULL) { + delete fileLevel; + } + +if(fileName != NULL) { + delete fileName; + } +} + +SWGLoggingInfo* +SWGLoggingInfo::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGLoggingInfo::fromJsonObject(QJsonObject &pJson) { + setValue(&consoleLevel, pJson["consoleLevel"], "QString", "QString"); +setValue(&fileLevel, pJson["fileLevel"], "QString", "QString"); +setValue(&dumpToFile, pJson["dumpToFile"], "bool", ""); +setValue(&fileName, pJson["fileName"], "QString", "QString"); +} + +QString +SWGLoggingInfo::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGLoggingInfo::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("consoleLevel"), consoleLevel, obj, QString("QString")); + + + + + toJsonValue(QString("fileLevel"), fileLevel, obj, QString("QString")); + + +obj->insert("dumpToFile", QJsonValue(dumpToFile)); + + + toJsonValue(QString("fileName"), fileName, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGLoggingInfo::getConsoleLevel() { + return consoleLevel; +} +void +SWGLoggingInfo::setConsoleLevel(QString* consoleLevel) { + this->consoleLevel = consoleLevel; +} + +QString* +SWGLoggingInfo::getFileLevel() { + return fileLevel; +} +void +SWGLoggingInfo::setFileLevel(QString* fileLevel) { + this->fileLevel = fileLevel; +} + +bool +SWGLoggingInfo::getDumpToFile() { + return dumpToFile; +} +void +SWGLoggingInfo::setDumpToFile(bool dumpToFile) { + this->dumpToFile = dumpToFile; +} + +QString* +SWGLoggingInfo::getFileName() { + return fileName; +} +void +SWGLoggingInfo::setFileName(QString* fileName) { + this->fileName = fileName; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.h b/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.h new file mode 100644 index 000000000..04776b20a --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGLoggingInfo.h @@ -0,0 +1,75 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGLoggingInfo.h + * + * Logging parameters setting + */ + +#ifndef SWGLoggingInfo_H_ +#define SWGLoggingInfo_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGLoggingInfo: public SWGObject { +public: + SWGLoggingInfo(); + SWGLoggingInfo(QString* json); + virtual ~SWGLoggingInfo(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGLoggingInfo* fromJson(QString &jsonString); + + QString* getConsoleLevel(); + void setConsoleLevel(QString* consoleLevel); +QString* getFileLevel(); + void setFileLevel(QString* fileLevel); +bool getDumpToFile(); + void setDumpToFile(bool dumpToFile); +QString* getFileName(); + void setFileName(QString* fileName); + +private: + QString* consoleLevel; +QString* fileLevel; +bool dumpToFile; +QString* fileName; +}; + +} /* namespace Swagger */ + +#endif /* SWGLoggingInfo_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h new file mode 100644 index 000000000..e3fb3b0f5 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -0,0 +1,133 @@ +/** + * 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. + * + * 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. + */ + +#ifndef ModelFactory_H_ +#define ModelFactory_H_ + + +#include "SWGAudioDevices.h" +#include "SWGAudioDevicesSelect.h" +#include "SWGChannel.h" +#include "SWGChannelListItem.h" +#include "SWGDVSeralDevices.h" +#include "SWGDeviceListItem.h" +#include "SWGDeviceSet.h" +#include "SWGDeviceSetList.h" +#include "SWGErrorResponse.h" +#include "SWGInstanceChannelsResponse.h" +#include "SWGInstanceDevicesResponse.h" +#include "SWGInstanceSummaryResponse.h" +#include "SWGLocationInformation.h" +#include "SWGLoggingInfo.h" +#include "SWGPresetGroup.h" +#include "SWGPresetIdentifier.h" +#include "SWGPresetItem.h" +#include "SWGPresetTransfer.h" +#include "SWGPresets.h" +#include "SWGSamplingDevice.h" +#include "SWGUser.h" + +namespace Swagger { + inline void* create(QString type) { + if(QString("SWGAudioDevices").compare(type) == 0) { + return new SWGAudioDevices(); + } + if(QString("SWGAudioDevicesSelect").compare(type) == 0) { + return new SWGAudioDevicesSelect(); + } + if(QString("SWGChannel").compare(type) == 0) { + return new SWGChannel(); + } + if(QString("SWGChannelListItem").compare(type) == 0) { + return new SWGChannelListItem(); + } + if(QString("SWGDVSeralDevices").compare(type) == 0) { + return new SWGDVSeralDevices(); + } + if(QString("SWGDeviceListItem").compare(type) == 0) { + return new SWGDeviceListItem(); + } + if(QString("SWGDeviceSet").compare(type) == 0) { + return new SWGDeviceSet(); + } + if(QString("SWGDeviceSetList").compare(type) == 0) { + return new SWGDeviceSetList(); + } + if(QString("SWGErrorResponse").compare(type) == 0) { + return new SWGErrorResponse(); + } + if(QString("SWGInstanceChannelsResponse").compare(type) == 0) { + return new SWGInstanceChannelsResponse(); + } + if(QString("SWGInstanceDevicesResponse").compare(type) == 0) { + return new SWGInstanceDevicesResponse(); + } + if(QString("SWGInstanceSummaryResponse").compare(type) == 0) { + return new SWGInstanceSummaryResponse(); + } + if(QString("SWGLocationInformation").compare(type) == 0) { + return new SWGLocationInformation(); + } + if(QString("SWGLoggingInfo").compare(type) == 0) { + return new SWGLoggingInfo(); + } + if(QString("SWGPresetGroup").compare(type) == 0) { + return new SWGPresetGroup(); + } + if(QString("SWGPresetIdentifier").compare(type) == 0) { + return new SWGPresetIdentifier(); + } + if(QString("SWGPresetItem").compare(type) == 0) { + return new SWGPresetItem(); + } + if(QString("SWGPresetTransfer").compare(type) == 0) { + return new SWGPresetTransfer(); + } + if(QString("SWGPresets").compare(type) == 0) { + return new SWGPresets(); + } + if(QString("SWGSamplingDevice").compare(type) == 0) { + return new SWGSamplingDevice(); + } + if(QString("SWGUser").compare(type) == 0) { + return new SWGUser(); + } + + return NULL; + } + + inline void* create(QString json, QString type) { + void* val = create(type); + if(val != NULL) { + SWGObject* obj = static_cast(val); + return obj->fromJson(json); + } + if(type.startsWith("QString")) { + return new QString(); + } + return NULL; + } +} /* namespace Swagger */ + +#endif /* ModelFactory_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGObject.h b/swagger/sdrangel/code/qt5/client/SWGObject.h new file mode 100644 index 000000000..269478a2f --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGObject.h @@ -0,0 +1,48 @@ +/** + * 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. + * + * 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. + */ + +#ifndef _SWG_OBJECT_H_ +#define _SWG_OBJECT_H_ + +#include + +class SWGObject { + public: + virtual QJsonObject* asJsonObject() { + return NULL; + } + virtual ~SWGObject() {} + virtual SWGObject* fromJson(QString &jsonString) { + Q_UNUSED(jsonString); + return NULL; + } + virtual void fromJsonObject(QJsonObject &json) { + Q_UNUSED(json); + } + virtual QString asJson() { + return QString(""); + } +}; + +#endif /* _SWG_OBJECT_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetGroup.cpp b/swagger/sdrangel/code/qt5/client/SWGPresetGroup.cpp new file mode 100644 index 000000000..8297e2e58 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetGroup.cpp @@ -0,0 +1,150 @@ +/** + * 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. + * + * 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 "SWGPresetGroup.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGPresetGroup::SWGPresetGroup(QString* json) { + init(); + this->fromJson(*json); +} + +SWGPresetGroup::SWGPresetGroup() { + init(); +} + +SWGPresetGroup::~SWGPresetGroup() { + this->cleanup(); +} + +void +SWGPresetGroup::init() { + groupName = new QString(""); +nbPresets = NULL; +presets = new QList(); +} + +void +SWGPresetGroup::cleanup() { + if(groupName != NULL) { + delete groupName; + } + +if(presets != NULL) { + QList* arr = presets; + foreach(SWGPresetItem* o, *arr) { + delete o; + } + delete presets; + } +} + +SWGPresetGroup* +SWGPresetGroup::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGPresetGroup::fromJsonObject(QJsonObject &pJson) { + setValue(&groupName, pJson["groupName"], "QString", "QString"); +setValue(&nbPresets, pJson["nbPresets"], "qint32", ""); +setValue(&presets, pJson["presets"], "QList", "SWGPresetItem"); +} + +QString +SWGPresetGroup::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGPresetGroup::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("groupName"), groupName, obj, QString("QString")); + + +obj->insert("nbPresets", QJsonValue(nbPresets)); + + + QList* presetsList = presets; + QJsonArray presetsJsonArray; + toJsonArray((QList*)presets, &presetsJsonArray, "presets", "SWGPresetItem"); + + obj->insert("presets", presetsJsonArray); + + + return obj; +} + +QString* +SWGPresetGroup::getGroupName() { + return groupName; +} +void +SWGPresetGroup::setGroupName(QString* groupName) { + this->groupName = groupName; +} + +qint32 +SWGPresetGroup::getNbPresets() { + return nbPresets; +} +void +SWGPresetGroup::setNbPresets(qint32 nbPresets) { + this->nbPresets = nbPresets; +} + +QList* +SWGPresetGroup::getPresets() { + return presets; +} +void +SWGPresetGroup::setPresets(QList* presets) { + this->presets = presets; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetGroup.h b/swagger/sdrangel/code/qt5/client/SWGPresetGroup.h new file mode 100644 index 000000000..104f3cfc0 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetGroup.h @@ -0,0 +1,74 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGPresetGroup.h + * + * Group of presets + */ + +#ifndef SWGPresetGroup_H_ +#define SWGPresetGroup_H_ + +#include + + +#include "SWGPresetItem.h" +#include +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGPresetGroup: public SWGObject { +public: + SWGPresetGroup(); + SWGPresetGroup(QString* json); + virtual ~SWGPresetGroup(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGPresetGroup* fromJson(QString &jsonString); + + QString* getGroupName(); + void setGroupName(QString* groupName); +qint32 getNbPresets(); + void setNbPresets(qint32 nbPresets); +QList* getPresets(); + void setPresets(QList* presets); + +private: + QString* groupName; +qint32 nbPresets; +QList* presets; +}; + +} /* namespace Swagger */ + +#endif /* SWGPresetGroup_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.cpp b/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.cpp new file mode 100644 index 000000000..01bdaa178 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.cpp @@ -0,0 +1,162 @@ +/** + * 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. + * + * 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 "SWGPresetIdentifier.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGPresetIdentifier::SWGPresetIdentifier(QString* json) { + init(); + this->fromJson(*json); +} + +SWGPresetIdentifier::SWGPresetIdentifier() { + init(); +} + +SWGPresetIdentifier::~SWGPresetIdentifier() { + this->cleanup(); +} + +void +SWGPresetIdentifier::init() { + groupName = new QString(""); +centerFrequency = 0.0f; +type = new QString(""); +name = new QString(""); +} + +void +SWGPresetIdentifier::cleanup() { + if(groupName != NULL) { + delete groupName; + } + +if(type != NULL) { + delete type; + } +if(name != NULL) { + delete name; + } +} + +SWGPresetIdentifier* +SWGPresetIdentifier::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGPresetIdentifier::fromJsonObject(QJsonObject &pJson) { + setValue(&groupName, pJson["groupName"], "QString", "QString"); +setValue(¢erFrequency, pJson["centerFrequency"], "float", ""); +setValue(&type, pJson["type"], "QString", "QString"); +setValue(&name, pJson["name"], "QString", "QString"); +} + +QString +SWGPresetIdentifier::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGPresetIdentifier::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + + + toJsonValue(QString("groupName"), groupName, obj, QString("QString")); + + +obj->insert("centerFrequency", QJsonValue(centerFrequency)); + + + toJsonValue(QString("type"), type, obj, QString("QString")); + + + + + toJsonValue(QString("name"), name, obj, QString("QString")); + + + + return obj; +} + +QString* +SWGPresetIdentifier::getGroupName() { + return groupName; +} +void +SWGPresetIdentifier::setGroupName(QString* groupName) { + this->groupName = groupName; +} + +float +SWGPresetIdentifier::getCenterFrequency() { + return centerFrequency; +} +void +SWGPresetIdentifier::setCenterFrequency(float centerFrequency) { + this->centerFrequency = centerFrequency; +} + +QString* +SWGPresetIdentifier::getType() { + return type; +} +void +SWGPresetIdentifier::setType(QString* type) { + this->type = type; +} + +QString* +SWGPresetIdentifier::getName() { + return name; +} +void +SWGPresetIdentifier::setName(QString* name) { + this->name = name; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.h b/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.h new file mode 100644 index 000000000..cdecd7eaa --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetIdentifier.h @@ -0,0 +1,75 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGPresetIdentifier.h + * + * Settings preset item + */ + +#ifndef SWGPresetIdentifier_H_ +#define SWGPresetIdentifier_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGPresetIdentifier: public SWGObject { +public: + SWGPresetIdentifier(); + SWGPresetIdentifier(QString* json); + virtual ~SWGPresetIdentifier(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGPresetIdentifier* fromJson(QString &jsonString); + + QString* getGroupName(); + void setGroupName(QString* groupName); +float getCenterFrequency(); + void setCenterFrequency(float centerFrequency); +QString* getType(); + void setType(QString* type); +QString* getName(); + void setName(QString* name); + +private: + QString* groupName; +float centerFrequency; +QString* type; +QString* name; +}; + +} /* namespace Swagger */ + +#endif /* SWGPresetIdentifier_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetItem.cpp b/swagger/sdrangel/code/qt5/client/SWGPresetItem.cpp new file mode 100644 index 000000000..348ae98f9 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetItem.cpp @@ -0,0 +1,143 @@ +/** + * 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. + * + * 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 "SWGPresetItem.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGPresetItem::SWGPresetItem(QString* json) { + init(); + this->fromJson(*json); +} + +SWGPresetItem::SWGPresetItem() { + init(); +} + +SWGPresetItem::~SWGPresetItem() { + this->cleanup(); +} + +void +SWGPresetItem::init() { + centerFrequency = 0.0f; +type = new QString(""); +name = new QString(""); +} + +void +SWGPresetItem::cleanup() { + +if(type != NULL) { + delete type; + } +if(name != NULL) { + delete name; + } +} + +SWGPresetItem* +SWGPresetItem::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGPresetItem::fromJsonObject(QJsonObject &pJson) { + setValue(¢erFrequency, pJson["centerFrequency"], "float", ""); +setValue(&type, pJson["type"], "QString", "QString"); +setValue(&name, pJson["name"], "QString", "QString"); +} + +QString +SWGPresetItem::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGPresetItem::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("centerFrequency", QJsonValue(centerFrequency)); + + + toJsonValue(QString("type"), type, obj, QString("QString")); + + + + + toJsonValue(QString("name"), name, obj, QString("QString")); + + + + return obj; +} + +float +SWGPresetItem::getCenterFrequency() { + return centerFrequency; +} +void +SWGPresetItem::setCenterFrequency(float centerFrequency) { + this->centerFrequency = centerFrequency; +} + +QString* +SWGPresetItem::getType() { + return type; +} +void +SWGPresetItem::setType(QString* type) { + this->type = type; +} + +QString* +SWGPresetItem::getName() { + return name; +} +void +SWGPresetItem::setName(QString* name) { + this->name = name; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetItem.h b/swagger/sdrangel/code/qt5/client/SWGPresetItem.h new file mode 100644 index 000000000..6fb631da5 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetItem.h @@ -0,0 +1,72 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGPresetItem.h + * + * Settings preset item + */ + +#ifndef SWGPresetItem_H_ +#define SWGPresetItem_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGPresetItem: public SWGObject { +public: + SWGPresetItem(); + SWGPresetItem(QString* json); + virtual ~SWGPresetItem(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGPresetItem* fromJson(QString &jsonString); + + float getCenterFrequency(); + void setCenterFrequency(float centerFrequency); +QString* getType(); + void setType(QString* type); +QString* getName(); + void setName(QString* name); + +private: + float centerFrequency; +QString* type; +QString* name; +}; + +} /* namespace Swagger */ + +#endif /* SWGPresetItem_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.cpp b/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.cpp new file mode 100644 index 000000000..736ff5e17 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.cpp @@ -0,0 +1,124 @@ +/** + * 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. + * + * 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 "SWGPresetTransfer.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGPresetTransfer::SWGPresetTransfer(QString* json) { + init(); + this->fromJson(*json); +} + +SWGPresetTransfer::SWGPresetTransfer() { + init(); +} + +SWGPresetTransfer::~SWGPresetTransfer() { + this->cleanup(); +} + +void +SWGPresetTransfer::init() { + deviceSetIndex = NULL; +preset = new SWGPresetIdentifier(); +} + +void +SWGPresetTransfer::cleanup() { + +if(preset != NULL) { + delete preset; + } +} + +SWGPresetTransfer* +SWGPresetTransfer::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGPresetTransfer::fromJsonObject(QJsonObject &pJson) { + setValue(&deviceSetIndex, pJson["deviceSetIndex"], "qint32", ""); +setValue(&preset, pJson["preset"], "SWGPresetIdentifier", "SWGPresetIdentifier"); +} + +QString +SWGPresetTransfer::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGPresetTransfer::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("deviceSetIndex", QJsonValue(deviceSetIndex)); + + + toJsonValue(QString("preset"), preset, obj, QString("SWGPresetIdentifier")); + + + + return obj; +} + +qint32 +SWGPresetTransfer::getDeviceSetIndex() { + return deviceSetIndex; +} +void +SWGPresetTransfer::setDeviceSetIndex(qint32 deviceSetIndex) { + this->deviceSetIndex = deviceSetIndex; +} + +SWGPresetIdentifier* +SWGPresetTransfer::getPreset() { + return preset; +} +void +SWGPresetTransfer::setPreset(SWGPresetIdentifier* preset) { + this->preset = preset; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.h b/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.h new file mode 100644 index 000000000..f8338c0b9 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresetTransfer.h @@ -0,0 +1,69 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGPresetTransfer.h + * + * Preset transfer to or from a device set + */ + +#ifndef SWGPresetTransfer_H_ +#define SWGPresetTransfer_H_ + +#include + + +#include "SWGPresetIdentifier.h" + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGPresetTransfer: public SWGObject { +public: + SWGPresetTransfer(); + SWGPresetTransfer(QString* json); + virtual ~SWGPresetTransfer(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGPresetTransfer* fromJson(QString &jsonString); + + qint32 getDeviceSetIndex(); + void setDeviceSetIndex(qint32 deviceSetIndex); +SWGPresetIdentifier* getPreset(); + void setPreset(SWGPresetIdentifier* preset); + +private: + qint32 deviceSetIndex; +SWGPresetIdentifier* preset; +}; + +} /* namespace Swagger */ + +#endif /* SWGPresetTransfer_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGPresets.cpp b/swagger/sdrangel/code/qt5/client/SWGPresets.cpp new file mode 100644 index 000000000..6645e4f63 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresets.cpp @@ -0,0 +1,131 @@ +/** + * 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. + * + * 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 "SWGPresets.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGPresets::SWGPresets(QString* json) { + init(); + this->fromJson(*json); +} + +SWGPresets::SWGPresets() { + init(); +} + +SWGPresets::~SWGPresets() { + this->cleanup(); +} + +void +SWGPresets::init() { + nbGroups = NULL; +groups = new QList(); +} + +void +SWGPresets::cleanup() { + +if(groups != NULL) { + QList* arr = groups; + foreach(SWGPresetGroup* o, *arr) { + delete o; + } + delete groups; + } +} + +SWGPresets* +SWGPresets::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGPresets::fromJsonObject(QJsonObject &pJson) { + setValue(&nbGroups, pJson["nbGroups"], "qint32", ""); +setValue(&groups, pJson["groups"], "QList", "SWGPresetGroup"); +} + +QString +SWGPresets::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGPresets::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("nbGroups", QJsonValue(nbGroups)); + + + QList* groupsList = groups; + QJsonArray groupsJsonArray; + toJsonArray((QList*)groups, &groupsJsonArray, "groups", "SWGPresetGroup"); + + obj->insert("groups", groupsJsonArray); + + + return obj; +} + +qint32 +SWGPresets::getNbGroups() { + return nbGroups; +} +void +SWGPresets::setNbGroups(qint32 nbGroups) { + this->nbGroups = nbGroups; +} + +QList* +SWGPresets::getGroups() { + return groups; +} +void +SWGPresets::setGroups(QList* groups) { + this->groups = groups; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGPresets.h b/swagger/sdrangel/code/qt5/client/SWGPresets.h new file mode 100644 index 000000000..b9e7a9255 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGPresets.h @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGPresets.h + * + * Settings presets + */ + +#ifndef SWGPresets_H_ +#define SWGPresets_H_ + +#include + + +#include "SWGPresetGroup.h" +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGPresets: public SWGObject { +public: + SWGPresets(); + SWGPresets(QString* json); + virtual ~SWGPresets(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGPresets* fromJson(QString &jsonString); + + qint32 getNbGroups(); + void setNbGroups(qint32 nbGroups); +QList* getGroups(); + void setGroups(QList* groups); + +private: + qint32 nbGroups; +QList* groups; +}; + +} /* namespace Swagger */ + +#endif /* SWGPresets_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.cpp b/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.cpp new file mode 100644 index 000000000..992698e67 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.cpp @@ -0,0 +1,221 @@ +/** + * 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. + * + * 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 "SWGSamplingDevice.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGSamplingDevice::SWGSamplingDevice(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSamplingDevice::SWGSamplingDevice() { + init(); +} + +SWGSamplingDevice::~SWGSamplingDevice() { + this->cleanup(); +} + +void +SWGSamplingDevice::init() { + index = NULL; +hwType = new QString(""); +tx = false; +nbStreams = NULL; +streamIndex = NULL; +sequence = NULL; +serial = new QString(""); +centerFrequency = 0L; +bandwidth = NULL; +} + +void +SWGSamplingDevice::cleanup() { + +if(hwType != NULL) { + delete hwType; + } + + + + +if(serial != NULL) { + delete serial; + } + + +} + +SWGSamplingDevice* +SWGSamplingDevice::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSamplingDevice::fromJsonObject(QJsonObject &pJson) { + setValue(&index, pJson["index"], "qint32", ""); +setValue(&hwType, pJson["hwType"], "QString", "QString"); +setValue(&tx, pJson["tx"], "bool", ""); +setValue(&nbStreams, pJson["nbStreams"], "qint32", ""); +setValue(&streamIndex, pJson["streamIndex"], "qint32", ""); +setValue(&sequence, pJson["sequence"], "qint32", ""); +setValue(&serial, pJson["serial"], "QString", "QString"); +setValue(¢erFrequency, pJson["centerFrequency"], "qint64", ""); +setValue(&bandwidth, pJson["bandwidth"], "qint32", ""); +} + +QString +SWGSamplingDevice::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGSamplingDevice::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("index", QJsonValue(index)); + + + toJsonValue(QString("hwType"), hwType, obj, QString("QString")); + + +obj->insert("tx", QJsonValue(tx)); +obj->insert("nbStreams", QJsonValue(nbStreams)); +obj->insert("streamIndex", QJsonValue(streamIndex)); +obj->insert("sequence", QJsonValue(sequence)); + + + toJsonValue(QString("serial"), serial, obj, QString("QString")); + + +obj->insert("centerFrequency", QJsonValue(centerFrequency)); +obj->insert("bandwidth", QJsonValue(bandwidth)); + + return obj; +} + +qint32 +SWGSamplingDevice::getIndex() { + return index; +} +void +SWGSamplingDevice::setIndex(qint32 index) { + this->index = index; +} + +QString* +SWGSamplingDevice::getHwType() { + return hwType; +} +void +SWGSamplingDevice::setHwType(QString* hwType) { + this->hwType = hwType; +} + +bool +SWGSamplingDevice::getTx() { + return tx; +} +void +SWGSamplingDevice::setTx(bool tx) { + this->tx = tx; +} + +qint32 +SWGSamplingDevice::getNbStreams() { + return nbStreams; +} +void +SWGSamplingDevice::setNbStreams(qint32 nbStreams) { + this->nbStreams = nbStreams; +} + +qint32 +SWGSamplingDevice::getStreamIndex() { + return streamIndex; +} +void +SWGSamplingDevice::setStreamIndex(qint32 streamIndex) { + this->streamIndex = streamIndex; +} + +qint32 +SWGSamplingDevice::getSequence() { + return sequence; +} +void +SWGSamplingDevice::setSequence(qint32 sequence) { + this->sequence = sequence; +} + +QString* +SWGSamplingDevice::getSerial() { + return serial; +} +void +SWGSamplingDevice::setSerial(QString* serial) { + this->serial = serial; +} + +qint64 +SWGSamplingDevice::getCenterFrequency() { + return centerFrequency; +} +void +SWGSamplingDevice::setCenterFrequency(qint64 centerFrequency) { + this->centerFrequency = centerFrequency; +} + +qint32 +SWGSamplingDevice::getBandwidth() { + return bandwidth; +} +void +SWGSamplingDevice::setBandwidth(qint32 bandwidth) { + this->bandwidth = bandwidth; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.h b/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.h new file mode 100644 index 000000000..a4abf55bc --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSamplingDevice.h @@ -0,0 +1,90 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGSamplingDevice.h + * + * Information about a logical device available from an attached hardware device that can be used as a sampling device + */ + +#ifndef SWGSamplingDevice_H_ +#define SWGSamplingDevice_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGSamplingDevice: public SWGObject { +public: + SWGSamplingDevice(); + SWGSamplingDevice(QString* json); + virtual ~SWGSamplingDevice(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGSamplingDevice* fromJson(QString &jsonString); + + qint32 getIndex(); + void setIndex(qint32 index); +QString* getHwType(); + void setHwType(QString* hwType); +bool getTx(); + void setTx(bool tx); +qint32 getNbStreams(); + void setNbStreams(qint32 nbStreams); +qint32 getStreamIndex(); + void setStreamIndex(qint32 streamIndex); +qint32 getSequence(); + void setSequence(qint32 sequence); +QString* getSerial(); + void setSerial(QString* serial); +qint64 getCenterFrequency(); + void setCenterFrequency(qint64 centerFrequency); +qint32 getBandwidth(); + void setBandwidth(qint32 bandwidth); + +private: + qint32 index; +QString* hwType; +bool tx; +qint32 nbStreams; +qint32 streamIndex; +qint32 sequence; +QString* serial; +qint64 centerFrequency; +qint32 bandwidth; +}; + +} /* namespace Swagger */ + +#endif /* SWGSamplingDevice_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGUser.cpp b/swagger/sdrangel/code/qt5/client/SWGUser.cpp new file mode 100644 index 000000000..1c1ccfd56 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGUser.cpp @@ -0,0 +1,124 @@ +/** + * 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. + * + * 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 "SWGUser.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace Swagger { + + +SWGUser::SWGUser(QString* json) { + init(); + this->fromJson(*json); +} + +SWGUser::SWGUser() { + init(); +} + +SWGUser::~SWGUser() { + this->cleanup(); +} + +void +SWGUser::init() { + index = NULL; +name = new QString(""); +} + +void +SWGUser::cleanup() { + +if(name != NULL) { + delete name; + } +} + +SWGUser* +SWGUser::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGUser::fromJsonObject(QJsonObject &pJson) { + setValue(&index, pJson["index"], "qint32", ""); +setValue(&name, pJson["name"], "QString", "QString"); +} + +QString +SWGUser::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + return QString(bytes); +} + +QJsonObject* +SWGUser::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + obj->insert("index", QJsonValue(index)); + + + toJsonValue(QString("name"), name, obj, QString("QString")); + + + + return obj; +} + +qint32 +SWGUser::getIndex() { + return index; +} +void +SWGUser::setIndex(qint32 index) { + this->index = index; +} + +QString* +SWGUser::getName() { + return name; +} +void +SWGUser::setName(QString* name) { + this->name = name; +} + + + +} /* namespace Swagger */ + diff --git a/swagger/sdrangel/code/qt5/client/SWGUser.h b/swagger/sdrangel/code/qt5/client/SWGUser.h new file mode 100644 index 000000000..7f7abdd83 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGUser.h @@ -0,0 +1,69 @@ +/** + * 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. + * + * 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. + */ + +/* + * SWGUser.h + * + * + */ + +#ifndef SWGUser_H_ +#define SWGUser_H_ + +#include + + +#include + +#include "SWGObject.h" + + +namespace Swagger { + +class SWGUser: public SWGObject { +public: + SWGUser(); + SWGUser(QString* json); + virtual ~SWGUser(); + void init(); + void cleanup(); + + QString asJson (); + QJsonObject* asJsonObject(); + void fromJsonObject(QJsonObject &json); + SWGUser* fromJson(QString &jsonString); + + qint32 getIndex(); + void setIndex(qint32 index); +QString* getName(); + void setName(QString* name); + +private: + qint32 index; +QString* name; +}; + +} /* namespace Swagger */ + +#endif /* SWGUser_H_ */ diff --git a/swagger/sdrangel/code/qt5/fix/fixhelper.sh b/swagger/sdrangel/code/qt5/fix/fixhelper.sh new file mode 100755 index 000000000..d22c6cb73 --- /dev/null +++ b/swagger/sdrangel/code/qt5/fix/fixhelper.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sed -i '1s/^/#include \n/' ${1}