more ISL code: join, leave, and userMessage work on both sides

This commit is contained in:
Max-Wilhelm Bruker 2012-03-11 17:25:45 +01:00
parent 5963c2239c
commit 0ae18d7b2e
16 changed files with 363 additions and 112 deletions

View file

@ -4,12 +4,18 @@
#include "servatrice.h"
#include <QSslCertificate>
#include <QWaitCondition>
#include "pb/serverinfo_user.pb.h"
class Servatrice;
class QSslSocket;
class QSslKey;
class IslMessage;
class Event_ServerCompleteList;
class Event_UserMessage;
class Event_UserJoined;
class Event_UserLeft;
class IslInterface : public QObject {
Q_OBJECT
private slots:
@ -18,6 +24,9 @@ private slots:
void flushOutputBuffer();
signals:
void outputBufferChanged();
void externalUserJoined(ServerInfo_User userInfo);
void externalUserLeft(QString name);
private:
int serverId;
int socketDescriptor;
@ -33,6 +42,13 @@ private:
bool messageInProgress;
int messageLength;
void sessionEvent_ServerCompleteList(const Event_ServerCompleteList &event);
void sessionEvent_UserMessage(const SessionEvent &sessionEvent, const Event_UserMessage &event);
void sessionEvent_UserJoined(const Event_UserJoined &event);
void sessionEvent_UserLeft(const Event_UserLeft &event);
void processSessionEvent(const SessionEvent &event);
void processMessage(const IslMessage &item);
void sharedCtor(const QSslCertificate &cert, const QSslKey &privateKey);
public slots: