Rev | Line | |
---|
[1344] | 1 | #ifndef BNCSOCKET_H
|
---|
| 2 | #define BNCSOCKET_H
|
---|
| 3 |
|
---|
| 4 | #include <QtNetwork>
|
---|
[1349] | 5 | #include "bncconst.h"
|
---|
[1344] | 6 |
|
---|
[1345] | 7 | class bncSocket : public QObject {
|
---|
[1344] | 8 |
|
---|
| 9 | public:
|
---|
[1349] | 10 | bncSocket();
|
---|
[1344] | 11 | ~bncSocket();
|
---|
| 12 |
|
---|
[1345] | 13 | void close();
|
---|
| 14 | qint64 bytesAvailable() const;
|
---|
| 15 | bool canReadLine() const;
|
---|
| 16 | QByteArray readLine(qint64 maxlen = 0);
|
---|
| 17 | bool waitForReadyRead(int msecs = 30000);
|
---|
| 18 | qint64 read(char *data, qint64 maxlen);
|
---|
| 19 | qint64 write(const char *data, qint64 len);
|
---|
| 20 | bool waitForBytesWritten(int msecs = 30000);
|
---|
| 21 | void connectToHost(const QString &hostName, quint16 port,
|
---|
| 22 | QIODevice::OpenMode mode = QIODevice::ReadWrite);
|
---|
| 23 | bool waitForConnected(int msecs = 30000);
|
---|
[1344] | 24 | QAbstractSocket::SocketState state() const;
|
---|
| 25 |
|
---|
[1349] | 26 | t_irc request(const QUrl& mountPoint, const QByteArray& latitude,
|
---|
| 27 | const QByteArray& longitude, const QByteArray& nmea,
|
---|
| 28 | int timeOut, QString& msg);
|
---|
[1346] | 29 |
|
---|
[1344] | 30 | private:
|
---|
| 31 | QTcpSocket* _socket;
|
---|
| 32 | };
|
---|
| 33 |
|
---|
| 34 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.