mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 16:53:00 -07:00
restructured protocol code
This commit is contained in:
parent
122f8ea916
commit
694070724c
32 changed files with 1202 additions and 2081 deletions
|
|
@ -14,6 +14,7 @@ class QXmlStreamWriter;
|
|||
|
||||
class ProtocolItem;
|
||||
class ProtocolResponse;
|
||||
class TopLevelProtocolItem;
|
||||
class ChatEvent;
|
||||
class GameEvent;
|
||||
class Event_ListGames;
|
||||
|
|
@ -56,6 +57,7 @@ private slots:
|
|||
void slotSocketError(QAbstractSocket::SocketError error);
|
||||
void ping();
|
||||
void loginResponse(ResponseCode response);
|
||||
void processProtocolItem(ProtocolItem *item);
|
||||
private:
|
||||
static const int maxTimeout = 10;
|
||||
|
||||
|
|
@ -64,11 +66,10 @@ private:
|
|||
QTcpSocket *socket;
|
||||
QXmlStreamReader *xmlReader;
|
||||
QXmlStreamWriter *xmlWriter;
|
||||
ProtocolItem *currentItem;
|
||||
TopLevelProtocolItem *topLevelItem;
|
||||
ClientStatus status;
|
||||
QString userName, password;
|
||||
void setStatus(ClientStatus _status);
|
||||
void processProtocolItem(ProtocolItem *item);
|
||||
public:
|
||||
Client(QObject *parent = 0);
|
||||
~Client();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue