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