| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | // 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 <http://www.gnu.org/licenses/>.          //
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_
 | 
					
						
							|  |  |  | #define SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  | #include <QtGlobal>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | #include "webapi/webapiadapterinterface.h"
 | 
					
						
							| 
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 |  |  | #include "util/export.h"
 | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | class MainWindow; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 |  |  | class SDRGUI_API WebAPIAdapterGUI: public WebAPIAdapterInterface | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     WebAPIAdapterGUI(MainWindow& mainWindow); | 
					
						
							|  |  |  |     virtual ~WebAPIAdapterGUI(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual int instanceSummary( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGInstanceSummaryResponse& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-06 03:46:53 +01:00
										 |  |  |     virtual int instanceDelete( | 
					
						
							| 
									
										
										
										
											2018-03-03 10:06:47 +01:00
										 |  |  |             SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							| 
									
										
										
										
											2018-01-06 03:46:53 +01:00
										 |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-22 18:57:35 +01:00
										 |  |  |     virtual int instanceDevices( | 
					
						
							|  |  |  |             bool tx, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGInstanceDevicesResponse& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-22 18:57:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-23 01:19:32 +01:00
										 |  |  |     virtual int instanceChannels( | 
					
						
							|  |  |  |             bool tx, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGInstanceChannelsResponse& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-23 01:19:32 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  |     virtual int instanceLoggingGet( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGLoggingInfo& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     virtual int instanceLoggingPut( | 
					
						
							| 
									
										
										
										
											2018-02-14 01:42:35 +01:00
										 |  |  |             SWGSDRangel::SWGLoggingInfo& query, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGLoggingInfo& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-24 08:46:12 +01:00
										 |  |  |     virtual int instanceAudioGet( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGAudioDevices& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-24 08:46:12 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-24 17:12:53 +01:00
										 |  |  |     virtual int instanceAudioPatch( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGAudioDevicesSelect& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-24 17:12:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 04:02:11 +01:00
										 |  |  |     virtual int instanceLocationGet( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGLocationInformation& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 04:02:11 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     virtual int instanceLocationPut( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGLocationInformation& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 04:02:11 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 04:43:22 +01:00
										 |  |  |     virtual int instanceDVSerialPatch( | 
					
						
							|  |  |  |             bool dvserial, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGDVSeralDevices& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 04:43:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-21 00:50:58 +01:00
										 |  |  |     virtual int instancePresetsGet( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGPresets& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 11:14:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 16:08:18 +01:00
										 |  |  |     virtual int instancePresetPatch( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGPresetTransfer& query, | 
					
						
							|  |  |  |             SWGSDRangel::SWGPresetIdentifier& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 16:08:18 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 16:47:13 +01:00
										 |  |  |     virtual int instancePresetPut( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGPresetTransfer& query, | 
					
						
							|  |  |  |             SWGSDRangel::SWGPresetIdentifier& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 16:47:13 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 18:32:37 +01:00
										 |  |  |     virtual int instancePresetPost( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGPresetTransfer& query, | 
					
						
							|  |  |  |             SWGSDRangel::SWGPresetIdentifier& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 18:32:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 19:42:56 +01:00
										 |  |  |     virtual int instancePresetDelete( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGPresetIdentifier& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 19:42:56 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-25 20:14:16 +01:00
										 |  |  |     virtual int instanceDeviceSetsGet( | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGDeviceSetList& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 20:14:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-22 01:07:03 +01:00
										 |  |  |     virtual int instanceDeviceSetPost( | 
					
						
							| 
									
										
										
										
											2017-11-25 22:52:24 +01:00
										 |  |  |             bool tx, | 
					
						
							| 
									
										
										
										
											2017-12-19 17:55:05 +01:00
										 |  |  |             SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 22:52:24 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-22 01:07:03 +01:00
										 |  |  |     virtual int instanceDeviceSetDelete( | 
					
						
							| 
									
										
										
										
											2017-12-19 17:55:05 +01:00
										 |  |  |             SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-25 22:52:24 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-26 10:37:39 +01:00
										 |  |  |     virtual int devicesetGet( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGDeviceSet& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-26 10:37:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-06 03:46:53 +01:00
										 |  |  |     virtual int devicesetFocusPatch( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-27 08:14:07 +01:00
										 |  |  |     virtual int devicesetDevicePut( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							| 
									
										
										
										
											2018-02-14 13:40:34 +01:00
										 |  |  |             SWGSDRangel::SWGDeviceListItem& query, | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |             SWGSDRangel::SWGDeviceListItem& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							| 
									
										
										
										
											2017-11-27 08:14:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-06 22:08:34 +01:00
										 |  |  |     virtual int devicesetDeviceSettingsGet( | 
					
						
							| 
									
										
										
										
											2017-12-04 18:22:25 +01:00
										 |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGDeviceSettings& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-07 13:55:42 +01:00
										 |  |  |     virtual int devicesetDeviceSettingsPutPatch( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             bool force, | 
					
						
							| 
									
										
										
										
											2017-12-27 01:46:33 +01:00
										 |  |  |             const QStringList& deviceSettingsKeys, | 
					
						
							| 
									
										
										
										
											2017-12-07 13:55:42 +01:00
										 |  |  |             SWGSDRangel::SWGDeviceSettings& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-09 10:49:20 +01:00
										 |  |  |     virtual int devicesetDeviceRunGet( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGDeviceState& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-08 17:12:33 +01:00
										 |  |  |     virtual int devicesetDeviceRunPost( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGDeviceState& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtual int devicesetDeviceRunDelete( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGDeviceState& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-11 01:18:10 +01:00
										 |  |  |     virtual int devicesetChannelPost( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							| 
									
										
										
										
											2017-12-19 17:55:05 +01:00
										 |  |  |             SWGSDRangel::SWGChannelSettings& query, | 
					
						
							|  |  |  | 			SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							| 
									
										
										
										
											2017-12-11 01:18:10 +01:00
										 |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 23:41:37 +01:00
										 |  |  |     virtual int devicesetChannelDelete( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             int channelIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGSuccessResponse& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-10 20:27:08 +01:00
										 |  |  |     virtual int devicesetChannelSettingsGet( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             int channelIndex, | 
					
						
							|  |  |  |             SWGSDRangel::SWGChannelSettings& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-11 18:18:47 +01:00
										 |  |  |     virtual int devicesetChannelSettingsPutPatch( | 
					
						
							|  |  |  |             int deviceSetIndex, | 
					
						
							|  |  |  |             int channelIndex, | 
					
						
							|  |  |  |             bool force, | 
					
						
							| 
									
										
										
										
											2017-12-24 03:27:07 +01:00
										 |  |  |             const QStringList& channelSettingsKeys, | 
					
						
							| 
									
										
										
										
											2017-12-11 18:18:47 +01:00
										 |  |  |             SWGSDRangel::SWGChannelSettings& response, | 
					
						
							|  |  |  |             SWGSDRangel::SWGErrorResponse& error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | private: | 
					
						
							|  |  |  |     MainWindow& m_mainWindow; | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-02 05:45:30 +01:00
										 |  |  |     void getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList); | 
					
						
							|  |  |  |     void getDeviceSet(SWGSDRangel::SWGDeviceSet *deviceSet, const DeviceUISet* deviceUISet, int deviceUISetIndex); | 
					
						
							| 
									
										
										
										
											2017-11-23 18:43:01 +01:00
										 |  |  |     static QtMsgType getMsgTypeFromString(const QString& msgTypeString); | 
					
						
							|  |  |  |     static void getMsgTypeString(const QtMsgType& msgType, QString& level); | 
					
						
							| 
									
										
										
										
											2017-11-18 19:34:47 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* SDRGUI_WEBAPI_WEBAPIADAPTERGUI_H_ */
 |