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

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

minor changes to test ssl

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 void slotSslSocketConnectionClosed();
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 _userName;
54 QString _password;
55 QString _ntripVersion;
56 QString _postExtension;
57 bool _secure;
58 bool _sslIgnoreErrors;
59 bool _proxy;
60 QSslSocket* _outSocket;
61 int _sOpenTrial;
62 QDateTime _outSocketOpenTime;
63 int _iRow;
64 int _rate;
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.