core/PluginSys.h
author Scott Ehlert <ds@alliedmods.net>
Fri Feb 27 00:22:59 2009 -0600 (2009-02-27)
changeset 2626 323b0dc87096
parent 2411 8dfaa3d730b5
child 2413 f7fee39a0e56
permissions -rw-r--r--
Added -dev tag back to version.h files for manual builds.
dvander@370
     1
/**
ds@653
     2
 * vim: set ts=4 :
ds@1330
     3
 * =============================================================================
dvander@1231
     4
 * SourceMod
ds@1947
     5
 * Copyright (C) 2004-2008 AlliedModders LLC.  All rights reserved.
ds@1330
     6
 * =============================================================================
dvander@370
     7
 *
ds@1330
     8
 * This program is free software; you can redistribute it and/or modify it under
ds@1330
     9
 * the terms of the GNU General Public License, version 3.0, as published by the
ds@1330
    10
 * Free Software Foundation.
dvander@1231
    11
 * 
ds@1330
    12
 * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1330
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1330
    14
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
ds@1330
    15
 * details.
dvander@1231
    16
 *
ds@1330
    17
 * You should have received a copy of the GNU General Public License along with
ds@1330
    18
 * this program.  If not, see <http://www.gnu.org/licenses/>.
dvander@1231
    19
 *
ds@1330
    20
 * As a special exception, AlliedModders LLC gives you permission to link the
ds@1330
    21
 * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1330
    22
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1330
    23
 * by the Valve Corporation.  You must obey the GNU General Public License in
ds@1330
    24
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
ds@1330
    25
 * this exception to all derivative works.  AlliedModders LLC defines further
ds@1330
    26
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1330
    27
 * or <http://www.sourcemod.net/license.php>.
dvander@370
    28
 *
dvander@370
    29
 * Version: $Id$
dvander@370
    30
 */
dvander@370
    31
dvander@173
    32
#ifndef _INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_
dvander@173
    33
#define _INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_
dvander@173
    34
dvander@211
    35
#include <time.h>
faluco@333
    36
#include <errno.h>
faluco@333
    37
#include <sys/stat.h>
dvander@173
    38
#include <IPluginSys.h>
dvander@220
    39
#include <IHandleSys.h>
ds@611
    40
#include <IForwardSys.h>
dvander@174
    41
#include <sh_list.h>
dvander@174
    42
#include <sh_stack.h>
faluco@389
    43
#include <sh_vector.h>
dvander@601
    44
#include <sh_string.h>
dvander@173
    45
#include "sm_globals.h"
dvander@203
    46
#include "PluginInfoDatabase.h"
dvander@211
    47
#include "sm_trie.h"
dvander@220
    48
#include "sourcemod.h"
dvander@309
    49
#include <IRootConsoleMenu.h>
faluco@1541
    50
#if defined ORANGEBOX_BUILD
faluco@1541
    51
#include "convar_sm_ob.h"
faluco@1541
    52
#else
ds@457
    53
#include "convar_sm.h"
faluco@1541
    54
#endif
dvander@2042
    55
#include "ITranslator.h"
dvander@2086
    56
#include "NativeOwner.h"
dvander@2086
    57
#include "ShareSys.h"
dvander@173
    58
dvander@174
    59
using namespace SourceHook;
dvander@174
    60
dvander@209
    61
