Bumped all versions.
1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2008 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
11 #ifndef _INCLUDE_CSMM_API_H
12 #define _INCLUDE_CSMM_API_H
15 * @brief Header for CSmmAPI implementation
20 #include <tier1/utldict.h>
28 typedef CUtlDict<UserMessage *, int> UserMsgDict;
30 typedef void (*CONPRINTF_FUNC)(const char *, ...);
34 class CSmmAPI : public ISmmAPI
40 void LogMsg(ISmmPlugin *pl, const char *msg, ...);
42 CreateInterfaceFn engineFactory(bool syn=true);
43 CreateInterfaceFn physicsFactory(bool syn=true);
44 CreateInterfaceFn fileSystemFactory(bool syn=true);
45 CreateInterfaceFn serverFactory(bool syn=true);
46 CGlobalVars *pGlobals();
47 void SetLastMetaReturn(META_RES res);
48 META_RES GetLastMetaReturn();
49 IConCommandBaseAccessor *GetCvarBaseAccessor();
50 bool RegisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand);
51 void UnregisterConCmdBase(ISmmPlugin *plugin, ConCommandBase *pCommand);
52 void ConPrint(const char *fmt);
53 void ConPrintf(const char *fmt, ...);
54 bool RemotePrintingAvailable()
56 return CmdCacheSuccessful();
58 virtual void GetApiVersions(int &major, int &minor, int &plvers, int &plmin);
59 virtual void GetShVersions(int &shvers, int &shimpl);
60 virtual void AddListener(ISmmPlugin *plugin, IMetamodListener *pListener);
61 virtual void *MetaFactory(const char *iface, int *ret, PluginId *id);
62 virtual int FormatIface(char buffer[], unsigned int maxlength);
63 virtual void *InterfaceSearch(CreateInterfaceFn fn, const char *iface, int max, int *ret);
64 virtual const char *GetBaseDir();
65 virtual void PathFormat(char *buffer, size_t len, const char *fmt, ...);
66 void ClientConPrintf(edict_t *client, const char *fmt, ...);
67 void *VInterfaceMatch(CreateInterfaceFn fn, const char *iface, int min=-1);
68 void EnableVSPListener();
69 int GetGameDLLVersion();
70 int GetUserMessageCount();
71 int FindUserMessage(const char *name, int *size=NULL);
72 const char *GetUserMessage(int index, int *size=NULL);
75 bool CmdCacheSuccessful();
81 bool CacheUserMessages();
82 bool MsgCacheSuccessful();
85 CONPRINTF_FUNC m_ConPrintf;
89 UserMsgDict m_UserMessages;
93 extern SourceMM::CSmmAPI g_SmmAPI;
95 #define CONMSG g_SmmAPI.ConPrintf
96 #define CLIENT_CONMSG g_SmmAPI.ClientConPrintf
98 #endif //_INCLUDE_CSMM_API_H