diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /wsprnet.h | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'wsprnet.h')
| -rw-r--r-- | wsprnet.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/wsprnet.h b/wsprnet.h new file mode 100644 index 00000000..d712d527 --- /dev/null +++ b/wsprnet.h @@ -0,0 +1,46 @@ +#ifndef WSPRNET_H +#define WSPRNET_H + +#include <QObject> +#include <QString> +#include <QList> +#include <QHash> +#include <QQueue> + +class QNetworkAccessManager; +class QTimer; +class QNetworkReply; + +class WSPRNet : public QObject +{ + Q_OBJECT; + +public: + explicit WSPRNet(QNetworkAccessManager *, QObject *parent = nullptr); + void upload(QString const& call, QString const& grid, QString const& rfreq, QString const& tfreq, + QString const& mode, QString const& tpct, QString const& dbm, QString const& version, + QString const& fileName); + static bool decodeLine(QString const& line, QHash<QString,QString> &query); + +signals: + void uploadStatus(QString); + +public slots: + void networkReply(QNetworkReply *); + void work(); + void abortOutstandingRequests (); + +private: + QNetworkAccessManager *networkManager; + QList<QNetworkReply *> m_outstandingRequests; + QString m_call, m_grid, m_rfreq, m_tfreq, m_mode, m_tpct, m_dbm, m_vers, m_file; + QQueue<QString> urlQueue; + QTimer *uploadTimer; + int m_urlQueueSize; + int m_uploadType; + + QString urlEncodeNoSpot(); + QString urlEncodeSpot(QHash<QString,QString> const& spot); +}; + +#endif // WSPRNET_H |
