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*);
|
---|
| 38 | //void slotSslErrors(QList<QSslError>);
|
---|
| 39 |
|
---|
[3172] | 40 | private:
|
---|
[3226] | 41 | void open();
|
---|
| 42 | virtual void run();
|
---|
| 43 | bool _isToBeDeleted;
|
---|
| 44 | QString _mountpoint;
|
---|
| 45 | QString _outHost;
|
---|
| 46 | int _outPort;
|
---|
[9707] | 47 | QString _casterOutHost;
|
---|
| 48 | int _casterOutPort;
|
---|
| 49 | QString _proxyHost;
|
---|
| 50 | int _proxyPort;
|
---|
[8275] | 51 | QString _userName;
|
---|
[3226] | 52 | QString _password;
|
---|
[8275] | 53 | QString _ntripVersion;
|
---|
[9707] | 54 | QString _postExtension;
|
---|
[8275] | 55 | bool _secure;
|
---|
[9707] | 56 | bool _sslIgnoreErrors;
|
---|
[9714] | 57 | bool _proxy;
|
---|
[9707] | 58 | QSslSocket* _outSocket;
|
---|
[3226] | 59 | int _sOpenTrial;
|
---|
| 60 | QDateTime _outSocketOpenTime;
|
---|
[3233] | 61 | int _iRow;
|
---|
[3273] | 62 | int _rate;
|
---|
[3172] | 63 | };
|
---|
| 64 |
|
---|
| 65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.