sourcemm/ISmmAPI.h
author David Anderson <dvander@alliedmods.net>
Fri Jun 24 22:39:58 2005 +0000 (2005-06-24)
changeset 78 b5dc5deb71b8
parent 76 39266faeec97
child 104 a3f2126f71a8
permissions -rw-r--r--
Added changelog file
     1 /* ======== SourceMM ========
     2 * Copyright (C) 2004-2005 Metamod:Source Development Team
     3 * No warranties of any kind
     4 *
     5 * License: zlib/libpng
     6 *
     7 * Author(s): David "BAILOPAN" Anderson
     8 * ============================
     9 */
    10 
    11 #ifndef _INCLUDE_ISMM_API_H
    12 #define _INCLUDE_ISMM_API_H
    13 
    14 /**
    15  * @brief External API interface
    16  * @file ISmmAPI.h
    17  */
    18 
    19 #include <interface.h>
    20 #include <eiface.h>
    21 #include <convar.h>
    22 #include <sourcehook/sourcehook.h>
    23 #include "IPluginManager.h"
    24 
    25 class ISmmPluginManager;
    26 class ISmmPlugin;
    27 
    28 class ISmmAPI
    29 {
    30 public:
    31 	virtual ISmmPluginManager *PluginManager() =0;
    32 	virtual SourceHook::ISourceHook *SourceHook() =0;
    33 	virtual void LogMsg(ISmmPlugin *pl, const char *msg, ...) =0;
    34 public:
    35 	virtual CreateInterfaceFn engineFactory(bool syn=true) =0;
    36 	virtual CreateInterfaceFn physicsFactory(bool syn=true) =0;
    37 	virtual CreateInterfaceFn fileSystemFactory(bool syn=true) =0;
    38 	virtual CreateInterfaceFn serverFactory(bool syn=true) =0;
    39 	virtual CGlobalVars *pGlobals() =0;
    40 	virtual void SetLastMetaReturn(META_RES res) =0;
    41 	virtual META_RES GetLastMetaReturn() =0;
    42 public:
    43 	//Added in 1.00-RC2 to solve concommand problems
    44 	virtual IConCommandBaseAccessor *GetCvarBaseAccessor() =0;
    45 	virtual bool RegisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0;
    46 	virtual void UnregisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0;
    47 public:
    48 	//Added in 1.00-RC2.  attempt fix at valve not exporting rcon printing
    49 	//these do not add newlines
    50 	virtual void ConPrint(const char *fmt) =0;
    51 	virtual void ConPrintf(const char *fmt, ...) =0;
    52 };
    53 
    54 #endif //_INCLUDE_ISMM_API_H