-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRemoteClient.hpp
More file actions
36 lines (28 loc) · 844 Bytes
/
RemoteClient.hpp
File metadata and controls
36 lines (28 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef REMOTECLIENT_HPP
#define REMOTECLIENT_HPP
#include <QObject>
class QTcpSocket;
class RemoteClient : public QObject
{
Q_OBJECT
public:
explicit RemoteClient(QTcpSocket *socket, QObject *parent = 0);
QString nickName();
signals:
void messageReceived(QString message);
void wantParticipants();
void tunneledMessageReceived(int idTo, const QByteArray &message);
public slots:
void sendMessage(QString message);
void setNickname(QString nickname);
void sendParticipants(const QList<int> &ids, const QStringList &names);
void sendTunneledMessage(int idFrom, const QByteArray &message);
protected slots:
void onReadyRead();
void sendPackage(const QByteArray &package);
protected:
QTcpSocket *m_socket;
QString m_pendingNickname;
quint32 m_size;
};
#endif // REMOTECLIENT_HPP