mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 07:10:25 -08:00
boom
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user