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