24 #ifndef __ENGINEPLUGIN_H__ 25 #define __ENGINEPLUGIN_H__ 30 #include "serverapi/textprovider.h" 32 #include <QStringList> 33 #include <QtContainerFwd> 37 #define DOOMSEEKER_ABI_VERSION 2 39 #define DECLARE_PLUGIN(XEnginePlugin) \ 40 friend PLUGIN_EXPORT EnginePlugin * doomSeekerInit(); \ 42 static EnginePlugin *staticInstance() { return __Static_Instance; } \ 44 static XEnginePlugin *__Static_Instance; 46 #define INSTALL_PLUGIN(XEnginePlugin) \ 47 XEnginePlugin *XEnginePlugin::__Static_Instance; \ 48 extern "C" PLUGIN_EXPORT unsigned int doomSeekerABI() { return DOOMSEEKER_ABI_VERSION; } \ 49 extern "C" PLUGIN_EXPORT EnginePlugin *doomSeekerInit() \ 51 XEnginePlugin::__Static_Instance = new XEnginePlugin(); \ 52 return XEnginePlugin::staticInstance(); \ 269 unsigned int abiVersion;
270 bool allowsConnectPassword;
272 bool allowsJoinPassword;
274 bool allowsRConPassword;
279 quint16 defaultServerPort;
282 bool inGameFileDownloads;
283 QVector<IRCNetworkEntity> ircChannels;
287 quint8 refreshThreshold;
289 bool supportsRandomMapRotation;
291 unsigned int version;
292 bool demoExtensionAutomatic;
293 QString demoExtension;
324 QString clientExeName;
325 QString serverExeName;
326 QStringList gameFileSearchSuffixes;
336 bool allowsClientSlots;
337 bool allowsPlayerSlots;
341 QString canonicalName;
345 bool hasBroadcast()
const 347 return broadcast !=
nullptr;
350 bool hasMasterClient()
const 352 return masterClient !=
nullptr;
368 void init(
const char *name,
const char *
const icon[], ...);
373 virtual ConfigPage *configuration(QWidget *parent);
395 return QList<CreateServerDialogPage *>();
398 const Data *data()
const 402 const QPixmap &icon()
const 411 virtual QList<DMFlagsSection> dmFlags()
const;
431 virtual QList<GameMode> gameModes()
const;
435 virtual QList<GameCVar> gameModifiers()
const;
444 return QList<GameCVar>();
450 void masterHost(QString &host,
unsigned short &port)
const;
465 QString nameCanonical()
const;
474 virtual ServerPtr server(
const QHostAddress &address,
unsigned short port)
const;
492 virtual void start();
499 virtual ServerPtr mkServer(
const QHostAddress &address,
unsigned short port)
const = 0;
500 void initDefaultGameFiles();
501 void setGameExeFactory(QSharedPointer<GameExeFactory> factory);
506 QStringList collectKnownPaths(
const IniSection &ini)
const;
510 extern "C" PLUGIN_EXPORT
EnginePlugin *doomSeekerInit();
Disables specifying amount of player slots in create game box.
bool createDMFlagsPagesAutomatic
Controls behavior of "Create Game" dialog.
Informs that the game has no notion of an IWAD.
QPixmap * icon
icon of the engine
(const char*) Author of the plugin.
QScopedPointer< TextProvider > aboutProvider
Description of the plugin, intended to be displayed in the "About" dialog.
QSharedPointer< GameExeFactory > gameExeFactory
Factory of executable retrievers ExeFile objects.
Allows the player to join a server without downloading files through Wadseeker.
Tells the create game box that this game allows UPnP.
Signifies that servers can be created with a join password.
Signifies that a server can be created with a random map rotation.
File name for game's server executable if game has any.
Returns executable file retrievers from plugins to Doomseeker.
A representation of a server for a given game.
(const char*) Default ip address and port ("address:port") for master server. Requires EP_HasMasterSe...
(bool)auto, (const char*)extension Sets the extension that will be used for demos (default is true an...
GameCVarProvider that returns difficulty levels ordered from easiest to hardest.
QSharedPointer< GameCVarProvider > difficulty
Difficulty levels provider for this game.
Signifies that servers can be created for remote console access.
Provides a description to be shown in the "About" menu.
Dialog window allowing user to create a game.
File name for game's client (main) executable.
Tells the create game box that this game allows to modify UPnP port.
Signifies that servers can have a message of the day.
Game mode representation.
Signifies that servers can provide a URL for potential wad downloads.
Signals the end of init parameters.
(quint8) The amount of time (in seconds) that must pass before a server can be requeried.
Base class to be used by plugins to define custom pages in Create Game dialog.
Signifies that servers can be created with a connection password.
Disables map list in create game box.
Signifies that servers can have an administrative contact email attached.
Data structure that describes and defines a connection to an IRC network or server.
INI section representation.
Indicates that client binary serves the purpose of the client and server.
Creates game servers, offline games or demo playbacks.
virtual QList< GameCVar > limits(const GameMode &mode) const
Returns a list of limits (like fraglimit) supported by passed gamemode.
(unsigned int) Single version number for plugin.
(quint16) Default port for custom server creation.
virtual QList< CreateServerDialogPage * > createServerDialogPages(CreateServerDialog *pDialog)
Creates a list of custom Create Game dialog pages.
Abstract base for all MasterClients.
Default search suffixes used to automatically find game files.
(const char*)server, (const char*)channel - Can be repeated. Default IRC channels.
(const char*) Overrides the URL scheme which Doomseeker sets for this plugin. By default it is the po...
A general game setting or variable (like fraglimit).
Plugin canonical name; should match filenames of the library and translation files.
QString defaultMaster
Default port on which servers for given engine are hosted.
Base class for configuration pages.
Disables specifying amount of client slots in create game box.