cleanups, games work with ISL, now we just need to clean up better when the ISL connection dies

This commit is contained in:
Max-Wilhelm Bruker 2012-03-18 18:48:14 +01:00
parent c9a8429044
commit 5db0fcd6ae
28 changed files with 570 additions and 245 deletions

View file

@ -7,8 +7,9 @@
#include <QStringList>
#include <QMutex>
#include <QReadWriteLock>
#include "pb/serverinfo_room.pb.h"
#include "serverinfo_user_container.h"
#include "pb/serverinfo_room.pb.h"
#include "pb/response.pb.h"
class Server_ProtocolHandler;
class RoomEvent;
@ -18,6 +19,10 @@ class ServerInfo_Game;
class Server_Game;
class Server;
class Command_JoinGame;
class ResponseContainer;
class Server_AbstractUserInterface;
class Server_Room : public QObject {
Q_OBJECT
signals:
@ -48,6 +53,7 @@ public:
QString getJoinMessage() const { return joinMessage; }
const QStringList &getGameTypes() const { return gameTypes; }
const QMap<int, Server_Game *> &getGames() const { return games; }
const QMap<int, ServerInfo_Game> &getExternalGames() const { return externalGames; }
Server *getServer() const;
ServerInfo_Room getInfo(bool complete, bool showGameTypes = false, bool updating = false, bool includeExternalData = true) const;
int getGamesCreatedByUser(const QString &name) const;
@ -61,6 +67,8 @@ public:
const QMap<QString, ServerInfo_User_Container> &getExternalUsers() const { return externalUsers; }
void updateExternalGameList(const ServerInfo_Game &gameInfo);
Response::ResponseCode processJoinGameCommand(const Command_JoinGame &cmd, ResponseContainer &rc, Server_AbstractUserInterface *userInterface);
void say(const QString &userName, const QString &s, bool sendToIsl = true);
void addGame(Server_Game *game);