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

Last change on this file since 9714 was 9714, checked in by stuerze, 8 weeks ago

minor changes

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