|virtual void||refresh ()|
|void||setEnabled (bool b)|
|Times the refreshing process out. |
|void||message (const QString &title, const QString &content, bool isError)|
|void||messageImportant (const Message &message)|
|Signal used to forward important message to Doomseeker. |
|void||newServerBatchReceived (const QList< Server * > &servers)|
|Emit this signal each time a new batch of servers is received. |
|bool||hasServer (const Server *)|
|bool||isAddressDataCorrect (const QHostAddress &address, unsigned short port)|
|Returns true if the passed address:port is the same as this master server's. |
|bool||isEnabled () const|
|bool||isTimeouted () const|
|int||numPlayers () const|
|int||numServers () const|
|Server *||operator (int index) const|
|virtual const EnginePlugin *||plugin () const =0|
|void||pushPacketToCache (QByteArray &data)|
|virtual bool||readMasterResponse (QByteArray &data)=0|
|Called to read and analyze the response from the MasterServer. |
|virtual bool||readMasterResponse (QHostAddress &address, unsigned short port, QByteArray &data)|
|Reads master response only if address and port are of this server. |
|QList< Server * > &||serverList ()|
|const QList< Server * > &||serverList () const|
|static QUdpSocket *||pGlobalUdpSocket = NULL|
|Generic Doomseeker's socket used for network communication. |
|QString||engineName () const|
|Extracts engine name from pluginInfo() if available. |
|virtual bool||getServerListRequest (QByteArray &data)=0|
|Method that is supposed to produce the contents of server list request packet that is sent to the master server. |
|Informs the user that they have been banned from the master server. |
|Tells the user that the master server will not respond to their query becuase they tried to refresh too quickly. |
|Tells the user they need to update since the protocol is too old. |
|bool||preparePacketCache (bool write)|
|virtual void||timeoutRefreshEx ()|
|Reimplement this for clean up purposes. |
|Indicates that the server has timeouted recently. |
|QList< Server * >||servers|
Abstract class base for all MasterClients. This is expected to fetch a list of IP addresses which will be turned into Servers.
Clears the server list.
|QString MasterClient::engineName||(||)|| const
Extracts engine name from pluginInfo() if available.
|virtual bool MasterClient::getServerListRequest||(||QByteArray &||data||)||
|bool MasterClient::isEnabled||(||)|| const
Serves as an informative role for MasterManager. If the master client is disabled, master manager will omit it during the refresh.
|void MasterClient::message||(||const QString &||title,|
|const QString &||content,|
Plugins may use this to make Doomseeker display custom messages. Messages are dumped into the log.
|void MasterClient::messageImportant||(||const Message &||message||)||
Signal used to forward important message to Doomseeker.
Important messages will be treated differently by Doomseeker than regular ones thrown by the message() signal. Doomseeker will display them in a location that will ensure that users see this message.
Example use: notify user that they have been banned from the master server.
|void MasterClient::newServerBatchReceived||(||const QList< Server * > &||servers||)||
Emit this signal each time a new batch of servers is received.
This signal should be called by the plugin after the response packet delivered to readMasterResponse() is processed. Master servers that send their response in multiple packets should be handled nicely by this.
|virtual const EnginePlugin* MasterClient::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.
|bool MasterClient::readMasterResponse||(||QHostAddress &||address,|
|virtual bool MasterClient::readMasterResponse||(||QByteArray &||data||)||
Times the refreshing process out.
This calls timeoutRefreshEx() and then emits listUpdated() signal.
|QUdpSocket * MasterClient::pGlobalUdpSocket = NULL
Generic Doomseeker's socket used for network communication.
If this is not NULL plugins may use this socket to send UDP packets. In fact the default implementation of MasterClient::refresh() method will use this socket in order to send the challenge data. In this case any responses that arrive on this socket will automatically be redirected to appropriate master client instance by the Doomseeker's Refreshing thread.
If engine requires a customized way to obtain the server list it must be implemented within the plugin itself.