Manager class for a number of MasterClient instances. More...
#include <mastermanager.h>
Public Slots | |
void | refreshStarts () override |
Public Slots inherited from MasterClient | |
virtual void | refreshStarts () |
void | setEnabled (bool b) |
void | timeoutRefresh () |
Times the refreshing process out. More... | |
Signals | |
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 |
CustomServers * | customServs () |
int | numMasters () const |
MasterClient * | operator[] (int index) |
const EnginePlugin * | plugin () const override |
void | setBroadcastManager (BroadcastManager *broadcastManagerPtr) |
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 | 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 { RESPONSE_GOOD, RESPONSE_TIMEOUT, RESPONSE_WAIT, RESPONSE_BAD, RESPONSE_BANNED, RESPONSE_NO_RESPONSE_YET, RESPONSE_PENDING, RESPONSE_REPLY, RESPONSE_OLD } |
Protected Member Functions inherited from MasterClient | |
QHostAddress | address () const |
Address of the master server. More... | |
void | emptyServerList () |
QString | masterBanHelp_default () const |
unsigned short | port () const |
Network port of the master server. More... | |
bool | preparePacketCache (bool write) |
void | readPacketCache () |
void | registerNewServer (ServerPtr server) |
Registers new server with this MasterClient. More... | |
void | setTimeouted (bool b) |
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 40 of file mastermanager.h.
|
signal |
Emitted for every MasterClient that emits listUpdated() signal.
|
inlineoverridevirtual |
This is supposed to return the plugin this MasterClient belongs to. If it doesn't belong to any plugin then return nullptr. 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 54 of file mastermanager.h.