extensions/geoip/sdk/smsdk_ext.h
changeset 943 a4fa40b1a151
parent 757 b799caa9a190
child 1226 478550a4d5ec
     1.1 --- a/extensions/geoip/sdk/smsdk_ext.h	Sat Jun 16 01:34:41 2007 +0000
     1.2 +++ b/extensions/geoip/sdk/smsdk_ext.h	Sat Jun 16 01:35:13 2007 +0000
     1.3 @@ -30,7 +30,18 @@
     1.4  #include <sp_vm_api.h>
     1.5  #include <sm_platform.h>
     1.6  #include <ISourceMod.h>
     1.7 +#if defined SMEXT_ENABLE_FORWARDSYS
     1.8  #include <IForwardSys.h>
     1.9 +#endif //SMEXT_ENABLE_FORWARDSYS
    1.10 +#if defined SMEXT_ENABLE_PLAYERHELPERS
    1.11 +#include <IPlayerHelpers.h>
    1.12 +#endif //SMEXT_ENABLE_PlAYERHELPERS
    1.13 +#if defined SMEXT_ENABLE_DBMANAGER
    1.14 +#include <IDBDriver.h>
    1.15 +#endif //SMEXT_ENABLE_DBMANAGER
    1.16 +#if defined SMEXT_ENABLE_GAMECONF
    1.17 +#include <IGameConfigs.h>
    1.18 +#endif
    1.19  
    1.20  #if defined SMEXT_CONF_METAMOD
    1.21  #include <ISmmPlugin.h>
    1.22 @@ -108,7 +119,7 @@
    1.23  	virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
    1.24  #endif
    1.25  
    1.26 -public: // IExtensionInterface
    1.27 +public: //IExtensionInterface
    1.28  	virtual bool OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late);
    1.29  	virtual void OnExtensionUnload();
    1.30  	virtual void OnExtensionsAllLoaded();
    1.31 @@ -138,9 +149,9 @@
    1.32  	/** Returns date string */
    1.33  	virtual const char *GetExtensionDateString();
    1.34  #if defined SMEXT_CONF_METAMOD
    1.35 -public: // ISmmPlugin
    1.36 +public: //ISmmPlugin
    1.37  	/** Called when the extension is attached to Metamod. */
    1.38 -	virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
    1.39 +	virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late);
    1.40  	/** Returns the author to MM */
    1.41  	virtual const char *GetAuthor();
    1.42  	/** Returns the name to MM */
    1.43 @@ -158,11 +169,11 @@
    1.44  	/** Returns the logtag to MM */
    1.45  	virtual const char *GetLogTag();
    1.46  	/** Called on unload */
    1.47 -	virtual bool Unload(char *error, size_t maxlen);
    1.48 +	virtual bool Unload(char *error, size_t maxlength);
    1.49  	/** Called on pause */
    1.50 -	virtual bool Pause(char *error, size_t maxlen);
    1.51 +	virtual bool Pause(char *error, size_t maxlength);
    1.52  	/** Called on unpause */
    1.53 -	virtual bool Unpause(char *error, size_t maxlen);
    1.54 +	virtual bool Unpause(char *error, size_t maxlength);
    1.55  private:
    1.56  	bool m_SourceMMLoaded;
    1.57  	bool m_WeAreUnloaded;
    1.58 @@ -171,12 +182,31 @@
    1.59  };
    1.60  
    1.61  extern SDKExtension *g_pExtensionIface;
    1.62 +extern IExtension *myself;
    1.63  
    1.64  extern IShareSys *g_pShareSys;
    1.65 -extern IExtension *myself;
    1.66 +extern IShareSys *sharesys;				/* Note: Newer name */
    1.67 +extern ISourceMod *g_pSM;
    1.68 +extern ISourceMod *smutils;				/* Note: Newer name */
    1.69 +
    1.70 +/* Optional interfaces are below */
    1.71 +#if defined SMEXT_ENABLE_FORWARDSYS
    1.72 +extern IForwardManager *g_pForwards;
    1.73 +extern IForwardManager *forwards;		/* Note: Newer name */
    1.74 +#endif //SMEXT_ENABLE_FORWARDSYS
    1.75 +#if defined SMEXT_ENABLE_HANDLESYS
    1.76  extern IHandleSys *g_pHandleSys;
    1.77 -extern ISourceMod *g_pSM;
    1.78 -extern IForwardManager *g_pForwards;
    1.79 +extern IHandleSys *handlesys;			/* Note: Newer name */
    1.80 +#endif //SMEXT_ENABLE_HANDLESYS
    1.81 +#if defined SMEXT_ENABLE_PLAYERHELPERS
    1.82 +extern IPlayerManager *playerhelpers;
    1.83 +#endif //SMEXT_ENABLE_PLAYERHELPERS
    1.84 +#if defined SMEXT_ENABLE_DBMANAGER
    1.85 +extern IDBManager *dbi;
    1.86 +#endif //SMEXT_ENABLE_DBMANAGER
    1.87 +#if defined SMEXT_ENABLE_GAMECONF
    1.88 +extern IGameConfigManager *gameconfs;
    1.89 +#endif //SMEXT_ENABLE_DBMANAGER
    1.90  
    1.91  #if defined SMEXT_CONF_METAMOD
    1.92  PLUGIN_GLOBALVARS();
    1.93 @@ -192,7 +222,7 @@
    1.94  	{ \
    1.95  		if (error) \
    1.96  		{ \
    1.97 -			snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
    1.98 +			snprintf(error, maxlength, "Could not find interface: %s (version: %d)", SMINTERFACE_##prefix##_NAME, SMINTERFACE_##prefix##_VERSION); \
    1.99  			return false; \
   1.100  		} \
   1.101  	}