IMetamodListener Class Reference

Added in 1.1 so plugins could listen to specific events.

#include <ISmmPlugin.h>

List of all members.

Public Member Functions

virtual ~IMetamodListener ()
virtual void OnPluginLoad (PluginId id)
 Called when a plugin is loaded.
virtual void OnPluginUnload (PluginId id)
 Called when a plugin is unloaded.
virtual void OnPluginPause (PluginId id)
 Called when a plugin is paused.
virtual void OnPluginUnpause (PluginId id)
 Called when a plugin is unpaused.
virtual void OnLevelInit (char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
 Called when the level is loaded (after GameInit, before ServerActivate).
virtual void OnLevelShutdown ()
 Called when the level is shut down. May be called more than once.
virtual void * OnEngineQuery (const char *iface, int *ret)
 Called when engineFactory() is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins or the GameDLL.
virtual void * OnPhysicsQuery (const char *iface, int *ret)
 Called when the physics factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnFileSystemQuery (const char *iface, int *ret)
 Called when the filesystem factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnGameDLLQuery (const char *iface, int *ret)
 Called when the server DLL's factory is used through Metamod:Source's wrapper. This can be used to provide interfaces to other plugins.
virtual void * OnMetamodQuery (const char *iface, int *ret)
 Called when Metamod's own factory is invoked. This can be used to provide interfaces to other plugins.
virtual void OnVSPListening (IServerPluginCallbacks *iface)
 Called when Metamod:Source acquires a valid IServerPluginCallbacks pointer to be used for hooking by plugins.


Detailed Description

Definition at line 148 of file ISmmPlugin.h.


Constructor & Destructor Documentation

virtual IMetamodListener::~IMetamodListener (  )  [inline, virtual]

Definition at line 151 of file ISmmPlugin.h.


Member Function Documentation

virtual void IMetamodListener::OnPluginLoad ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 158 of file ISmmPlugin.h.

virtual void IMetamodListener::OnPluginUnload ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 165 of file ISmmPlugin.h.

virtual void IMetamodListener::OnPluginPause ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 172 of file ISmmPlugin.h.

virtual void IMetamodListener::OnPluginUnpause ( PluginId  id  )  [inline, virtual]

Parameters:
id Id of the plugin.

Definition at line 179 of file ISmmPlugin.h.

virtual void IMetamodListener::OnLevelInit ( char const *  pMapName,
char const *  pMapEntities,
char const *  pOldLevel,
char const *  pLandmarkName,
bool  loadGame,
bool  background 
) [inline, virtual]

To override this, hook IServerGameDLL::LevelInit().

Parameters:
pMapName Name of the map.
pMapEntities Lump string of the map entities, in KeyValue format.
pOldLevel Unknown.
pLandmarkName Unknown.
loadGame Unknown.
background Unknown.

Definition at line 193 of file ISmmPlugin.h.

virtual void IMetamodListener::OnLevelShutdown (  )  [inline, virtual]

Definition at line 198 of file ISmmPlugin.h.

virtual void* IMetamodListener::OnEngineQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 210 of file ISmmPlugin.h.

virtual void* IMetamodListener::OnPhysicsQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 230 of file ISmmPlugin.h.

virtual void* IMetamodListener::OnFileSystemQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 250 of file ISmmPlugin.h.

virtual void* IMetamodListener::OnGameDLLQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 270 of file ISmmPlugin.h.

virtual void* IMetamodListener::OnMetamodQuery ( const char *  iface,
int *  ret 
) [inline, virtual]

If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.

Parameters:
iface Interface string.
ret Optional pointer to store return code.
Returns:
Generic pointer to the interface, or NULL if not found.

Definition at line 290 of file ISmmPlugin.h.

virtual void IMetamodListener::OnVSPListening ( IServerPluginCallbacks *  iface  )  [inline, virtual]

This will only be called after a call to ISmmAPI::EnableVSPListener(). If called before GameInit, this callback will occur before LevelInit. Otherwise, it will be called on the first call after that.

This callback is provided to all plugins regardless of which (or how many) called EnableVSPListener(), but only if at least one did in fact enable it.

This callback is only available for plugins using API v1:5 (SourceMM 1.4+).

Parameters:
iface Interface pointer. If NULL, then the VSP listening construct failed to initialize and is not available.

Definition at line 316 of file ISmmPlugin.h.


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

Generated on Mon Feb 18 18:27:28 2008 for Metamod:Source by  doxygen 1.5.5