MasterManager Class Reference

Manager class for a number of MasterClient instances. More...

#include <mastermanager.h>

+ Inheritance diagram for MasterManager:

Public Slots

void refreshStarts ()
- Public Slots inherited from MasterClient
virtual void refreshStarts ()
void setEnabled (bool b)
void timeoutRefresh ()
 Times the refreshing process out. More...


void listUpdatedForMaster (MasterClient *pSender)
 Emitted for every MasterClient that emits listUpdated() signal. More...
void masterMessage (MasterClient *pSender, const QString &title, const QString &content, bool isError)
void masterMessageImportant (MasterClient *pSender, const Message &objMessage)
- Signals inherited from MasterClient
void listUpdated ()
void message (const QString &title, const QString &content, bool isError)
void messageImportant (const Message &message)
 Signal used to forward important message to Doomseeker. More...

Public Member Functions

void addMaster (MasterClient *master)
QList< ServerPtr > allServers () const
CustomServerscustomServs ()
int numMasters () const
MasterClientoperator[] (int index)
const EnginePluginplugin () const
- Public Member Functions inherited from MasterClient
void clearServers ()
QString engineName () const
 Extracts engine name from pluginInfo() if available. More...
bool isAddressSame (const QHostAddress &address, unsigned short port) const
 Returns true if the passed address:port is the same as this master server's. More...
bool isEnabled () const
bool isTimeouted () const
 Indicates that the server has timeouted recently. More...
QString masterBanHelp () const
 [Virtual] Help message displayed to the user when ban is detected. More...
void notifyResponse (Response response)
int numPlayers () const
int numServers () const
ServerPtr operator[] (int index) const
void pushPacketToCache (const QByteArray &data)
Response readResponse (const QByteArray &data)
 Calls readMasterResponse and handles packet caching. More...
void resetPacketCaching ()
bool sendRequest (QUdpSocket *socket)
 Sends request packet through socket. More...
const QList< ServerPtr > & servers () const
void updateAddress ()

Additional Inherited Members

- Public Types inherited from MasterClient
enum  Response {
- Protected Member Functions inherited from MasterClient
void emptyServerList ()
QString masterBanHelp_default () const
 POLYMORPHIC_SETTER_DECLARE_CONST (QString, MasterClient, masterBanHelp,())
bool preparePacketCache (bool write)
void readPacketCache ()
void registerNewServer (ServerPtr server)
 Registers new server with this MasterClient. More...
void setTimeouted (bool b)

Detailed Description

Manager class for a number of MasterClient instances.

MasterManager will emit listUpdated() signal once the last MasterClient that is on the mastersBeingRefreshed list emits its own listUpdate() signal.

Definition at line 38 of file mastermanager.h.

Member Function Documentation

void MasterManager::listUpdatedForMaster ( MasterClient pSender)

Emitted for every MasterClient that emits listUpdated() signal.

const EnginePlugin* MasterManager::plugin ( ) const

This is supposed to return the plugin this MasterClient belongs to. If it doesn't belong to any plugin then return NULL. New instances of EnginePlugin shouldn't be created here. Instead each plugin should keep a global instance of EnginePlugin (singleton?) and a pointer to this instance should be returned.

Implements MasterClient.

Definition at line 52 of file mastermanager.h.

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