SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
webapiadaptergui.h
Go to the documentation of this file.
1 // Copyright (C) 2017 Edouard Griffiths, F4EXB. //
3 // //
4 // Swagger server adapter interface //
5 // //
6 // This program is free software; you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation as version 3 of the License, or //
9 // (at your option) any later version. //
10 // //
11 // This program is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14 // GNU General Public License V3 for more details. //
15 // //
16 // You should have received a copy of the GNU General Public License //
17 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
19 
20 #ifndef SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_
21 #define SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_
22 
23 #include <QtGlobal>
24 
26 #include "export.h"
27 
28 class MainWindow;
29 
31 {
32 public:
33  WebAPIAdapterGUI(MainWindow& mainWindow);
34  virtual ~WebAPIAdapterGUI();
35 
36  virtual int instanceSummary(
39 
40  virtual int instanceDelete(
43 
44  virtual int instanceConfigGet(
47 
48  virtual int instanceDevices(
49  int direction,
52 
53  virtual int instanceChannels(
54  int direction,
57 
58  virtual int instanceLoggingGet(
61 
62  virtual int instanceLoggingPut(
66 
67  virtual int instanceAudioGet(
70 
71  virtual int instanceAudioInputPatch(
73  const QStringList& audioInputKeys,
75 
76  virtual int instanceAudioOutputPatch(
78  const QStringList& audioOutputKeys,
80 
81  virtual int instanceAudioInputDelete(
84 
85  virtual int instanceAudioOutputDelete(
88 
92 
96 
97  virtual int instanceLocationGet(
100 
101  virtual int instanceLocationPut(
104 
105  virtual int instanceDVSerialGet(
108 
109  virtual int instanceDVSerialPatch(
110  bool dvserial,
113 
114  virtual int instanceAMBESerialGet(
117 
118  virtual int instanceAMBEDevicesGet(
119  SWGSDRangel::SWGAMBEDevices& response,
121 
122  virtual int instanceAMBEDevicesPut(
124  SWGSDRangel::SWGAMBEDevices& response,
126 
127  virtual int instanceAMBEDevicesPatch(
129  SWGSDRangel::SWGAMBEDevices& response,
131 
132  virtual int instanceAMBEDevicesDelete(
135 
136  virtual int instancePresetsGet(
137  SWGSDRangel::SWGPresets& response,
139 
140  virtual int instancePresetPatch(
144 
145  virtual int instancePresetPut(
149 
150  virtual int instancePresetPost(
154 
155  virtual int instancePresetDelete(
158 
159  virtual int instanceDeviceSetsGet(
162 
163  virtual int instanceDeviceSetPost(
164  int direction,
167 
168  virtual int instanceDeviceSetDelete(
171 
172  virtual int devicesetGet(
173  int deviceSetIndex,
174  SWGSDRangel::SWGDeviceSet& response,
176 
177  virtual int devicesetFocusPatch(
178  int deviceSetIndex,
181 
182  virtual int devicesetDevicePut(
183  int deviceSetIndex,
187 
188  virtual int devicesetDeviceSettingsGet(
189  int deviceSetIndex,
192 
194  int deviceSetIndex,
195  bool force,
196  const QStringList& deviceSettingsKeys,
199 
200  virtual int devicesetDeviceRunGet(
201  int deviceSetIndex,
202  SWGSDRangel::SWGDeviceState& response,
204 
205  virtual int devicesetDeviceRunPost(
206  int deviceSetIndex,
207  SWGSDRangel::SWGDeviceState& response,
209 
210  virtual int devicesetDeviceRunDelete(
211  int deviceSetIndex,
212  SWGSDRangel::SWGDeviceState& response,
214 
215  virtual int devicesetDeviceReportGet(
216  int deviceSetIndex,
219 
220  virtual int devicesetChannelsReportGet(
221  int deviceSetIndex,
224 
225  virtual int devicesetChannelPost(
226  int deviceSetIndex,
230 
231  virtual int devicesetChannelDelete(
232  int deviceSetIndex,
233  int channelIndex,
236 
237  virtual int devicesetChannelSettingsGet(
238  int deviceSetIndex,
239  int channelIndex,
242 
244  int deviceSetIndex,
245  int channelIndex,
246  bool force,
247  const QStringList& channelSettingsKeys,
250 
251  virtual int devicesetChannelReportGet(
252  int deviceSetIndex,
253  int channelIndex,
256 
257 private:
259 
260  void getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList);
261  void getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex);
262  void getChannelsDetail(SWGSDRangel::SWGChannelsDetail *channelsDetail, const DeviceUISet* deviceUISet);
263  static QtMsgType getMsgTypeFromString(const QString& msgTypeString);
264  static void getMsgTypeString(const QtMsgType& msgType, QString& level);
265 };
266 
267 #endif /* SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_ */
virtual int devicesetDeviceRunGet(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetFocusPatch(int deviceSetIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDeviceSetDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetDelete(SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelSettingsGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceSummary(SWGSDRangel::SWGInstanceSummaryResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceLocationGet(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelSettingsPutPatch(int deviceSetIndex, int channelIndex, bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceLoggingGet(SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceReportGet(int deviceSetIndex, SWGSDRangel::SWGDeviceReport &response, SWGSDRangel::SWGErrorResponse &error)
MainWindow & m_mainWindow
virtual int devicesetDeviceRunPost(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBESerialGet(SWGSDRangel::SWGDVSerialDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceRunDelete(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioInputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSet &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetPut(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
#define SDRGUI_API
Definition: export.h:52
virtual int instanceAudioOutputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesPatch(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetPost(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetsGet(SWGSDRangel::SWGPresets &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceSettingsGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioInputPatch(SWGSDRangel::SWGAudioInputDevice &response, const QStringList &audioInputKeys, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDevicePut(int deviceSetIndex, SWGSDRangel::SWGDeviceListItem &query, SWGSDRangel::SWGDeviceListItem &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioOutputDelete(SWGSDRangel::SWGAudioOutputDevice &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesGet(SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceChannels(int direction, SWGSDRangel::SWGInstanceChannelsResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioGet(SWGSDRangel::SWGAudioDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelsReportGet(int deviceSetIndex, SWGSDRangel::SWGChannelsDetail &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioOutputPatch(SWGSDRangel::SWGAudioOutputDevice &response, const QStringList &audioOutputKeys, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelReportGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelReport &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceLoggingPut(SWGSDRangel::SWGLoggingInfo &query, SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceConfigGet(SWGSDRangel::SWGInstanceConfigResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesPut(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceLocationPut(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelDelete(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceSettingsPutPatch(int deviceSetIndex, bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDeviceSetPost(int direction, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instancePresetPatch(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDeviceSetsGet(SWGSDRangel::SWGDeviceSetList &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAudioInputDelete(SWGSDRangel::SWGAudioInputDevice &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetChannelPost(int deviceSetIndex, SWGSDRangel::SWGChannelSettings &query, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDevices(int direction, SWGSDRangel::SWGInstanceDevicesResponse &response, SWGSDRangel::SWGErrorResponse &error)