Last change
on this file since 8252 was 8252, checked in by stoecker, 6 years ago |
see #105 - reenable Qt4 build options, drop generic version dependend includes, replace by direct requirements, remaining QtCore lines should also be replaced
|
File size:
1.0 KB
|
Rev | Line | |
---|
[3172] | 1 | #ifndef BNCUPLOADCASTER_H
|
---|
| 2 | #define BNCUPLOADCASTER_H
|
---|
| 3 |
|
---|
[8252] | 4 | #include <QDateTime>
|
---|
| 5 | #include <QMutex>
|
---|
| 6 | #include <QTcpSocket>
|
---|
| 7 | #include <QThread>
|
---|
[3172] | 8 |
|
---|
[3206] | 9 | class bncUploadCaster : public QThread {
|
---|
[3172] | 10 | Q_OBJECT
|
---|
| 11 | public:
|
---|
| 12 | bncUploadCaster(const QString& mountpoint,
|
---|
| 13 | const QString& outHost, int outPort,
|
---|
[3273] | 14 | const QString& password, int iRow, int rate);
|
---|
[3224] | 15 | virtual void deleteSafely();
|
---|
[3252] | 16 | void setOutBuffer(const QByteArray& outBuffer) {
|
---|
| 17 | QMutexLocker locker(&_mutex);
|
---|
| 18 | _outBuffer = outBuffer;
|
---|
| 19 | }
|
---|
[3224] | 20 |
|
---|
[3207] | 21 | protected:
|
---|
[3226] | 22 | virtual ~bncUploadCaster();
|
---|
| 23 | QMutex _mutex;
|
---|
| 24 | QByteArray _outBuffer;
|
---|
[3172] | 25 |
|
---|
| 26 | signals:
|
---|
[3189] | 27 | void newMessage(const QByteArray msg, bool showOnScreen);
|
---|
[3234] | 28 | void newBytes(QByteArray staID, double nbyte);
|
---|
[3172] | 29 |
|
---|
| 30 | private:
|
---|
[3226] | 31 | void open();
|
---|
| 32 | virtual void run();
|
---|
| 33 | bool _isToBeDeleted;
|
---|
| 34 | QString _mountpoint;
|
---|
| 35 | QString _outHost;
|
---|
| 36 | int _outPort;
|
---|
| 37 | QString _password;
|
---|
| 38 | QTcpSocket* _outSocket;
|
---|
| 39 | int _sOpenTrial;
|
---|
| 40 | QDateTime _outSocketOpenTime;
|
---|
[3233] | 41 | int _iRow;
|
---|
[3273] | 42 | int _rate;
|
---|
[3172] | 43 | };
|
---|
| 44 |
|
---|
| 45 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.