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

Last change on this file since 9715 was 9715, checked in by stuerze, 3 months ago

minor changes

File size: 1.6 KB
Line 
1#ifndef BNCUPLOADCASTER_H
2#define BNCUPLOADCASTER_H
3
4#include <QDateTime>
5#include <QMutex>
6#include <QSslSocket>
7#include <QNetworkProxy>
8#include <QThread>
9#include <QSslError>
10#include <iostream>
11
12
13class bncUploadCaster : public QThread {
14 Q_OBJECT
15 public:
16 bncUploadCaster(const QString& mountpoint,
17 const QString& outHost, int outPort,
18 const QString& ntripVersion,
19 const QString& userName, const QString& password,
20 int iRow, int rate);
21 virtual void deleteSafely();
22 void setOutBuffer(const QByteArray& outBuffer) {
23 QMutexLocker locker(&_mutex);
24 _outBuffer = outBuffer;
25 }
26
27 protected:
28 virtual ~bncUploadCaster();
29 QMutex _mutex;
30 QByteArray _outBuffer;
31
32 signals:
33 void newMessage(const QByteArray msg, bool showOnScreen);
34 void newBytes(QByteArray staID, double nbyte);
35
36 private slots:
37 void slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
38 void slotSslErrors(QList<QSslError>);
39
40 private:
41 void open();
42 bool connectToHost(QString outHost, int outPort, bool encrypted);
43 virtual void run();
44 bool _isToBeDeleted;
45 QString _mountpoint;
46 QString _outHost;
47 int _outPort;
48 QString _casterOutHost;
49 int _casterOutPort;
50 QString _proxyOutHost;
51 int _proxyOutPort;
52 QString _userName;
53 QString _password;
54 QString _ntripVersion;
55 QString _postExtension;
56 bool _secure;
57 bool _sslIgnoreErrors;
58 bool _proxy;
59 QSslSocket* _outSocket;
60 int _sOpenTrial;
61 QDateTime _outSocketOpenTime;
62 int _iRow;
63 int _rate;
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.