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

Last change on this file since 1363 was 1363, checked in by mervart, 15 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(qint64 maxlen = 0);
18 void waitForReadyRead(int msecs = 30000);
19 qint64 read(char *data, qint64 maxlen);
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 slotDone(bool);
32 void slotRequestFinished(int, bool);
33 void slotReadyRead(const QHttpResponseHeader&);
34
35 private:
36 t_irc request2(const QUrl& url, const QByteArray& latitude,
37 const QByteArray& longitude, const QByteArray& nmea,
38 int timeOut, QString& msg);
39
40 QTcpSocket* _socket;
41 QHttp* _http;
42 QByteArray _buffer;
43 QEventLoop _eventLoop;
44};
45
46#endif
Note: See TracBrowser for help on using the repository browser.