/**
dvander@209
    62
 * NOTES:
dvander@209
    63
 *
dvander@1923
    64
 * UPDATE 2008-03-11: These comments are horribly out of date.  They paint a good overall 
dvander@1923
    65
 * picture of how PluginSys works, but things like dependencies and fake natives have 
dvander@1923
    66
 * complicated things quite a bit.
dvander@1923
    67
 *
dvander@209
    68
 *  Currently this system needs a lot of work but it's good skeletally.  Plugin creation 
dvander@209
    69
 * is done without actually compiling anything.  This is done by Load functions in the 
dvander@209
    70
 * manager.  This will need a rewrite when we add context switching.
dvander@209
    71
 *
dvander@209
    72
 *  The plugin object itself has a few things to note.  The most important is that it stores
dvander@209
    73
 * a table of function objects.  The manager marshals allocation and freeing of these objects.
dvander@209
    74
 * The plugin object can be in erroneous states, they are:
dvander@209
    75
 *   Plugin_Error   --> Some error occurred any time during or after compilation.
dvander@209
    76
 *						This error can be cleared since the plugin itself is valid.
dvander@209
    77
 *						However, the state itself being set prevents any runtime action.
dvander@209
    78
 *   Plugin_BadLoad	--> The plugin failed to load entirely and nothing can be done to save it.
dvander@209
    79
 *
dvander@209
    80
 *  If a plugin fails to load externally, it is never added to the internal tracker.  However, 
dvander@209
    81
 * plugins that failed to load from the internal loading mechanism are always tracked.  This 
dvander@209
    82
 * allows users to see which automatically loaded plugins failed, and makes the interface a bit
dvander@209
    83
 * more flexible.
dvander@211
    84
 *
dvander@211
    85
 *  Once a plugin is compiled, it sets its own state to Plugin_Created.  This state is still invalid
dvander@211
    86
 * for execution.  SourceMod is a two pass system, and even though the second pass is not implemented
dvander@211
    87
 * yet, it is structured so Plugin_Created must be switched to Plugin_Running in the second pass.  When
dvander@211
    88
 * implemented, a Created plugin will be switched to Error in the second pass if it not loadable.
dvander@211
    89
 *
dvander@211
    90
 *  The two pass loading mechanism is described below.  Modules/natives are not implemented yet.
dvander@211
    91
 * PASS ONE: All loadable plugins are found and have the following steps performed:
dvander@211
    92
 *			 1.  Loading and compilation is attempted.
dvander@211
    93
 *			 2.  If successful, all natives from Core are added.
dvander@211
    94
 *			 3.  OnPluginLoad() is called.
dvander@211
    95
 *			 4.  If failed, any user natives are scrapped and the process halts here.
dvander@211
    96
 *			 5.  If successful, the plugin is ready for Pass 2.
dvander@211
    97
 * INTERMEDIATE:
dvander@211
    98
 *			 1.  All forced modules are loaded.
dvander@211
    99
 * PASS TWO: All loaded plugins are found and have these steps performed:
dvander@211
   100
 *			 1. Any modules referenced in the plugin that are not already loaded, are loaded.
dvander@211
   101
 *			 2. If any module fails to load and the plugin requires it, load fails and jump to step 6.
dvander@211
   102
 *			 3. If any natives are unresolved, check if they are found in the user-natives pool.
dvander@211
   103
 *			 4. If yes, load succeeds.  If not, natives are passed through a native acceptance filter.
dvander@211
   104
 *			 5. If the filter fails, the plugin is marked as failed.
dvander@211
   105
 *			 6. If the plugin has failed to load at this point, any dynamic natives it has added are scrapped.
dvander@211
   106
 *			    Furthermore, any plugin that referenced these natives must now have pass 2 re-ran.
dvander@211
   107
 * PASS THREE (not a real pass):
ds@426
   108
 *			 7. Once all plugins are deemed to be loaded, OnPluginStart() is called
dvander@209
   109
 */
dvander@209
   110
faluco@383
   111
enum LoadRes
faluco@383
   112
{
faluco@383
   113
	LoadRes_Successful,
faluco@383
   114
	LoadRes_AlreadyLoaded,
dvander@1436
   115
	LoadRes_Failure,
dvander@1436
   116
	LoadRes_NeverLoad
faluco@383
   117
};
faluco@383
   118
dvander@978
   119
struct AutoConfig
dvander@978
   120
{
dvander@978
   121
	String autocfg;
dvander@978
   122
	String folder;
dvander@978
   123
	bool create;
dvander@978
   124
};
dvander@978
   125
faluco@1112
   126
class CPlugin;
faluco@1112
   127
dvander@2086
   128
class CPlugin : 
dvander@2086
   129
	public IPlugin,
dvander@2086
   130
	public CNativeOwner
