mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
boom
This commit is contained in:
parent
d329376e93
commit
1c2aa15b22
38 changed files with 638 additions and 1651 deletions
36
common/server_protocolhandler.h
Normal file
36
common/server_protocolhandler.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef SERVER_PROTOCOLHANDLER_H
|
||||
#define SERVER_PROTOCOLHANDLER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include "server.h"
|
||||
|
||||
class Server_Player;
|
||||
class Command;
|
||||
|
||||
class Server_ProtocolHandler : public QObject {
|
||||
Q_OBJECT
|
||||
private:
|
||||
Server *server;
|
||||
QMap<int, QPair<Server_Game *, Server_Player *> > games;
|
||||
QMap<QString, Server_ChatChannel *> chatChannels;
|
||||
QString playerName;
|
||||
|
||||
Server *getServer() const { return server; }
|
||||
QPair<Server_Game *, Server_Player *> getGame(int gameId) const;
|
||||
|
||||
AuthenticationResult authState;
|
||||
bool acceptsGameListChanges;
|
||||
bool acceptsChatChannelListChanges;
|
||||
public:
|
||||
Server_ProtocolHandler(Server *_server, QObject *parent = 0);
|
||||
~Server_ProtocolHandler();
|
||||
|
||||
bool getAcceptsGameListChanges() const { return acceptsGameListChanges; }
|
||||
bool getAcceptsChatChannelListChanges() const { return acceptsChatChannelListChanges; }
|
||||
const QString &getPlayerName() const { return playerName; }
|
||||
|
||||
void processCommand(Command *command);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue