#include <servatrice.h>
Public Types | |
| enum | AuthenticationMethod { AuthenticationNone , AuthenticationSql , AuthenticationPassword } |
Public Slots | |
| void | scheduleShutdown (const QString &reason, int minutes) |
| void | updateLoginMessage () |
| void | setRequiredFeatures (const QString &featureList) |
Public Member Functions | |
| Servatrice (QObject *parent=nullptr) | |
| ~Servatrice () override | |
| bool | initServer () |
| QMap< QString, bool > | getServerRequiredFeatureList () const override |
| QString | getServerName () const |
| QString | getLoginMessage () const override |
| QString | getRequiredFeatures () const override |
| QString | getAuthenticationMethodString () const |
| QString | getDBTypeString () const |
| QString | getDbPrefix () const |
| QString | getEmailBlackList () const |
| QString | getEmailWhiteList () const |
| AuthenticationMethod | getAuthenticationMethod () const |
| bool | permitUnregisteredUsers () const override |
| bool | getGameShouldPing () const override |
| bool | getClientIDRequiredEnabled () const override |
| bool | getRegOnlyServerEnabled () const override |
| bool | getMaxUserLimitEnabled () const override |
| bool | getStoreReplaysEnabled () const override |
| bool | getRegistrationEnabled () const |
| bool | getRequireEmailForRegistrationEnabled () const |
| bool | getRequireEmailActivationEnabled () const |
| bool | getEnableLogQuery () const override |
| bool | getEnableForgotPassword () const |
| bool | getEnableForgotPasswordChallenge () const |
| bool | getEnableAudit () const |
| bool | getEnableRegistrationAudit () const |
| bool | getEnableForgotPasswordAudit () const |
| int | getMinPasswordLength () const |
| int | getIdleClientTimeout () const override |
| int | getServerID () const override |
| int | getMaxGameInactivityTime () const override |
| int | getMaxPlayerInactivityTime () const override |
| int | getClientKeepAlive () const override |
| int | getMaxUsersPerAddress () const |
| int | getMessageCountingInterval () const override |
| int | getMaxMessageCountPerInterval () const override |
| int | getMaxMessageSizePerInterval () const override |
| int | getMaxGamesPerUser () const override |
| int | getCommandCountingInterval () const override |
| int | getMaxCommandCountPerInterval () const override |
| int | getMaxUserTotal () const override |
| bool | permitCreateGameAsJudge () const override |
| int | getMaxTcpUserLimit () const |
| int | getMaxWebSocketUserLimit () const |
| int | getUsersWithAddress (const QHostAddress &address) const |
| int | getMaxAccountsPerEmail () const |
| int | getForgotPasswordTokenLife () const |
| QList< AbstractServerSocketInterface * > | getUsersWithAddressAsList (const QHostAddress &address) const |
| void | incTxBytes (quint64 num) |
| void | incRxBytes (quint64 num) |
| void | addDatabaseInterface (QThread *thread, Servatrice_DatabaseInterface *databaseInterface) |
| bool | islConnectionExists (int _serverId) const |
| void | addIslInterface (int _serverId, IslInterface *interface) |
| void | removeIslInterface (int _serverId) |
| QList< ServerProperties > | getServerList () const |
| Public Member Functions inherited from Server | |
| Server (QObject *parent=nullptr) | |
| ~Server () override=default | |
| AuthenticationResult | loginUser (Server_ProtocolHandler *session, QString &name, const QString &password, bool passwordNeedsHash, QString &reason, int &secondsLeft, QString &clientid, QString &clientVersion, QString &connectionType) |
| const QMap< int, Server_Room * > & | getRooms () |
| Server_AbstractUserInterface * | findUser (const QString &userName) const |
| const QMap< QString, Server_ProtocolHandler * > & | getUsers () const |
| const QMap< qint64, Server_ProtocolHandler * > & | getUsersBySessionId () const |
| void | addClient (Server_ProtocolHandler *player) |
| void | removeClient (Server_ProtocolHandler *player) |
| QList< QString > | getOnlineModeratorList () const |
| Server_DatabaseInterface * | getDatabaseInterface () const |
| int | getNextLocalGameId () |
| void | sendIsl_Response (const Response &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_SessionEvent (const SessionEvent &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_GameEventContainer (const GameEventContainer &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_RoomEvent (const RoomEvent &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_GameCommand (const CommandContainer &item, int serverId, qint64 sessionId, int roomId, int playerId) |
| void | sendIsl_RoomCommand (const CommandContainer &item, int serverId, qint64 sessionId, int roomId) |
| const QMap< QString, Server_AbstractUserInterface * > & | getExternalUsers () const |
| void | addPersistentPlayer (const QString &userName, int roomId, int gameId, int playerId) |
| void | removePersistentPlayer (const QString &userName, int roomId, int gameId, int playerId) |
| QList< PlayerReference > | getPersistentPlayerReferences (const QString &userName) const |
| int | getUsersCount () const |
| int | getGamesCount () const |
| int | getTCPUserCount () const |
| int | getWebSocketUserCount () const |
Public Attributes | |
| QReadWriteLock | islLock |
| Public Attributes inherited from Server | |
| QReadWriteLock | clientsLock |
| QReadWriteLock | roomsLock |
Protected Member Functions | |
| void | doSendIslMessage (const IslMessage &msg, int _serverId) override |
| Protected Member Functions inherited from Server | |
| void | prepareDestroy () |
| void | setDatabaseInterface (Server_DatabaseInterface *_databaseInterface) |
| void | addRoom (Server_Room *newRoom) |
Private Types | |
| enum | DatabaseType { DatabaseNone , DatabaseMySql } |
Private Slots | |
| void | statusUpdate () |
| void | shutdownTimeout () |
Private Member Functions | |
| void | updateServerList () |
| QString | getDBPrefixString () const |
| QString | getDBHostNameString () const |
| QString | getDBDatabaseNameString () const |
| QString | getDBUserNameString () const |
| QString | getDBPasswordString () const |
| QString | getRoomsMethodString () const |
| QString | getISLNetworkSSLCertFile () const |
| QString | getISLNetworkSSLKeyFile () const |
| int | getServerStatusUpdateTime () const |
| int | getNumberOfTCPPools () const |
| int | getServerTCPPort () const |
| int | getNumberOfWebSocketPools () const |
| int | getServerWebSocketPort () const |
| int | getISLNetworkPort () const |
| bool | getISLNetworkEnabled () const |
| bool | getEnableInternalSMTPClient () const |
| QHostAddress | getServerTCPHost () const |
| QHostAddress | getServerWebSocketHost () const |
Private Attributes | |
| AuthenticationMethod | authenticationMethod |
| DatabaseType | databaseType |
| QTimer * | pingClock |
| QTimer * | statusUpdateClock |
| Servatrice_GameServer * | gameServer |
| Servatrice_WebsocketGameServer * | websocketGameServer |
| Servatrice_IslServer * | islServer |
| QMutex | loginMessageMutex |
| QString | loginMessage |
| QString | dbPrefix |
| QMap< QString, bool > | serverRequiredFeatureList |
| QString | officialWarnings |
| Servatrice_DatabaseInterface * | servatriceDatabaseInterface |
| int | serverId |
| int | uptime |
| QMutex | txBytesMutex |
| QMutex | rxBytesMutex |
| quint64 | txBytes |
| quint64 | rxBytes |
| QString | shutdownReason |
| int | shutdownMinutes |
| int | nextShutdownMessageMinutes |
| QTimer * | shutdownTimer |
| QMutex | serverListMutex |
| QList< ServerProperties > | serverList |
| QMap< int, IslInterface * > | islInterfaces |
Additional Inherited Members | |
| Signals inherited from Server | |
| void | pingClockTimeout () |
| void | sigSendIslMessage (const IslMessage &message, int serverId) |
| void | endSession (qint64 sessionId) |
| Protected Slots inherited from Server | |
| void | externalUserJoined (const ServerInfo_User &userInfo) |
| void | externalUserLeft (const QString &userName) |
| void | externalRoomUserJoined (int roomId, const ServerInfo_User &userInfo) |
| void | externalRoomUserLeft (int roomId, const QString &userName) |
| void | externalRoomSay (int roomId, const QString &userName, const QString &message) |
| void | externalRoomRemoveMessages (int roomId, const QString &userName, int amount) |
| void | externalRoomGameListChanged (int roomId, const ServerInfo_Game &gameInfo) |
| void | externalJoinGameCommandReceived (const Command_JoinGame &cmd, int cmdId, int roomId, int serverId, qint64 sessionId) |
| void | externalGameCommandContainerReceived (const CommandContainer &cont, int playerId, int serverId, qint64 sessionId) |
| void | externalGameEventContainerReceived (const GameEventContainer &cont, qint64 sessionId) |
| void | externalResponseReceived (const Response &resp, qint64 sessionId) |
| Protected Attributes inherited from Server | |
| QList< Server_ProtocolHandler * > | clients |
| QMap< qint64, Server_ProtocolHandler * > | usersBySessionId |
| QMap< QString, Server_ProtocolHandler * > | users |
| QMap< qint64, Server_AbstractUserInterface * > | externalUsersBySessionId |
| QMap< QString, Server_AbstractUserInterface * > | externalUsers |
| QMap< int, Server_Room * > | rooms |
| QMap< QThread *, Server_DatabaseInterface * > | databaseInterfaces |
|
private |
|
explicit |
|
override |
| void Servatrice::addDatabaseInterface | ( | QThread * | thread, |
| Servatrice_DatabaseInterface * | databaseInterface ) |
| void Servatrice::addIslInterface | ( | int | _serverId, |
| IslInterface * | interface ) |
|
overrideprotectedvirtual |
|
inline |
| QString Servatrice::getAuthenticationMethodString | ( | ) | const |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reimplemented from Server.
|
private |
|
private |
|
private |
|
inline |
|
private |
| QString Servatrice::getDBTypeString | ( | ) | const |
|
private |
| QString Servatrice::getEmailBlackList | ( | ) | const |
| QString Servatrice::getEmailWhiteList | ( | ) | const |
| bool Servatrice::getEnableAudit | ( | ) | const |
| bool Servatrice::getEnableForgotPassword | ( | ) | const |
| bool Servatrice::getEnableForgotPasswordAudit | ( | ) | const |
| bool Servatrice::getEnableForgotPasswordChallenge | ( | ) | const |
|
private |
|
overridevirtual |
Reimplemented from Server.
| bool Servatrice::getEnableRegistrationAudit | ( | ) | const |
| int Servatrice::getForgotPasswordTokenLife | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from Server.
|
overridevirtual |
|
private |
|
private |
|
private |
|
private |
|
inlineoverridevirtual |
Reimplemented from Server.
| int Servatrice::getMaxAccountsPerEmail | ( | ) | const |
|
overridevirtual |
Reimplemented from Server.
|
overridevirtual |
Reimplemented from Server.
|
overridevirtual |
Reimplemented from Server.
|
overridevirtual |
Reimplemented from Server.
|
overridevirtual |
Reimplemented from Server.
|
overridevirtual |
Reimplemented from Server.
| int Servatrice::getMaxTcpUserLimit | ( | ) | const |
|
overridevirtual |
| int Servatrice::getMaxUsersPerAddress | ( | ) | const |
|
overridevirtual |
| int Servatrice::getMaxWebSocketUserLimit | ( | ) | const |
|
overridevirtual |
Reimplemented from Server.
| int Servatrice::getMinPasswordLength | ( | ) | const |
|
private |
|
private |
| bool Servatrice::getRegistrationEnabled | ( | ) | const |
|
overridevirtual |
|
overridevirtual |
| bool Servatrice::getRequireEmailActivationEnabled | ( | ) | const |
| bool Servatrice::getRequireEmailForRegistrationEnabled | ( | ) | const |
|
private |
|
overridevirtual |
| QList< ServerProperties > Servatrice::getServerList | ( | ) | const |
| QString Servatrice::getServerName | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from Server.
|
private |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
| int Servatrice::getUsersWithAddress | ( | const QHostAddress & | address | ) | const |
| QList< AbstractServerSocketInterface * > Servatrice::getUsersWithAddressAsList | ( | const QHostAddress & | address | ) | const |
| void Servatrice::incRxBytes | ( | quint64 | num | ) |
| void Servatrice::incTxBytes | ( | quint64 | num | ) |
| bool Servatrice::initServer | ( | ) |
| bool Servatrice::islConnectionExists | ( | int | _serverId | ) | const |
|
overridevirtual |
Reimplemented from Server.
|
inlineoverridevirtual |
Reimplemented from Server.
| void Servatrice::removeIslInterface | ( | int | _serverId | ) |
|
slot |
|
slot |
|
privateslot |
|
privateslot |
|
slot |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| QReadWriteLock Servatrice::islLock |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |