source: ntrip/trunk/BNC/bncsocket.h@ 1379

Last change on this file since 1379 was 1370, checked in by mervart, 16 years ago

* empty log message *

File size: 1.2 KB
Line 
1#ifndef BNCSOCKET_H
2#define BNCSOCKET_H
3
4#include <QtNetwork>
5#include "bncconst.h"
6
7class bncSocket : public QObject {
8 Q_OBJECT
9
10 public:
11 bncSocket();
12 ~bncSocket();
13
14 void close();
15 qint64 bytesAvailable() const;
16 bool canReadLine() const;
17 QByteArray readLine();
18 void waitForReadyRead(int msecs = 30000);
19 QByteArray read(qint64 maxSize);
20 QAbstractSocket::SocketState state() const;
21
22 t_irc request(const QUrl& mountPoint, const QByteArray& latitude,
23 const QByteArray& longitude, const QByteArray& nmea,
24 const QByteArray& ntripVersion, int timeOut, QString& msg);
25
26 signals:
27 void quitEventLoop();
28 void newMessage(QByteArray msg, bool showOnScreen);
29
30 private slots:
31 void slotReplyFinished();
32 void slotReadyRead();
33 void slotError(QNetworkReply::NetworkError);
34 void slotSslErrors(const QList<QSslError>&);
35
36 private:
37 t_irc request2(const QUrl& url, const QByteArray& latitude,
38 const QByteArray& longitude, const QByteArray& nmea,
39 int timeOut, QString& msg);
40
41 QTcpSocket* _socket;
42 QNetworkAccessManager* _manager;
43 QNetworkReply* _reply;
44 QEventLoop* _eventLoop;
45 QByteArray _buffer;
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.