#include <ISmmPlugin.h>
Public Member Functions | |
virtual int | GetApiVersion () |
virtual | ~ISmmPlugin () |
virtual bool | Load (PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late)=0 |
Called on plugin load. NOTE - As of API 7, this is called as DLLInit() executes - after the parameters are known, but before the original GameDLL function is called. Therefore, you cannot hook it, but you don't need to - Load() is basically your hook. NOTE - As of API 7, you can override factories before the engine and gamedll exchange them. However, take care to note that if your plugin is unloaded, and the gamedll/engine have cached an interface you've passed, something will definitely crash. Be careful. | |
virtual bool | QueryRunning (char *error, size_t maxlen) |
Called when your plugin is "queried". This is useful for rejecting a loaded state. For example, if your plugin wants to stop operating, it can simply return false and copy an error message. This will notify other plugins or MM:S of something bad that happened. NOTE - MM:S will not cache the return state, so if you return false, your plugin will not actually be paused or unloaded. This callback will be called when:
| |
virtual bool | Unload (char *error, size_t maxlen) |
Called on plugin unload. You can return false if you know your plugin is not capable of restoring critical states it modifies. | |
virtual bool | Pause (char *error, size_t maxlen) |
Called on plugin pause. | |
virtual bool | Unpause (char *error, size_t maxlen) |
Called on plugin unpause. | |
virtual const char * | GetAuthor ()=0 |
Return author as string. | |
virtual const char * | GetName ()=0 |
Return plugin name as string. | |
virtual const char * | GetDescription ()=0 |
Return a description as string. | |
virtual const char * | GetURL ()=0 |
Return a URL as string. | |
virtual const char * | GetLicense ()=0 |
Return quick license code as string. | |
virtual const char * | GetVersion ()=0 |
Return version as string. | |
virtual const char * | GetDate ()=0 |
Return author as string. | |
virtual const char * | GetLogTag ()=0 |
Return author as string. | |
virtual void | AllPluginsLoaded () |
Called when all plugins have been loaded - API version 4. |
Definition at line 28 of file ISmmPlugin.h.
virtual ISmmPlugin::~ISmmPlugin | ( | ) | [inline, virtual] |
Definition at line 32 of file ISmmPlugin.h.
virtual int ISmmPlugin::GetApiVersion | ( | ) | [inline, virtual] |
Definition at line 31 of file ISmmPlugin.h.
virtual bool ISmmPlugin::Load | ( | PluginId | id, | |
ISmmAPI * | ismm, | |||
char * | error, | |||
size_t | maxlength, | |||
bool | late | |||
) | [pure virtual] |
id | Internal id of plugin. Saved globally by PLUGIN_SAVEVARS() | |
ismm | External API for SourceMM. Saved globally by PLUGIN_SAVEVARS() | |
list | Contains a list of factories. Hook a factory call by setting one equal to your own function. | |
late | Set to true if your plugin was loaded late (not at server load). | |
error | Error message buffer | |
maxlen | Size of error message buffer |
virtual bool ISmmPlugin::QueryRunning | ( | char * | error, | |
size_t | maxlen | |||
) | [inline, virtual] |
error | Buffer for error message. This can be NULL! | |
maxlen | Maximum length of error buffer. |
Definition at line 70 of file ISmmPlugin.h.
virtual bool ISmmPlugin::Unload | ( | char * | error, | |
size_t | maxlen | |||
) | [inline, virtual] |
error | Error message buffer | |
maxlen | Size of error message buffer |
Definition at line 83 of file ISmmPlugin.h.
virtual bool ISmmPlugin::Pause | ( | char * | error, | |
size_t | maxlen | |||
) | [inline, virtual] |
error | Error message buffer | |
maxlen | Size of error message buffer |
Definition at line 94 of file ISmmPlugin.h.
virtual bool ISmmPlugin::Unpause | ( | char * | error, | |
size_t | maxlen | |||
) | [inline, virtual] |
error | Error message buffer | |
maxlen | Size of error message buffer |
Definition at line 105 of file ISmmPlugin.h.
virtual const char* ISmmPlugin::GetAuthor | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetName | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetDescription | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetURL | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetLicense | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetVersion | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetDate | ( | ) | [pure virtual] |
virtual const char* ISmmPlugin::GetLogTag | ( | ) | [pure virtual] |
virtual void ISmmPlugin::AllPluginsLoaded | ( | ) | [inline, virtual] |
This is useful for knowing when it's safe to request things another plugin might have. NOTE for API 7 - This is called after DLLInit().
Definition at line 140 of file ISmmPlugin.h.