45 lines
926 B
C++
45 lines
926 B
C++
#ifndef WEECHATRELAY_H
|
|
#define WEECHATRELAY_H
|
|
|
|
#include "qweechatrelay_global.h"
|
|
#include <QTcpSocket>
|
|
#include <zlib.h>
|
|
#include <QSslSocket>
|
|
#include <QString>
|
|
#include <QObject>
|
|
#include <list>
|
|
#include <weechatmessage.h>
|
|
//#include <iostream>
|
|
//#include <sstream>
|
|
//#include <boost/iostreams/filtering_streambuf.hpp>
|
|
//#include <boost/iostreams/copy.hpp>
|
|
//#include <boost/iostreams/filter/zlib.hpp>
|
|
|
|
#define HEADER_LENGTH 5
|
|
class QWEECHATRELAYSHARED_EXPORT WeechatRelay : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
QTcpSocket sock;
|
|
QString hostname;
|
|
QString password;
|
|
bool compression;
|
|
quint16 port;
|
|
bool ssl;
|
|
std::list<WeechatMessage*> mbuff;
|
|
|
|
public slots:
|
|
void on_connected();
|
|
void on_readyread();
|
|
|
|
signals:
|
|
void messageReady();
|
|
|
|
public:
|
|
void connectToHost(QString password, bool compression, bool ssl, QString hostname, quint16 port);
|
|
WeechatRelay();
|
|
};
|
|
|
|
|
|
#endif // WEECHATRELAY_H
|