dvander@173
   131
{
dvander@174
   132
	friend class CPluginManager;
dvander@176
   133
	friend class CFunction;
dvander@173
   134
public:
dvander@209
   135
	CPlugin(const char *file);
dvander@209
   136
	~CPlugin();
dvander@209
   137
public:
faluco@641
   138
	PluginType GetType();
faluco@641
   139
	SourcePawn::IPluginContext *GetBaseContext();
faluco@641
   140
	sp_context_t *GetContext();
dvander@2193
   141
	void *GetPluginStructure();
faluco@641
   142
	const char *GetFilename();
faluco@641
   143
	bool IsDebugging();
faluco@641
   144
	PluginStatus GetStatus();
dvander@2193
   145
	const sm_plugininfo_t *GetPublicInfo();
faluco@641
   146
	bool SetPauseState(bool paused);
faluco@641
   147
	unsigned int GetSerial();
faluco@641
   148
	IdentityToken_t *GetIdentity();
dvander@1766
   149
	unsigned int CalcMemUsage();
faluco@641
   150
	bool SetProperty(const char *prop, void *ptr);
faluco@641
   151
	bool GetProperty(const char *prop, void **ptr, bool remove=false);
dvander@2086
   152
	void DropEverything();
dvander@2193
   153
	SourcePawn::IPluginRuntime *GetRuntime();
dvander@173
   154
public:
dvander@209
   155
	/**
dvander@209
   156
	 * Creates a plugin object with default values.
dvander@209
   157
	 *   If an error buffer is specified, and an error occurs, the error will be copied to the buffer
dvander@209
   158
	 * and NULL will be returned.
dvander@209
   159
	 *   If an error buffer is not specified, the error will be copied to an internal buffer and 
dvander@209
   160
	 * a valid (but error-stated) CPlugin will be returned.
dvander@209
   161
	 */
dvander@209
   162
	static CPlugin *CreatePlugin(const char *file, char *error, size_t maxlength);
dvander@209
   163
public:
dvander@229
   164
dvander@209
   165
	/**
dvander@209
   166
	 * Sets an error state on the plugin
dvander@209
   167
	 */
dvander@209
   168
	void SetErrorState(PluginStatus status, const char *error_fmt, ...);
dvander@211
   169
dvander@211
   170
	/**
dvander@229
   171
	 * Initializes the plugin's identity information
dvander@229
   172
	 */
dvander@229
   173
	void InitIdentity();
dvander@229
   174
dvander@229
   175
	/**
dvander@211
   176
	 * Calls the OnPluginLoad function, and sets any failed states if necessary.
dvander@211
   177
	 * NOTE: Valid pre-states are: Plugin_Created
dvander@282
   178
	 * NOTE: If validated, plugin state is changed to Plugin_Loaded
dvander@211
   179
	 *
dvander@211
   180
	 * If the error buffer is NULL, the error message is cached locally.
dvander@211
   181
	 */
dvander@211
   182
	bool Call_AskPluginLoad(char *error, size_t maxlength);
dvander@211
   183
dvander@211
   184
	/**
ds@426
   185
	 * Calls the OnPluginStart function.
dvander@211
   186
	 * NOTE: Valid pre-states are: Plugin_Created
dvander@282
   187
	 * NOTE: Post-state will be Plugin_Running
dvander@211
   188
	 */
ds@426
   189
	void Call_OnPluginStart();
dvander@282
   190
dvander@282
   191
	/**
ds@426
   192
	 * Calls the OnPluginEnd function.
dvander@282
   193
	 */
ds@426
   194
	void Call_OnPluginEnd();
faluco@290
   195
faluco@290
   196
	/**
faluco@1221
   197
	 * Calls the OnAllPluginsLoaded function.
faluco@1221
   198
	 */
faluco@1221
   199
	void Call_OnAllPluginsLoaded();
faluco@1221
   200
faluco@1221
   201
	/**
dvander@315
   202
	 * Returns true if a plugin is usable.
dvander@315
   203
	 */
dvander@615
   204
	bool IsRunnable();
faluco@389
   205
faluco@389
   206
	/**
dvander@2042
   207
	 * Get languages info.
dvander@536
   208
	 */
dvander@2042
   209
	IPhraseCollection *GetPhrases();
dvander@211
   210
public:
faluco@333
   211
	/**
dvander@536
   212
	 * Returns the modification time during last plugin load.
dvander@536
   213
	 */
dvander@615
   214
	time_t GetTimeStamp();
faluco@333
   215
faluco@333
   216
	/**
dvander@536
   217
	 * Returns the current modification time of the plugin file.
dvander@536
   218
	 */
faluco@333
   219
	time_t GetFileTimeStamp();
dvander@282
   220
dvander@282
   221
	/** 
dvander@282
   222
	 * Returns true if the plugin was running, but is now invalid.
dvander@282
   223
	 */
dvander@282
   224
	bool WasRunning();
dvander@536
   225
dvander@536
   226
	Handle_t GetMyHandle();
dvander@978
   227
dvander@2086
   228
	bool AddFakeNative(IPluginFunction *pFunc, const char *name, SPVM_FAKENATIVE_FUNC func);
dvander@978
   229
	void AddConfig(bool autoCreate, const char *cfg, const char *folder);
dvander@978
   230
	unsigned int GetConfigCount();
dvander@978
   231
	AutoConfig *GetConfig(unsigned int i);
faluco@1112
   232
	inline void AddLibrary(const char *name)
faluco@1089
   233
	{
faluco@1112
   234
		m_Libraries.push_back(name);
faluco@1089
   235
	}
dvander@1124
   236
	void LibraryActions(bool dropping);
dvander@2342
   237
	void SyncMaxClients(int max_clients);
dvander@173
   238
protected:
dvander@2342
   239
	bool UpdateInfo();
faluco@333
   240
	void SetTimeStamp(time_t t);
dvander@605
   241
	void DependencyDropped(CPlugin *pOwner);
dvander@173
   242
private:
dvander@174
   243
	PluginType m_type;
ds@652
   244
	char m_filename[PLATFORM_MAX_PATH];
dvander@173
   245
	PluginStatus m_status;
dvander@173
   246
	unsigned int m_serial;
dvander@173
   247
	sm_plugininfo_t m_info;
dvander@209
   248
	char m_errormsg[256];
dvander@211
   249
	time_t m_LastAccess;
dvander@229
   250
	IdentityToken_t *m_ident;
dvander@220
   251
	Handle_t m_handle;
dvander@282
   252
	bool m_WasRunning;
dvander@2042
   253
	IPhraseCollection *m_pPhrases;
faluco@1112
   254
	List<String> m_RequiredLibs;
faluco@1112
   255
	List<String> m_Libraries;
dvander@486
   256
	Trie *m_pProps;
dvander@605
   257
	bool m_FakeNativesMissing;
faluco@1112
   258
	bool m_LibraryMissing;
dvander@978
   259
	CVector<AutoConfig *> m_configs;
dvander@1630
   260
	bool m_bGotAllLoaded;
dvander@2105
   261
	int m_FileVersion;
dvander@2105
   262
	char m_DateTime[256];
dvander@2193
   263
	IPluginRuntime *m_pRuntime;
dvander@2193
   264
	IPluginContext *m_pContext;
dvander@2342
   265
	sp_pubvar_t *m_MaxClientsVar;
dvander@601
   266
};
dvander@601
   267
