source: ntrip/trunk/BNC/src/bncnetquery.h@ 10501

Last change on this file since 10501 was 9719, checked in by stuerze, 2 years ago

minor changes

File size: 1.0 KB
RevLine 
[1372]1#ifndef BNCNETQUERY_H
2#define BNCNETQUERY_H
3
[8252]4#include <QByteArray>
5#include <QUrl>
6
[1372]7#include "bncconst.h"
[5070]8#include "bnccore.h"
[1372]9
10class bncNetQuery : public QObject {
11 Q_OBJECT
12
13 public:
[1816]14 enum queryStatus {init, running, finished, error};
[1374]15
[1383]16 bncNetQuery() {
[9719]17 connect(this, SIGNAL(newMessage(QByteArray,bool)),
[5068]18 BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
[1383]19 }
[1711]20 virtual ~bncNetQuery() {}
[9719]21
[1390]22 virtual void stop() = 0;
[1379]23 virtual void waitForRequestResult(const QUrl& url, QByteArray& outData) = 0;
[1380]24 virtual void startRequest(const QUrl& url, const QByteArray& gga) = 0;
[6787]25 virtual void keepAliveRequest(const QUrl& url, const QByteArray& gga) = 0;
[1379]26 virtual void waitForReadyRead(QByteArray& outData) = 0;
[9719]27
[1716]28 void sendNMEA(const QByteArray& gga) {
[6787]29 keepAliveRequest(_url, gga);
[1716]30 }
[1374]31
32 queryStatus status() const {return _status;}
33
[1372]34 signals:
35 void newMessage(QByteArray msg, bool showOnScreen);
36
37 private slots:
38
[1379]39 protected:
[1499]40 queryStatus _status;
41 int _timeOut;
[1500]42 QUrl _url;
[1372]43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.