public/mms_sample_ext/sm_sdk_config.h

00001 /**
00002  * vim: set ts=4 :
00003  * =============================================================================
00004  * SourceMod Extension Code for Metamod:Source
00005  * Copyright (C) 2004-2008 AlliedModders LLC.  All rights reserved.
00006  * =============================================================================
00007  *
00008  * This program is free software; you can redistribute it and/or modify it under
00009  * the terms of the GNU General Public License, version 3.0, as published by the
00010  * Free Software Foundation.
00011  * 
00012  * This program is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00015  * details.
00016  *
00017  * You should have received a copy of the GNU General Public License along with
00018  * this program.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  * As a special exception, AlliedModders LLC gives you permission to link the
00021  * code of this program (as well as its derivative works) to "Half-Life 2," the
00022  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
00023  * by the Valve Corporation.  You must obey the GNU General Public License in
00024  * all respects for all other code used.  Additionally, AlliedModders LLC grants
00025  * this exception to all derivative works.  AlliedModders LLC defines further
00026  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
00027  * or <http://www.sourcemod.net/license.php>.
00028  *
00029  * Version: $Id$
00030  */
00031 
00032 #ifndef _INCLUDE_SOURCEMOD_CONFIG_H_
00033 #define _INCLUDE_SOURCEMOD_CONFIG_H_
00034 
00035 #include <stdio.h>
00036 
00037 /**
00038  * @brief Acquires the interfaces enabled at the bottom of this header.
00039  *
00040  * @param error                         Buffer to store error message.
00041  * @param maxlength           Maximum size of the error buffer.
00042  * @return                                        True on success, false on failure.
00043  *                                                          On failure, a null-terminated string will be stored 
00044  *                                                          in the error buffer, if the buffer is non-NULL and 
00045  *                                                          greater than 0 bytes in size.
00046  */
00047 bool SM_AcquireInterfaces(char *error, size_t maxlength);
00048 
00049 /**
00050  * @brief Sets each acquired interface to NULL.
00051  */
00052 void SM_UnsetInterfaces();
00053 
00054 /** 
00055  * Enable interfaces you want to use here by uncommenting lines.
00056  * These interfaces are all part of SourceMod's core.
00057  */
00058 //#define SMEXT_ENABLE_FORWARDSYS
00059 //#define SMEXT_ENABLE_HANDLESYS
00060 //#define SMEXT_ENABLE_PLAYERHELPERS
00061 //#define SMEXT_ENABLE_DBMANAGER
00062 //#define SMEXT_ENABLE_GAMECONF
00063 //#define SMEXT_ENABLE_MEMUTILS
00064 //#define SMEXT_ENABLE_GAMEHELPERS
00065 //#define SMEXT_ENABLE_TIMERSYS
00066 //#define SMEXT_ENABLE_THREADER
00067 //#define SMEXT_ENABLE_LIBSYS
00068 //#define SMEXT_ENABLE_MENUS
00069 //#define SMEXT_ENABLE_ADTFACTORY
00070 //#define SMEXT_ENABLE_PLUGINSYS
00071 //#define SMEXT_ENABLE_ADMINSYS
00072 //#define SMEXT_ENABLE_TEXTPARSERS
00073 //#define SMEXT_ENABLE_TRANSLATOR
00074 
00075 
00076 /**
00077  * There is no need to edit below.
00078  */
00079 
00080 #include <IShareSys.h>
00081 #include <IExtensionSys.h>
00082 extern SourceMod::IExtension *myself;
00083 extern SourceMod::IExtensionManager *smexts;
00084 extern SourceMod::IShareSys *sharesys;
00085 
00086 #include <ISourceMod.h>
00087 extern SourceMod::ISourceMod *sm_main;
00088 
00089 #if defined SMEXT_ENABLE_FORWARDSYS
00090 #include <IForwardSys.h>
00091 extern SourceMod::IForwardManager *sm_forwards;
00092 #endif
00093 
00094 #if defined SMEXT_ENABLE_HANDLESYS
00095 #include <IHandleSys.h>
00096 extern SourceMod::IHandleSys *sm_handlesys;
00097 #endif
00098 
00099 #if defined SMEXT_ENABLE_PLAYERHELPERS
00100 #include <IPlayerHelpers.h>
00101 extern SourceMod::IPlayerManager *sm_players;
00102 #endif
00103 
00104 #if defined SMEXT_ENABLE_DBMANAGER
00105 #include <IDBDriver.h>
00106 extern SourceMod::IDBManager *sm_dbi;
00107 #endif 
00108 
00109 #if defined SMEXT_ENABLE_GAMECONF
00110 #include <IGameConfigs.h>
00111 extern SourceMod::IGameConfigManager *sm_gameconfs;
00112 #endif
00113 
00114 #if defined SMEXT_ENABLE_MEMUTILS
00115 #include <IMemoryUtils.h>
00116 extern SourceMod::IMemoryUtils *sm_memutils;
00117 #endif
00118 
00119 #if defined SMEXT_ENABLE_GAMEHELPERS
00120 #include <IGameHelpers.h>
00121 extern SourceMod::IGameHelpers *sm_gamehelpers;
00122 #endif
00123 
00124 #if defined SMEXT_ENABLE_TIMERSYS
00125 #include <ITimerSystem.h>
00126 extern SourceMod::ITimerSystem *sm_timersys;
00127 #endif
00128 
00129 #if defined SMEXT_ENABLE_THREADER
00130 #include <IThreader.h>
00131 extern SourceMod::IThreader *sm_threader;
00132 #endif
00133 
00134 #if defined SMEXT_ENABLE_LIBSYS
00135 #include <ILibrarySys.h>
00136 extern SourceMod::ILibrarySys *sm_libsys;
00137 #endif
00138 
00139 #if defined SMEXT_ENABLE_PLUGINSYS
00140 #include <IPluginSys.h>
00141 extern SourceMod::IPluginManager *sm_plsys;
00142 #endif 
00143 
00144 #if defined SMEXT_ENABLE_MENUS
00145 #include <IMenuManager.h>
00146 extern SourceMod::IMenuManager *sm_menus;
00147 #endif
00148 
00149 #if defined SMEXT_ENABLE_ADMINSYS
00150 #include <IAdminSystem.h>
00151 extern SourceMod::IAdminSystem *sm_adminsys;
00152 #endif
00153 
00154 #if defined SMEXT_ENABLE_TEXTPARSERS
00155 #include <ITextParsers.h>
00156 extern SourceMod::ITextParsers *sm_text;
00157 #endif
00158 
00159 #if defined SMEXT_ENABLE_TRANSLATOR
00160 #include <ITranslator.h>
00161 extern SourceMod::ITranslator *sm_translator;
00162 #endif
00163 
00164 #endif //_INCLUDE_SOURCEMOD_CONFIG_H_
00165 

Generated on Sun Dec 28 23:26:25 2008 for SourceMod SDK by  doxygen 1.5.1