mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 07:33:54 -07:00
new protocol code
This commit is contained in:
parent
ba8d40211c
commit
888a64b0fd
25 changed files with 487 additions and 333 deletions
|
|
@ -9,14 +9,16 @@
|
|||
|
||||
class QTimer;
|
||||
class Command;
|
||||
class CommandContainer;
|
||||
class QXmlStreamReader;
|
||||
class QXmlStreamWriter;
|
||||
|
||||
class ProtocolItem;
|
||||
class ProtocolResponse;
|
||||
class TopLevelProtocolItem;
|
||||
class CommandContainer;
|
||||
class ChatEvent;
|
||||
class GameEvent;
|
||||
class GameEventContainer;
|
||||
class Event_ListGames;
|
||||
class Event_ServerMessage;
|
||||
class Event_ListChatChannels;
|
||||
|
|
@ -45,7 +47,7 @@ signals:
|
|||
// Chat events
|
||||
void chatEventReceived(ChatEvent *event);
|
||||
// Game events
|
||||
void gameEventReceived(GameEvent *event);
|
||||
void gameEventContainerReceived(GameEventContainer *event);
|
||||
// Generic events
|
||||
void listGamesEventReceived(Event_ListGames *event);
|
||||
void serverMessageEventReceived(Event_ServerMessage *event);
|
||||
|
|
@ -63,7 +65,7 @@ private:
|
|||
static const int maxTimeout = 10;
|
||||
|
||||
QTimer *timer;
|
||||
QMap<int, Command *> pendingCommands;
|
||||
QMap<int, CommandContainer *> pendingCommands;
|
||||
QTcpSocket *socket;
|
||||
QXmlStreamReader *xmlReader;
|
||||
QXmlStreamWriter *xmlWriter;
|
||||
|
|
@ -80,6 +82,7 @@ public:
|
|||
void connectToServer(const QString &hostname, unsigned int port, const QString &_userName, const QString &_password);
|
||||
void disconnectFromServer();
|
||||
void sendCommand(Command *cmd);
|
||||
void sendCommandContainer(CommandContainer *cont);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue