EnginePlugin Class Reference

List of all members.

Classes

class  Data

Public Member Functions

void init (const char *name, const char *const icon[],...)
virtual ConfigurationBaseBoxconfiguration (QWidget *parent) const
 Engine's configuration widget.
virtual QList
< CreateServerDialogPage * > 
createServerDialogPages (CreateServerDialog *pDialog)
 Creates a list of custom Create Server dialog pages.
const Datadata () const
const QPixmap & icon () const
void setConfig (IniSection &cfg) const
virtual QList< GameCVarlimits (const GameMode &mode) const
 Returns a list of limits (like fraglimit) supported by passed gamemode.
virtual MasterClientmasterClient () const
void masterHost (QString &host, unsigned short &port) const
virtual Serverserver (const QHostAddress &address, unsigned short port) const =0
 Creates an instance of server object from this plugin. This might be useful for custom servers.

Protected Types

enum  InitFeatures {
  EP_Done, EP_Author, EP_Version, EP_AllDMFlags,
  EP_AllowsConnectPassword, EP_AllowsEmail, EP_AllowsURL, EP_AllowsJoinPassword,
  EP_AllowsRConPassword, EP_AllowsMOTD, EP_DefaultMaster, EP_DefaultServerPort,
  EP_GameModes, EP_GameModifiers, EP_HasMasterServer, EP_InGameFileDownloads,
  EP_IRCChannel, EP_SupportsRandomMapRotation, EP_RefreshThreshold, EP_URLScheme,
  EP_DemoExtension, EP_DontCreateDMFlagsPagesAutomatic, EP_ClientOnly
}

Protected Member Functions

virtual void setupConfig (IniSection &config) const
 Reimplement if you want to perform some ini initialization manually.

Member Enumeration Documentation

enum EnginePlugin::InitFeatures [protected]

We will use this to tell Init what features we have, new features can be added to this list, but the position of any feature must not change.

Enumerator:
EP_Done 

Signals the end of init parameters.

EP_Author 

(const char*) Author of the plugin.

EP_Version 

(unsigned int) Single version number for plugin.

EP_AllDMFlags 

(const DMFlags*) Array of DMFlags objects.

EP_AllowsConnectPassword 

Signifies that servers can be created with a connection password.

EP_AllowsEmail 

Signifies that servers can have an administrative contact email attached.

EP_AllowsURL 

Signifies that servers can provide a URL for potential wad downloads.

EP_AllowsJoinPassword 

Signifies that servers can be created with a join password.

EP_AllowsRConPassword 

Signifies that servers can be created for remote console access.

EP_AllowsMOTD 

Signifies that servers can have a message of the day.

EP_DefaultMaster 

(const char*) Default ip address and port ("address:port") for master server. Requires EP_HasMasterServer.

EP_DefaultServerPort 

(quint16) Default port for custom server creation.

EP_GameModes 

(const QList<GameMode>*) List of all possible game modes supported.

EP_GameModifiers 

(const QList<GameCVar>*) List of potential game modifiers.

EP_HasMasterServer 

Signifies that the plugin implements a master server protocol.

EP_InGameFileDownloads 

Allows the player to join a server without downloading files through Wadseeker.

EP_IRCChannel 

(const char*)server, (const char*)channel - Can be repeated. Default IRC channels.

EP_SupportsRandomMapRotation 

Signifies that a server can be created with a random map rotation.

EP_RefreshThreshold 

(quint8) The amount of time (in seconds) that must pass before a server can be requeried.

EP_URLScheme 

(const char*) Overrides the URL scheme which Doomseeker sets for this plugin. By default it is the port's name without spaces.

EP_DemoExtension 

(bool)auto, (const char*)extension Sets the extension taht will be used for demos (default is true and lmp).

EP_DontCreateDMFlagsPagesAutomatic 

(bool) If specified then "Create Server" dialog won't build flags pages out of the EnginePlugin::Data::allDMFlags list. Plugin either doesn't want to have the flags pages created or will provide the pages on its own through EnginePlugin::createServerDialogPages().

EP_ClientOnly 

Indicates that client binary serves the purpose of the client and server.


Member Function Documentation

virtual QList<CreateServerDialogPage*> EnginePlugin::createServerDialogPages ( CreateServerDialog *  pDialog  )  [inline, virtual]

Creates a list of custom Create Server dialog pages.

These pages need to be instantiated with the passed pointer as a parent. Once instantiated, Doomseeker will take care of the deletion of their objects. Pages are valid only as long as the dialog box itself is valid.

Pages are always inserted before the "Custom parameters" page in the Create Server dialog.

Default behavior assumes that the plugin doesn't define any custom pages and returns an empty list.

See also:
CreateServerDialog
CreateServerDialogPage
void EnginePlugin::init ( const char *  name,
const char *const   icon[],
  ... 
)

Initializes a plugin based on a feature set passed in. A name for the plugin and its icon (in XPM format) must be provided. The list of features must be terminated with EP_Done.

See also:
InitFeatures
Parameters:
name Name of the plugin which will be presented to the user.
icon XPM icon used to represent this plugin.
virtual MasterClient* EnginePlugin::masterClient (  )  const [inline, virtual]

Creates an MasterClient instace for this plugin.

void EnginePlugin::masterHost ( QString &  host,
unsigned short &  port 
) const

Fills the variables with information about the master's address.

virtual Server* EnginePlugin::server ( const QHostAddress &  address,
unsigned short  port 
) const [pure virtual]

Creates an instance of server object from this plugin. This might be useful for custom servers.

Returns:
instance of plugin's server object

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