Last change
on this file since 10403 was 9795, checked in by stuerze, 2 years ago |
consideration of client SSL certificates, if they are available
|
File size:
1.7 KB
|
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>
|
---|
[9795] | 10 | #include <QSslKey>
|
---|
[9707] | 11 | #include <iostream>
|
---|
[3172] | 12 |
|
---|
[9707] | 13 |
|
---|
[3206] | 14 | class bncUploadCaster : public QThread {
|
---|
[3172] | 15 | Q_OBJECT
|
---|
| 16 | public:
|
---|
| 17 | bncUploadCaster(const QString& mountpoint,
|
---|
[8275] | 18 | const QString& outHost, int outPort,
|
---|
| 19 | const QString& ntripVersion,
|
---|
| 20 | const QString& userName, const QString& password,
|
---|
| 21 | int iRow, int rate);
|
---|
[3224] | 22 | virtual void deleteSafely();
|
---|
[3252] | 23 | void setOutBuffer(const QByteArray& outBuffer) {
|
---|
| 24 | QMutexLocker locker(&_mutex);
|
---|
| 25 | _outBuffer = outBuffer;
|
---|
| 26 | }
|
---|
[3224] | 27 |
|
---|
[3207] | 28 | protected:
|
---|
[3226] | 29 | virtual ~bncUploadCaster();
|
---|
[8275] | 30 | QMutex _mutex;
|
---|
[3226] | 31 | QByteArray _outBuffer;
|
---|
[3172] | 32 |
|
---|
| 33 | signals:
|
---|
[3189] | 34 | void newMessage(const QByteArray msg, bool showOnScreen);
|
---|
[3234] | 35 | void newBytes(QByteArray staID, double nbyte);
|
---|
[3172] | 36 |
|
---|
[9707] | 37 | private slots:
|
---|
| 38 | void slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
|
---|
[9726] | 39 | void slotSslErrors(QList<QSslError>);
|
---|
[9707] | 40 |
|
---|
[3172] | 41 | private:
|
---|
[3226] | 42 | void open();
|
---|
[9715] | 43 | bool connectToHost(QString outHost, int outPort, bool encrypted);
|
---|
[3226] | 44 | virtual void run();
|
---|
| 45 | bool _isToBeDeleted;
|
---|
| 46 | QString _mountpoint;
|
---|
| 47 | QString _outHost;
|
---|
| 48 | int _outPort;
|
---|
[9707] | 49 | QString _casterOutHost;
|
---|
| 50 | int _casterOutPort;
|
---|
[9715] | 51 | QString _proxyOutHost;
|
---|
| 52 | int _proxyOutPort;
|
---|
[9795] | 53 | QString _crtFileName;
|
---|
| 54 | QString _keyFileName;
|
---|
[8275] | 55 | QString _userName;
|
---|
[3226] | 56 | QString _password;
|
---|
[8275] | 57 | QString _ntripVersion;
|
---|
[9707] | 58 | QString _postExtension;
|
---|
[8275] | 59 | bool _secure;
|
---|
[9707] | 60 | bool _sslIgnoreErrors;
|
---|
[9714] | 61 | bool _proxy;
|
---|
[9707] | 62 | QSslSocket* _outSocket;
|
---|
[3226] | 63 | int _sOpenTrial;
|
---|
| 64 | QDateTime _outSocketOpenTime;
|
---|
[3233] | 65 | int _iRow;
|
---|
[3273] | 66 | int _rate;
|
---|
[3172] | 67 | };
|
---|
| 68 |
|
---|
| 69 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.