dvander@220
   268
class CPluginManager : 
dvander@220
   269
	public IPluginManager,
dvander@220
   270
	public SMGlobalClass,
dvander@309
   271
	public IHandleTypeDispatch,
dvander@309
   272
	public IRootConsoleCommand
dvander@174
   273
{
dvander@176
   274
	friend class CPlugin;
dvander@174
   275
public:
dvander@174
   276
	CPluginManager();
dvander@176
   277
	~CPluginManager();
dvander@174
   278
public:
dvander@203
   279
	/* Implements iterator class */
dvander@174
   280
	class CPluginIterator : public IPluginIterator
dvander@174
   281
	{
dvander@174
   282
	public:
dvander@213
   283
		CPluginIterator(List<CPlugin *> *mylist);
dvander@174
   284
		virtual ~CPluginIterator();
dvander@174
   285
		virtual bool MorePlugins();
dvander@174
   286
		virtual IPlugin *GetPlugin();
dvander@174
   287
		virtual void NextPlugin();
dvander@282
   288
		void Release();
dvander@174
   289
	public:
dvander@174
   290
		void Reset();
dvander@174
   291
	private:
dvander@213
   292
		List<CPlugin *> *mylist;
dvander@213
   293
		List<CPlugin *>::iterator current;
dvander@174
   294
	};
dvander@174
   295
	friend class CPluginManager::CPluginIterator;
dvander@203
   296
public: //IPluginManager
dvander@282
   297
	IPlugin *LoadPlugin(const char *path, 
dvander@174
   298
								bool debug,
dvander@174
   299
								PluginType type,
dvander@174
   300
								char error[],
ds@755
   301
								size_t maxlength,
faluco@383
   302
								bool *wasloaded);
dvander@282
   303
	bool UnloadPlugin(IPlugin *plugin);
dvander@282
   304
	IPlugin *FindPluginByContext(const sp_context_t *ctx);
dvander@282
   305
	unsigned int GetPluginCount();
dvander@282
   306
	IPluginIterator *GetPluginIterator();
dvander@282
   307
	void AddPluginsListener(IPluginsListener *listener);
dvander@282
   308
	void RemovePluginsListener(IPluginsListener *listener);
dvander@220
   309
public: //SMGlobalClass
dvander@282
   310
	void OnSourceModAllInitialized();
dvander@282
   311
	void OnSourceModShutdown();
dvander@2342
   312
	void OnSourceModMaxPlayersChanged(int newvalue);
dvander@220
   313
public: //IHandleTypeDispatch
dvander@282
   314
	void OnHandleDestroy(HandleType_t type, void *object);
dvander@1766
   315
	bool GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize);
