#include <server_room.h>
Signals | |
| void | roomInfoChanged (const ServerInfo_Room &roomInfo) |
| void | gameListChanged (const ServerInfo_Game &gameInfo) |
Public Member Functions | |
| Server_Room (int _id, int _chatHistorySize, const QString &_name, const QString &_description, const QString &_permissionLevel, const QString &_privilegeLevel, bool _autoJoin, const QString &_joinMessage, const QStringList &_gameTypes, Server *parent) | |
| ~Server_Room () override | |
| int | getId () const |
| QString | getName () const |
| QString | getDescription () const |
| QString | getRoomPermission () const |
| QString | getRoomPrivilege () const |
| bool | getAutoJoin () const |
| bool | userMayJoin (const ServerInfo_User &userInfo) |
| QString | getJoinMessage () const |
| const QStringList & | getGameTypes () const |
| const QMap< int, Server_Game * > & | getGames () const |
| const QMap< int, ServerInfo_Game > & | getExternalGames () const |
| Server * | getServer () const |
| const ServerInfo_Room & | getInfo (ServerInfo_Room &result, bool complete, bool showGameTypes=false, bool includeExternalData=true) const |
| int | getGamesCreatedByUser (const QString &name) const |
| QList< ServerInfo_Game > | getGamesOfUser (const QString &name) const |
| QList< ServerInfo_ChatMessage > & | getChatHistory () |
| void | addClient (Server_ProtocolHandler *client) |
| void | removeClient (Server_ProtocolHandler *client) |
| void | addExternalUser (const ServerInfo_User &userInfo) |
| void | removeExternalUser (const QString &_name) |
| const QMap< QString, ServerInfo_User_Container > & | getExternalUsers () const |
| 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 | removeSaidMessages (const QString &userName, int amount, bool sendToIsl=true) |
| void | addGame (Server_Game *game) |
| void | removeGame (Server_Game *game) |
| void | sendRoomEvent (RoomEvent *event, bool sendToIsl=true) |
| RoomEvent * | prepareRoomEvent (const ::google::protobuf::Message &roomEvent) |
Public Attributes | |
| QReadWriteLock | usersLock |
| QReadWriteLock | gamesLock |
| QReadWriteLock | historyLock |
Private Slots | |
| void | broadcastGameListUpdate (const ServerInfo_Game &gameInfo, bool sendToIsl=true) |
Private Attributes | |
| int | id |
| int | chatHistorySize |
| QString | name |
| QString | description |
| QString | permissionLevel |
| QString | privilegeLevel |
| bool | autoJoin |
| QString | joinMessage |
| QStringList | gameTypes |
| QMap< int, Server_Game * > | games |
| QMap< int, ServerInfo_Game > | externalGames |
| QMap< QString, Server_ProtocolHandler * > | users |
| QMap< QString, ServerInfo_User_Container > | externalUsers |
| QList< ServerInfo_ChatMessage > | chatHistory |
| Server_Room::Server_Room | ( | int | _id, |
| int | _chatHistorySize, | ||
| const QString & | _name, | ||
| const QString & | _description, | ||
| const QString & | _permissionLevel, | ||
| const QString & | _privilegeLevel, | ||
| bool | _autoJoin, | ||
| const QString & | _joinMessage, | ||
| const QStringList & | _gameTypes, | ||
| Server * | parent ) |
|
override |
| void Server_Room::addClient | ( | Server_ProtocolHandler * | client | ) |
| void Server_Room::addExternalUser | ( | const ServerInfo_User & | userInfo | ) |
| void Server_Room::addGame | ( | Server_Game * | game | ) |
|
privateslot |
|
signal |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| int Server_Room::getGamesCreatedByUser | ( | const QString & | name | ) | const |
| QList< ServerInfo_Game > Server_Room::getGamesOfUser | ( | const QString & | name | ) | const |
|
inline |
|
inline |
| const ServerInfo_Room & Server_Room::getInfo | ( | ServerInfo_Room & | result, |
| bool | complete, | ||
| bool | showGameTypes = false, | ||
| bool | includeExternalData = true ) const |
|
inline |
|
inline |
|
inline |
|
inline |
| Server * Server_Room::getServer | ( | ) | const |
| RoomEvent * Server_Room::prepareRoomEvent | ( | const ::google::protobuf::Message & | roomEvent | ) |
| Response::ResponseCode Server_Room::processJoinGameCommand | ( | const Command_JoinGame & | cmd, |
| ResponseContainer & | rc, | ||
| Server_AbstractUserInterface * | userInterface ) |
| void Server_Room::removeClient | ( | Server_ProtocolHandler * | client | ) |
| void Server_Room::removeExternalUser | ( | const QString & | _name | ) |
| void Server_Room::removeGame | ( | Server_Game * | game | ) |
| void Server_Room::removeSaidMessages | ( | const QString & | userName, |
| int | amount, | ||
| bool | sendToIsl = true ) |
|
signal |
| void Server_Room::say | ( | const QString & | userName, |
| const QString & | s, | ||
| bool | sendToIsl = true ) |
| void Server_Room::sendRoomEvent | ( | RoomEvent * | event, |
| bool | sendToIsl = true ) |
| void Server_Room::updateExternalGameList | ( | const ServerInfo_Game & | gameInfo | ) |
| bool Server_Room::userMayJoin | ( | const ServerInfo_User & | userInfo | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutable |
|
private |
|
mutable |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutable |