source: ntrip/trunk/BNC/src/upload/bncuploadcaster.h@ 8373

Last change on this file since 8373 was 8275, checked in by stuerze, 7 years ago

some preparation to allow Ntrip version 2 stream upload in future

File size: 1.1 KB
Line 
1#ifndef BNCUPLOADCASTER_H
2#define BNCUPLOADCASTER_H
3
4#include <QDateTime>
5#include <QMutex>
6#include <QTcpSocket>
7#include <QThread>
8
9class bncUploadCaster : public QThread {
10 Q_OBJECT
11 public:
12 bncUploadCaster(const QString& mountpoint,
13 const QString& outHost, int outPort,
14 const QString& ntripVersion,
15 const QString& userName, const QString& password,
16 int iRow, int rate);
17 virtual void deleteSafely();
18 void setOutBuffer(const QByteArray& outBuffer) {
19 QMutexLocker locker(&_mutex);
20 _outBuffer = outBuffer;
21 }
22
23 protected:
24 virtual ~bncUploadCaster();
25 QMutex _mutex;
26 QByteArray _outBuffer;
27
28 signals:
29 void newMessage(const QByteArray msg, bool showOnScreen);
30 void newBytes(QByteArray staID, double nbyte);
31
32 private:
33 void open();
34 virtual void run();
35 bool _isToBeDeleted;
36 QString _mountpoint;
37 QString _outHost;
38 int _outPort;
39 QString _userName;
40 QString _password;
41 QString _ntripVersion;
42 bool _secure;
43 QTcpSocket* _outSocket;
44 int _sOpenTrial;
45 QDateTime _outSocketOpenTime;
46 int _iRow;
47 int _rate;
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.