dvander@309
   316
public: //IRootConsoleCommand
faluco@1541
   317
	void OnRootConsoleCommand(const char *cmdname, const CCommand &command);
dvander@190
   318
public:
dvander@203
   319
	/**
dvander@211
   320
	 * Loads all plugins not yet loaded
dvander@203
   321
	 */
dvander@211
   322
	void LoadAll_FirstPass(const char *config, const char *basedir);
dvander@211
   323
dvander@211
   324
	/**
dvander@211
   325
	 * Runs the second loading pass for all plugins
dvander@211
   326
	 */
dvander@211
   327
	void LoadAll_SecondPass();
dvander@203
   328
dvander@203
   329
	/**
dvander@203
   330
	 * Tests a plugin file mask against a local folder.
dvander@203
   331
	 * The alias is searched backwards from localdir - i.e., given this input:
dvander@203
   332
	 *   csdm/ban        csdm/ban
dvander@203
   333
	 *   ban             csdm/ban
dvander@203
   334
	 *   csdm/ban        optional/csdm/ban
dvander@203
   335
	 * All of these will return true for an alias match.  
dvander@203
   336
	 * Wildcards are allowed in the filename.
dvander@203
   337
	 */
dvander@209
   338
	bool TestAliasMatch(const char *alias, const char *localdir);
dvander@211
   339
dvander@211
   340
	/** 
dvander@211
   341
	 * Returns whether anything loaded will be a late load.
dvander@211
   342
	 */
faluco@290
   343
	bool IsLateLoadTime() const;
dvander@233
   344
dvander@233
   345
	/**
dvander@247
   346
	 * Converts a Handle to an IPlugin if possible.
dvander@247
   347
	 */
dvander@247
   348
	IPlugin *PluginFromHandle(Handle_t handle, HandleError *err);
faluco@290
   349
faluco@290
   350
	/**
dvander@309
   351
	 * Finds a plugin based on its index. (starts on index 1)
dvander@309
   352
	 */
faluco@290
   353
	CPlugin *GetPluginByOrder(int num);
dvander@309
   354
dvander@1638
   355
	int GetOrderOfPlugin(IPlugin *pl);
dvander@1638
   356
ds@457
   357
	/** 
ds@457
   358
	 * Internal version of FindPluginByContext()
ds@457
   359
	 */
dvander@2193
   360
	CPlugin *GetPluginByCtx(const sp_context_t *ctx);
ds@457
   361
dvander@309
   362
	/**
dvander@309
   363
	 * Gets status text for a status code 
dvander@309
   364
	 */
dvander@309
   365
	const char *GetStatusText(PluginStatus status);
dvander@315
   366
faluco@333
   367
	/**
faluco@333
   368
	* Reload or update plugins on level shutdown.
faluco@333
   369
	*/
faluco@333
   370
	void ReloadOrUnloadPlugins();
faluco@333
   371
ds@611
   372
	/**
ds@611
   373
	 * Add public functions from all running or paused
ds@611
   374
	 * plugins to the specified forward if the names match.
ds@611
   375
	 */
ds@611
   376
	void AddFunctionsToForward(const char *name, IChangeableForward *pForward);
ds@611
   377
