| Line | |
|---|
| 1 | #ifndef BNCUPLOADCASTER_H
|
|---|
| 2 | #define BNCUPLOADCASTER_H
|
|---|
| 3 |
|
|---|
| 4 | #include <QtNetwork>
|
|---|
| 5 |
|
|---|
| 6 | class bncUploadCaster : public QObject {
|
|---|
| 7 | Q_OBJECT
|
|---|
| 8 | public:
|
|---|
| 9 | bncUploadCaster(const QString& mountpoint,
|
|---|
| 10 | const QString& outHost, int outPort,
|
|---|
| 11 | const QString& password,
|
|---|
| 12 | const QString& outFileName);
|
|---|
| 13 | virtual ~bncUploadCaster();
|
|---|
| 14 | void open();
|
|---|
| 15 | void write(char* buffer, unsigned len);
|
|---|
| 16 | void printAscii(const QString& line);
|
|---|
| 17 | bool usedSocket() const {return _outSocket;}
|
|---|
| 18 |
|
|---|
| 19 | signals:
|
|---|
| 20 | void error(const QByteArray msg);
|
|---|
| 21 | void newMessage(const QByteArray msg);
|
|---|
| 22 |
|
|---|
| 23 | private:
|
|---|
| 24 | QString _mountpoint;
|
|---|
| 25 | QString _outHost;
|
|---|
| 26 | int _outPort;
|
|---|
| 27 | QString _password;
|
|---|
| 28 | QTcpSocket* _outSocket;
|
|---|
| 29 | int _sOpenTrial;
|
|---|
| 30 | QDateTime _outSocketOpenTime;
|
|---|
| 31 | QFile* _outFile;
|
|---|
| 32 | QTextStream* _outStream;
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.