1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-02 14:24:16 +01:00
HLMetaModOfficial/sourcemm/ISmmAPI.h
David Anderson 1717c99f07 Added gcc-3.3 error message back in
--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40110
2005-09-13 20:25:30 +00:00

61 lines
1.8 KiB
C++

/* ======== SourceMM ========
* Copyright (C) 2004-2005 Metamod:Source Development Team
* No warranties of any kind
*
* License: zlib/libpng
*
* Author(s): David "BAILOPAN" Anderson
* ============================
*/
#ifndef _INCLUDE_ISMM_API_H
#define _INCLUDE_ISMM_API_H
/**
* @brief External API interface
* @file ISmmAPI.h
*/
#include <interface.h>
#include <eiface.h>
#include <convar.h>
#include <sourcehook/sourcehook.h>
#include "IPluginManager.h"
#if defined __GNUC__
#if ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) || (__GNUC__ < 3)
#error "You must compile with at least GCC 3.4! If you know what you are doing, you can remove this message."
#endif //version check
#endif //__GNUC__
class ISmmPluginManager;
class ISmmPlugin;
class ISmmAPI
{
public:
virtual ISmmPluginManager *PluginManager() =0;
virtual SourceHook::ISourceHook *SourceHook() =0;
virtual void LogMsg(ISmmPlugin *pl, const char *msg, ...) =0;
public:
virtual CreateInterfaceFn engineFactory(bool syn=true) =0;
virtual CreateInterfaceFn physicsFactory(bool syn=true) =0;
virtual CreateInterfaceFn fileSystemFactory(bool syn=true) =0;
virtual CreateInterfaceFn serverFactory(bool syn=true) =0;
virtual CGlobalVars *pGlobals() =0;
virtual void SetLastMetaReturn(META_RES res) =0;
virtual META_RES GetLastMetaReturn() =0;
public:
//Added in 1.00-RC2 to solve concommand problems
virtual IConCommandBaseAccessor *GetCvarBaseAccessor() =0;
virtual bool RegisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0;
virtual void UnregisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0;
public:
//Added in 1.00-RC2. attempt fix at valve not exporting rcon printing
//these do not add newlines
virtual void ConPrint(const char *fmt) =0;
virtual void ConPrintf(const char *fmt, ...) =0;
};
#endif //_INCLUDE_ISMM_API_H