faluco@1221
   378
	/**
faluco@1221
   379
	 * Iterates through plugins to call OnAllPluginsLoaded.
faluco@1221
   380
	 */
faluco@1221
   381
	void AllPluginsLoaded();
faluco@1221
   382
dvander@900
   383
	CPlugin *GetPluginFromIdentity(IdentityToken_t *pToken);
dvander@900
   384
dvander@1018
   385
	void Shutdown();
dvander@1018
   386
dvander@1572
   387
	void OnLibraryAction(const char *lib, bool is_a_plugin, bool drop);
dvander@1124
   388
dvander@1124
   389
	bool LibraryExists(const char *lib);
faluco@1348
   390
faluco@1348
   391
	bool ReloadPlugin(CPlugin *pl);
dvander@1630
   392
dvander@1630
   393
	void UnloadAll();
dvander@1902
   394
dvander@1902
   395
	CPlugin *FindPluginByConsoleArg(const char *arg);
dvander@2342
   396
dvander@2342
   397
	void SyncMaxClients(int max_clients);
dvander@209
   398
private:
ds@755
   399
	LoadRes _LoadPlugin(CPlugin **pPlugin, const char *path, bool debug, PluginType type, char error[], size_t maxlength);
dvander@298
   400
dvander@298
   401
	void LoadAutoPlugin(const char *plugin);
dvander@298
   402
dvander@209
   403
	/**
dvander@209
   404
	 * Recursively loads all plugins in the given directory.
dvander@209
   405
	 */
dvander@209
   406
	void LoadPluginsFromDir(const char *basedir, const char *localdir);
dvander@209
   407
dvander@209
   408
	/**
dvander@211
   409
	 * Adds a plugin object.  This is wrapped by LoadPlugin functions.
dvander@211
   410
	 */
dvander@211
   411
	void AddPlugin(CPlugin *pPlugin);
dvander@211
   412
dvander@211
   413
	/**
dvander@211
   414
	 * Runs the second loading pass on a plugin.
dvander@209
   415
	 */
dvander@298
   416
	bool RunSecondPass(CPlugin *pPlugin, char *error, size_t maxlength);
dvander@211
   417
dvander@211
   418
	/**
dvander@315
   419
	 * Runs an extension pass on a plugin.
dvander@315
   420
	 */
dvander@315
   421
	bool LoadOrRequireExtensions(CPlugin *pPlugin, unsigned int pass, char *error, size_t maxlength);
faluco@430
   422
faluco@1112
   423
	/**
faluco@1112
   424
	* Manages required natives.
faluco@1112
   425
	*/
faluco@1112
   426
	bool FindOrRequirePluginDeps(CPlugin *pPlugin, char *error, size_t maxlength);
faluco@1112
   427
faluco@430
   428
	void _SetPauseState(CPlugin *pPlugin, bool pause);
dvander@174
   429
protected:
dvander@209
   430
	/**
dvander@209
   431
	 * Caching internal objects
dvander@209
   432
	 */
dvander@174
   433
	void ReleaseIterator(CPluginIterator *iter);
dvander@900
   434
public:
dvander@229
   435
	inline IdentityToken_t *GetIdentity()
dvander@229
   436
	{
dvander@229
   437
		return m_MyIdent;
dvander@229
   438
	}
dvander@601
   439
private:
faluco@1112
   440
	void TryRefreshDependencies(CPlugin *pOther);
dvander@174
   441
private:
dvander@174
   442
	List<IPluginsListener *> m_listeners;
dvander@213
   443
	List<CPlugin *> m_plugins;
dvander@174
   444
	CStack<CPluginManager::CPluginIterator *> m_iters;
dvander@203
   445
	CPluginInfoDatabase m_PluginInfo;
dvander@211
   446
	Trie *m_LoadLookup;
dvander@211
   447
	bool m_AllPluginsLoaded;
dvander@229
   448
	IdentityToken_t *m_MyIdent;
dvander@601
   449
dvander@601
   450
	/* Dynamic native stuff */
dvander@601
   451
	List<FakeNative *> m_Natives;
dvander@601
   452
dvander@1630
   453
	bool m_LoadingLocked;
dvander@174
   454
};
dvander@174
   455
dvander@211
   456
extern CPluginManager g_PluginSys;
dvander@174
   457
dvander@173
   458
#endif //_INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_