Reverse API: RTL-SDR input changes (1)

This commit is contained in:
f4exb
2018-12-17 08:51:59 +01:00
parent 6f81f4a7d7
commit 2b69d48c75
5 changed files with 166 additions and 1 deletions
@@ -20,6 +20,7 @@
#include <QString>
#include <QByteArray>
#include <QNetworkRequest>
#include <dsp/devicesamplesource.h>
#include "rtlsdrsettings.h"
@@ -28,6 +29,8 @@
class DeviceSourceAPI;
class RTLSDRThread;
class FileRecord;
class QNetworkAccessManager;
class QNetworkReply;
class RTLSDRInput : public DeviceSampleSource {
public:
@@ -156,12 +159,18 @@ private:
QString m_deviceDescription;
std::vector<int> m_gains;
bool m_running;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
bool openDevice();
void closeDevice();
bool applySettings(const RTLSDRSettings& settings, bool force);
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RTLSDRSettings& settings);
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
void webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const RTLSDRSettings& settings, bool force);
private slots:
void networkManagerFinished(QNetworkReply *reply);
};
#endif // INCLUDE_RTLSDRINPUT_H