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

Last change on this file since 8252 was 8252, checked in by stoecker, 21 months 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
Line 
1#ifndef BNCUPLOADCASTER_H
2#define BNCUPLOADCASTER_H
3
4#include <QDateTime>
5#include <QMutex>
6#include <QTcpSocket>
7#include <QThread>
8
9class bncUploadCaster : public QThread {
10 Q_OBJECT
11 public:
12  bncUploadCaster(const QString& mountpoint,
13                  const QString& outHost, int outPort,
14                  const QString& password, int iRow, int rate);
15  virtual void deleteSafely();
16  void setOutBuffer(const QByteArray& outBuffer) {
17    QMutexLocker locker(&_mutex);
18    _outBuffer = outBuffer;
19  }
20
21 protected:
22  virtual    ~bncUploadCaster();
23  QMutex     _mutex; 
24  QByteArray _outBuffer;
25
26 signals:
27  void newMessage(const QByteArray msg, bool showOnScreen);
28  void newBytes(QByteArray staID, double nbyte);
29
30 private:
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;
41  int         _iRow;
42  int         _rate;
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.