Mania++
 All Classes Functions Variables Pages
Public Member Functions | Private Attributes | List of all members
CallBackManager Class Reference

Handles callbacks from the server. More...

#include <CallBackManager.h>

Public Member Functions

 CallBackManager (Config *configPtr, GbxRemote *serverPtr, CommandManager *commandManagerPtr, EventManager *eventManagerPtr, sql::Connection *databasePtr, std::map< std::string, Player > *playerList, MapList *mapList, ServerInfo *serverInfoPtr)
 
void HandleCallBack (std::string methodName, std::vector< GbxResponseParameter > parameters)
 Handles callback (updates lists, calls plugin functions). More...
 
void HandlePlayerConnect (std::vector< GbxResponseParameter > parameters)
 Handles PlayerConnect callback. More...
 
void HandlePlayerDisconnect (std::vector< GbxResponseParameter > parameters)
 Handles PlayerDisconnect callback. More...
 
void HandlePlayerChat (std::vector< GbxResponseParameter > parameters)
 Handles PlayerChat callback. More...
 
void HandlePlayerManialinkPageAnswer (std::vector< GbxResponseParameter > parameters)
 Handles PlayerManialinkPageAnswer callback. More...
 
void HandleEcho (std::vector< GbxResponseParameter > parameters)
 Handles Echo callback. More...
 
void HandleBeginMatch (std::vector< GbxResponseParameter > parameters)
 Handles BeginMatch callback. More...
 
void HandleEndMatch (std::vector< GbxResponseParameter > parameters)
 Handles EndMatch callback. More...
 
void HandleBeginMap (std::vector< GbxResponseParameter > parameters)
 Handles BeginMap callback. More...
 
void HandleEndMap (std::vector< GbxResponseParameter > parameters)
 Handles EndMap callback. More...
 
void HandleStatusChanged (std::vector< GbxResponseParameter > parameters)
 Handles StatusChanged callback. More...
 
void HandlePlayerCheckpoint (std::vector< GbxResponseParameter > parameters)
 Handles PlayerCheckpoint callback. More...
 
void HandlePlayerFinish (std::vector< GbxResponseParameter > parameters)
 Handles PlayerFinish callback. More...
 
void HandlePlayerIncoherence (std::vector< GbxResponseParameter > parameters)
 Handles PlayerIncoherence callback. More...
 
void HandleBillUpdated (std::vector< GbxResponseParameter > parameters)
 Handles BillUpdated callback. More...
 
void HandleMapListModified (std::vector< GbxResponseParameter > parameters)
 Handles MapListModified callback. More...
 
void HandlePlayerInfoChanged (std::vector< GbxResponseParameter > parameters)
 Handles PlayerInfoChanged callback. More...
 
void HandleVoteUpdated (std::vector< GbxResponseParameter > parameters)
 Handles VoteUpdated callback. More...
 

Private Attributes

Configconfig
 Contains the configuration.
 
GbxRemoteserver
 Contains the serverconnection.
 
CommandManagercommands
 Contains the command manager.
 
EventManagerevents
 Contains the event manager.
 
sql::Connection * database
 Contains the database connection.
 
std::map< std::string, Player > * players
 Contains the list of players currently on the server.
 
MapListmaps
 Contains the list of players currently on the server.
 
ServerInfoserverInfo
 Contains the server information.
 

Detailed Description

Handles callbacks from the server.

Constructor & Destructor Documentation

CallBackManager::CallBackManager ( Config configPtr,
GbxRemote serverPtr,
CommandManager commandManagerPtr,
EventManager eventManagerPtr,
sql::Connection *  databasePtr,
std::map< std::string, Player > *  playerList,
MapList mapList,
ServerInfo serverInfoPtr 
)

Constructor takes pointers to playerlist and maplist to keep them updated.

Todo:
Replace pointer to GbxRemote with pointer to Methods.
Parameters
configPtrPointer to the Config.
serverPtrPointer to the GbxRemote.
commandManagerPtrPointer to the CommandManager.
eventManagerPtrPointer to the EventManager.
databasePtrPointer to the database connection.
playerListPointer to playerlist.
mapListPointer to maplist.
serverInfoPtrPointer to server information.

Member Function Documentation

void CallBackManager::HandleBeginMap ( std::vector< GbxResponseParameter parameters)

Handles BeginMap callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleBeginMatch ( std::vector< GbxResponseParameter parameters)

Handles BeginMatch callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleBillUpdated ( std::vector< GbxResponseParameter parameters)

Handles BillUpdated callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleCallBack ( std::string  methodName,
std::vector< GbxResponseParameter parameters 
)

Handles callback (updates lists, calls plugin functions).

Parameters
methodNameName of the callback method.
parametersList with method parameters.
void CallBackManager::HandleEcho ( std::vector< GbxResponseParameter parameters)

Handles Echo callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleEndMap ( std::vector< GbxResponseParameter parameters)

Handles EndMap callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleEndMatch ( std::vector< GbxResponseParameter parameters)

Handles EndMatch callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleMapListModified ( std::vector< GbxResponseParameter parameters)

Handles MapListModified callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerChat ( std::vector< GbxResponseParameter parameters)

Handles PlayerChat callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerCheckpoint ( std::vector< GbxResponseParameter parameters)

Handles PlayerCheckpoint callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerConnect ( std::vector< GbxResponseParameter parameters)

Handles PlayerConnect callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerDisconnect ( std::vector< GbxResponseParameter parameters)

Handles PlayerDisconnect callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerFinish ( std::vector< GbxResponseParameter parameters)

Handles PlayerFinish callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerIncoherence ( std::vector< GbxResponseParameter parameters)

Handles PlayerIncoherence callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerInfoChanged ( std::vector< GbxResponseParameter parameters)

Handles PlayerInfoChanged callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandlePlayerManialinkPageAnswer ( std::vector< GbxResponseParameter parameters)

Handles PlayerManialinkPageAnswer callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleStatusChanged ( std::vector< GbxResponseParameter parameters)

Handles StatusChanged callback.

Parameters
parametersList with method parameters.
void CallBackManager::HandleVoteUpdated ( std::vector< GbxResponseParameter parameters)

Handles VoteUpdated callback.

Parameters
parametersList with method parameters.

The documentation for this class was generated from the following files: