dvander@9: /* ======== SourceMM ======== dvander@9: * Copyright (C) 2004-2005 Metamod:Source Development Team dvander@9: * No warranties of any kind dvander@9: * dvander@9: * License: zlib/libpng dvander@9: * dvander@9: * Author(s): David "BAILOPAN" Anderson dvander@9: * ============================ dvander@9: */ dvander@9: dvander@7: #ifndef _INCLUDE_ISMM_API_H dvander@7: #define _INCLUDE_ISMM_API_H dvander@7: dvander@9: /** dvander@9: * @brief External API interface dvander@9: * @file ISmmAPI.h dvander@9: */ dvander@9: dvander@7: #include dvander@7: #include dvander@64: #include dvander@7: #include dvander@7: #include "IPluginManager.h" dvander@7: dvander@104: #if defined __GNUC__ dvander@104: #if ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) || (__GNUC__ < 3) dvander@109: #error "You must compile with at least GCC 3.4! If you know what you are doing, you can remove this message." dvander@104: #endif //version check dvander@104: #endif //__GNUC__ dvander@104: dvander@7: class ISmmPluginManager; dvander@7: class ISmmPlugin; dvander@7: dvander@7: class ISmmAPI dvander@7: { dvander@7: public: dvander@7: virtual ISmmPluginManager *PluginManager() =0; dvander@7: virtual SourceHook::ISourceHook *SourceHook() =0; dvander@7: virtual void LogMsg(ISmmPlugin *pl, const char *msg, ...) =0; dvander@7: public: dvander@7: virtual CreateInterfaceFn engineFactory(bool syn=true) =0; dvander@7: virtual CreateInterfaceFn physicsFactory(bool syn=true) =0; dvander@7: virtual CreateInterfaceFn fileSystemFactory(bool syn=true) =0; dvander@7: virtual CreateInterfaceFn serverFactory(bool syn=true) =0; dvander@7: virtual CGlobalVars *pGlobals() =0; dvander@7: virtual void SetLastMetaReturn(META_RES res) =0; dvander@9: virtual META_RES GetLastMetaReturn() =0; dvander@124: public: //Added in 1.00-RC2 (0:0) dvander@124: //solves concommand problems by keeping track for loading/unloading dvander@64: virtual IConCommandBaseAccessor *GetCvarBaseAccessor() =0; dvander@67: virtual bool RegisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0; dvander@67: virtual void UnregisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0; dvander@124: //attempt fix at valve not exporting rcon printing dvander@76: //these do not add newlines dvander@76: virtual void ConPrint(const char *fmt) =0; dvander@76: virtual void ConPrintf(const char *fmt, ...) =0; dvander@124: public: //Added in 1.10 (1:0) dvander@124: //added by request. Checks if ConPrint/ConPrintf will mirror to rcon. dvander@124: virtual bool RemotePrintingAvailable() =0; dvander@124: //Returns the Metamod Version numbers as major version and minor (API) version. dvander@124: //changes to minor version are guaranteed to be backwards compatible. dvander@124: //changes to major version are not. dvander@124: //Also returns current plugin version and minimum plugin version dvander@124: virtual void GetApiVersions(int &major, int &minor, int &plvers, int &plmin) =0; dvander@124: //Returns sourcehook API version and implementation version dvander@124: virtual void GetShVersions(int &shvers, int &shimpl) =0; dvander@7: }; dvander@7: dvander@124: /** Version history dvander@124: * 1.10 bumped API to 1:0. The breaking changes occured in sourcehook and the plugin API. dvander@124: */ dvander@124: dvander@7: #endif //_INCLUDE_ISMM_API_H