core/systems/PluginSys.h
author David Anderson <dvander@alliedmods.net>
Sun Jul 15 21:29:49 2007 +0000 (2007-07-15)
changeset 1122 f07d8e10433b
parent 1112 152ceef17866
child 1124 a397d51fb986
permissions -rw-r--r--
- reloading now refreshes weak native binds
- fixed a crash bug when unloading a plugin being pointed to by weak ntvrefs in another plugin
dvander@370
     1
/**
ds@653
     2
 * vim: set ts=4 :
dvander@370
     3
 * ===============================================================
dvander@370
     4
 * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
dvander@370
     5
 * ===============================================================
dvander@370
     6
 *
dvander@370
     7
 * This file is not open source and may not be copied without explicit
dvander@370
     8
 * written permission of AlliedModders LLC.  This file may not be redistributed 
dvander@370
     9
 * in whole or significant part.
dvander@370
    10
 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
dvander@370
    11
 *
dvander@370
    12
 * Version: $Id$
dvander@370
    13
 */
dvander@370
    14
dvander@173
    15
#ifndef _INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_
dvander@173
    16
#define _INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_
dvander@173
    17
dvander@211
    18
#include <time.h>
faluco@333
    19
#include <errno.h>
faluco@333
    20
#include <sys/stat.h>
dvander@173
    21
#include <IPluginSys.h>
dvander@220
    22
#include <IHandleSys.h>
ds@611
    23
#include <IForwardSys.h>
dvander@174
    24
#include <sh_list.h>
dvander@174
    25
#include <sh_stack.h>
faluco@389
    26
#include <sh_vector.h>
dvander@601
    27
#include <sh_string.h>
dvander@173
    28
#include "sm_globals.h"
dvander@262
    29
#include "vm/sp_vm_basecontext.h"
dvander@203
    30
#include "PluginInfoDatabase.h"
dvander@211
    31
#include "sm_trie.h"
dvander@220
    32
#include "sourcemod.h"
dvander@309
    33
#include <IRootConsoleMenu.h>
ds@457
    34
#include "convar_sm.h"
dvander@173
    35
dvander@174
    36
using namespace SourceHook;
dvander@174
    37
dvander@209
    38
/**
dvander@209
    39
 * NOTES:
dvander@209
    40
 *
dvander@209
    41
 *  Currently this system needs a lot of work but it's good skeletally.  Plugin creation 
dvander@209
    42
 * is done without actually compiling anything.  This is done by Load functions in the 
dvander@209
    43
 * manager.  This will need a rewrite when we add context switching.
dvander@209
    44
 *
dvander@209
    45
 *  The plugin object itself has a few things to note.  The most important is that it stores
dvander@209
    46
 * a table of function objects.  The manager marshals allocation and freeing of these objects.
dvander@209
    47
 * The plugin object can be in erroneous states, they are:
dvander@209
    48
 *   Plugin_Error   --> Some error occurred any time during or after compilation.
dvander@209
    49
 *						This error can be cleared since the plugin itself is valid.
dvander@209
    50
 *						However, the state itself being set prevents any runtime action.
dvander@209
    51
 *   Plugin_BadLoad	--> The plugin failed to load entirely and nothing can be done to save it.
dvander@209
    52
 *
dvander@209
    53
 *  If a plugin fails to load externally, it is never added to the internal tracker.  However, 
dvander@209
    54
 * plugins that failed to load from the internal loading mechanism are always tracked.  This 
dvander@209
    55
 * allows users to see which automatically loaded plugins failed, and makes the interface a bit
dvander@209
    56
 * more flexible.
dvander@211
    57
 *
dvander@211
    58
 *  Once a plugin is compiled, it sets its own state to Plugin_Created.  This state is still invalid
dvander@211
    59
 * for execution.  SourceMod is a two pass system, and even though the second pass is not implemented
dvander@211
    60
 * yet, it is structured so Plugin_Created must be switched to Plugin_Running in the second pass.  When
dvander@211
    61
 * implemented, a Created plugin will be switched to Error in the second pass if it not loadable.
dvander@211
    62
 *
dvander@211
    63
 *  The two pass loading mechanism is described below.  Modules/natives are not implemented yet.
dvander@211
    64
 * PASS ONE: All loadable plugins are found and have the following steps performed:
dvander@211
    65
 *			 1.  Loading and compilation is attempted.
dvander@211
    66
 *			 2.  If successful, all natives from Core are added.
dvander@211
    67
 *			 3.  OnPluginLoad() is called.
dvander@211
    68
 *			 4.  If failed, any user natives are scrapped and the process halts here.
dvander@211
    69
 *			 5.  If successful, the plugin is ready for Pass 2.
dvander@211
    70
 * INTERMEDIATE:
dvander@211
    71
 *			 1.  All forced modules are loaded.
dvander@211
    72
 * PASS TWO: All loaded plugins are found and have these steps performed:
dvander@211
    73
 *			 1. Any modules referenced in the plugin that are not already loaded, are loaded.
dvander@211
    74
 *			 2. If any module fails to load and the plugin requires it, load fails and jump to step 6.
dvander@211
    75
 *			 3. If any natives are unresolved, check if they are found in the user-natives pool.
dvander@211
    76
 *			 4. If yes, load succeeds.  If not, natives are passed through a native acceptance filter.
dvander@211
    77
 *			 5. If the filter fails, the plugin is marked as failed.
dvander@211
    78
 *			 6. If the plugin has failed to load at this point, any dynamic natives it has added are scrapped.
dvander@211
    79
 *			    Furthermore, any plugin that referenced these natives must now have pass 2 re-ran.
dvander@211
    80
 * PASS THREE (not a real pass):
ds@426
    81
 *			 7. Once all plugins are deemed to be loaded, OnPluginStart() is called
dvander@209
    82
 */
dvander@209
    83
dvander@174
    84
#define SM_CONTEXTVAR_MYSELF	0
dvander@174
    85
dvander@173
    86
struct ContextPair
dvander@173
    87
{
dvander@209
    88
	ContextPair() : base(NULL), ctx(NULL), co(NULL)
dvander@173
    89
	{
dvander@173
    90
	};
dvander@262
    91
	BaseContext *base;
dvander@173
    92
	sp_context_t *ctx;
dvander@209
    93
	ICompilation *co;
dvander@209
    94
	IVirtualMachine *vm;
dvander@173
    95
};
dvander@173
    96
dvander@605
    97
struct FakeNative
dvander@605
    98
{
dvander@605
    99
	IPluginContext *ctx;
dvander@605
   100
	IPluginFunction *call;
dvander@605
   101
	String name;
dvander@605
   102
	SPVM_NATIVE_FUNC func;
dvander@605
   103
};
dvander@605
   104
faluco@383
   105
enum LoadRes
faluco@383
   106
{
faluco@383
   107
	LoadRes_Successful,
faluco@383
   108
	LoadRes_AlreadyLoaded,
faluco@383
   109
	LoadRes_Failure
faluco@383
   110
};
faluco@383
   111
dvander@978
   112
struct AutoConfig
dvander@978
   113
{
dvander@978
   114
	String autocfg;
dvander@978
   115
	String folder;
dvander@978
   116
	bool create;
dvander@978
   117
};
dvander@978
   118
faluco@1112
   119
class CPlugin;
faluco@1112
   120
struct WeakNative
faluco@1112
   121
{
faluco@1112
   122
	WeakNative(CPlugin *plugin, uint32_t index)
faluco@1112
   123
	{
faluco@1112
   124
		pl = plugin;
faluco@1112
   125
		idx = index;
faluco@1112
   126
	}
faluco@1112
   127
	CPlugin *pl;
faluco@1112
   128
	uint32_t idx;
faluco@1112
   129
};
faluco@1112
   130
dvander@173
   131
class CPlugin : public IPlugin
dvander@173
   132
{
dvander@174
   133
	friend class CPluginManager;
dvander@176
   134
	friend class CFunction;
dvander@173
   135
public:
dvander@209
   136
	CPlugin(const char *file);
dvander@209
   137
	~CPlugin();
dvander@209
   138
public:
faluco@641
   139
	PluginType GetType();
faluco@641
   140
	SourcePawn::IPluginContext *GetBaseContext();
faluco@641
   141
	sp_context_t *GetContext();
faluco@641
   142
	const sm_plugininfo_t *GetPublicInfo();
faluco@641
   143
	const char *GetFilename();
faluco@641
   144
	bool IsDebugging();
faluco@641
   145
	PluginStatus GetStatus();
faluco@641
   146
	bool SetPauseState(bool paused);
faluco@641
   147
	unsigned int GetSerial();
faluco@641
   148
	const sp_plugin_t *GetPluginStructure();
faluco@641
   149
	IdentityToken_t *GetIdentity();
faluco@641
   150
	bool SetProperty(const char *prop, void *ptr);
faluco@641
   151
	bool GetProperty(const char *prop, void **ptr, bool remove=false);
dvander@173
   152
public:
dvander@209
   153
	/**
dvander@209
   154
	 * Creates a plugin object with default values.
dvander@209
   155
	 *   If an error buffer is specified, and an error occurs, the error will be copied to the buffer
dvander@209
   156
	 * and NULL will be returned.
dvander@209
   157
	 *   If an error buffer is not specified, the error will be copied to an internal buffer and 
dvander@209
   158
	 * a valid (but error-stated) CPlugin will be returned.
dvander@209
   159
	 */
dvander@209
   160
	static CPlugin *CreatePlugin(const char *file, char *error, size_t maxlength);
dvander@209
   161
public:
dvander@209
   162
	/**
dvander@209
   163
	 * Starts the initial compilation of a plugin.
dvander@209
   164
	 * Returns false if another compilation exists or there is a current context set.
dvander@209
   165
	 */
dvander@209
   166
	ICompilation *StartMyCompile(IVirtualMachine *vm);
dvander@209
   167
	/** 
dvander@209
   168
	 * Finalizes a compilation.  If error buffer is NULL, the error is saved locally.
dvander@209
   169
	 */
dvander@209
   170
	bool FinishMyCompile(char *error, size_t maxlength);
dvander@209
   171
	void CancelMyCompile();
dvander@229
   172
dvander@209
   173
	/**
dvander@209
   174
	 * Sets an error state on the plugin
dvander@209
   175
	 */
dvander@209
   176
	void SetErrorState(PluginStatus status, const char *error_fmt, ...);
dvander@211
   177
dvander@211
   178
	/**
dvander@229
   179
	 * Initializes the plugin's identity information
dvander@229
   180
	 */
dvander@229
   181
	void InitIdentity();
dvander@229
   182
dvander@229
   183
	/**
dvander@211
   184
	 * Calls the OnPluginLoad function, and sets any failed states if necessary.
dvander@211
   185
	 * NOTE: Valid pre-states are: Plugin_Created
dvander@282
   186
	 * NOTE: If validated, plugin state is changed to Plugin_Loaded
dvander@211
   187
	 *
dvander@211
   188
	 * If the error buffer is NULL, the error message is cached locally.
dvander@211
   189
	 */
dvander@211
   190
	bool Call_AskPluginLoad(char *error, size_t maxlength);
dvander@211
   191
dvander@211
   192
	/**
ds@426
   193
	 * Calls the OnPluginStart function.
dvander@211
   194
	 * NOTE: Valid pre-states are: Plugin_Created
dvander@282
   195
	 * NOTE: Post-state will be Plugin_Running
dvander@211
   196
	 */
ds@426
   197
	void Call_OnPluginStart();
dvander@282
   198
dvander@282
   199
	/**
ds@426
   200
	 * Calls the OnPluginEnd function.
dvander@282
   201
	 */
ds@426
   202
	void Call_OnPluginEnd();
faluco@290
   203
faluco@290
   204
	/**
dvander@315
   205
	 * Toggles debug mode in the plugin
dvander@315
   206
	 */
dvander@309
   207
	bool ToggleDebugMode(bool debug, char *error, size_t maxlength);
faluco@290
   208
faluco@290
   209
	/**
dvander@315
   210
	 * Returns true if a plugin is usable.
dvander@315
   211
	 */
dvander@615
   212
	bool IsRunnable();
faluco@389
   213
faluco@389
   214
	/**
dvander@536
   215
	 * Adds a language file index to the plugin's list.
dvander@536
   216
	 */
faluco@389
   217
	void AddLangFile(unsigned int index);
faluco@389
   218
faluco@389
   219
	/**
dvander@536
   220
	 * Get language file count for this plugin.
dvander@536
   221
	 */
dvander@615
   222
	size_t GetLangFileCount();
faluco@389
   223
faluco@389
   224
	/**
dvander@536
   225
	 * Get language file index based on the vector index.
dvander@536
   226
	 */
dvander@615
   227
	unsigned int GetLangFileByIndex(unsigned int index);
dvander@211
   228
public:
faluco@333
   229
	/**
dvander@536
   230
	 * Returns the modification time during last plugin load.
dvander@536
   231
	 */
dvander@615
   232
	time_t GetTimeStamp();
faluco@333
   233
faluco@333
   234
	/**
dvander@536
   235
	 * Returns the current modification time of the plugin file.
dvander@536
   236
	 */
faluco@333
   237
	time_t GetFileTimeStamp();
dvander@282
   238
dvander@282
   239
	/** 
dvander@282
   240
	 * Returns true if the plugin was running, but is now invalid.
dvander@282
   241
	 */
dvander@282
   242
	bool WasRunning();
dvander@536
   243
dvander@536
   244
	Handle_t GetMyHandle();
dvander@978
   245
dvander@978
   246
	void AddConfig(bool autoCreate, const char *cfg, const char *folder);
dvander@978
   247
	unsigned int GetConfigCount();
dvander@978
   248
	AutoConfig *GetConfig(unsigned int i);
faluco@1112
   249
	inline void AddLibrary(const char *name)
faluco@1089
   250
	{
faluco@1112
   251
		m_Libraries.push_back(name);
faluco@1089
   252
	}
dvander@173
   253
protected:
dvander@173
   254
	void UpdateInfo();
faluco@333
   255
	void SetTimeStamp(time_t t);
dvander@605
   256
	void DependencyDropped(CPlugin *pOwner);
dvander@173
   257
private:
dvander@209
   258
	ContextPair m_ctx;
dvander@174
   259
	PluginType m_type;
ds@652
   260
	char m_filename[PLATFORM_MAX_PATH];
dvander@173
   261
	PluginStatus m_status;
dvander@173
   262
	unsigned int m_serial;
dvander@173
   263
	sm_plugininfo_t m_info;
dvander@173
   264
	sp_plugin_t *m_plugin;
dvander@209
   265
	char m_errormsg[256];
dvander@211
   266
	time_t m_LastAccess;
dvander@229
   267
	IdentityToken_t *m_ident;
dvander@220
   268
	Handle_t m_handle;
dvander@282
   269
	bool m_WasRunning;
faluco@389
   270
	CVector<unsigned int> m_PhraseFiles;
dvander@605
   271
	List<CPlugin *> m_dependents;
dvander@605
   272
	List<CPlugin *> m_dependsOn;
dvander@605
   273
	List<FakeNative *> m_fakeNatives;
dvander@1122
   274
	List<WeakNative> m_WeakNatives;
faluco@1112
   275
	List<String> m_RequiredLibs;
faluco@1112
   276
	List<String> m_Libraries;
dvander@486
   277
	Trie *m_pProps;
dvander@605
   278
	bool m_FakeNativesMissing;
faluco@1112
   279
	bool m_LibraryMissing;
dvander@978
   280
	CVector<AutoConfig *> m_configs;
dvander@601
   281
};
dvander@601
   282
dvander@220
   283
class CPluginManager : 
dvander@220
   284
	public IPluginManager,
dvander@220
   285
	public SMGlobalClass,
dvander@309
   286
	public IHandleTypeDispatch,
dvander@309
   287
	public IRootConsoleCommand
dvander@174
   288
{
dvander@176
   289
	friend class CPlugin;
dvander@174
   290
public:
dvander@174
   291
	CPluginManager();
dvander@176
   292
	~CPluginManager();
dvander@174
   293
public:
dvander@203
   294
	/* Implements iterator class */
dvander@174
   295
	class CPluginIterator : public IPluginIterator
dvander@174
   296
	{
dvander@174
   297
	public:
dvander@213
   298
		CPluginIterator(List<CPlugin *> *mylist);
dvander@174
   299
		virtual ~CPluginIterator();
dvander@174
   300
		virtual bool MorePlugins();
dvander@174
   301
		virtual IPlugin *GetPlugin();
dvander@174
   302
		virtual void NextPlugin();
dvander@282
   303
		void Release();
dvander@174
   304
	public:
dvander@174
   305
		void Reset();
dvander@174
   306
	private:
dvander@213
   307
		List<CPlugin *> *mylist;
dvander@213
   308
		List<CPlugin *>::iterator current;
dvander@174
   309
	};
dvander@174
   310
	friend class CPluginManager::CPluginIterator;
dvander@203
   311
public: //IPluginManager
dvander@282
   312
	IPlugin *LoadPlugin(const char *path, 
dvander@174
   313
								bool debug,
dvander@174
   314
								PluginType type,
dvander@174
   315
								char error[],
ds@755
   316
								size_t maxlength,
faluco@383
   317
								bool *wasloaded);
dvander@282
   318
	bool UnloadPlugin(IPlugin *plugin);
dvander@282
   319
	IPlugin *FindPluginByContext(const sp_context_t *ctx);
dvander@282
   320
	unsigned int GetPluginCount();
dvander@282
   321
	IPluginIterator *GetPluginIterator();
dvander@282
   322
	void AddPluginsListener(IPluginsListener *listener);
dvander@282
   323
	void RemovePluginsListener(IPluginsListener *listener);
dvander@220
   324
public: //SMGlobalClass
dvander@282
   325
	void OnSourceModAllInitialized();
dvander@282
   326
	void OnSourceModShutdown();
dvander@220
   327
public: //IHandleTypeDispatch
dvander@282
   328
	void OnHandleDestroy(HandleType_t type, void *object);
dvander@309
   329
public: //IRootConsoleCommand
dvander@309
   330
	void OnRootConsoleCommand(const char *command, unsigned int argcount);
dvander@190
   331
public:
dvander@203
   332
	/**
dvander@211
   333
	 * Loads all plugins not yet loaded
dvander@203
   334
	 */
dvander@211
   335
	void LoadAll_FirstPass(const char *config, const char *basedir);
dvander@211
   336
dvander@211
   337
	/**
dvander@211
   338
	 * Runs the second loading pass for all plugins
dvander@211
   339
	 */
dvander@211
   340
	void LoadAll_SecondPass();
dvander@203
   341
dvander@203
   342
	/**
dvander@203
   343
	 * Tests a plugin file mask against a local folder.
dvander@203
   344
	 * The alias is searched backwards from localdir - i.e., given this input:
dvander@203
   345
	 *   csdm/ban        csdm/ban
dvander@203
   346
	 *   ban             csdm/ban
dvander@203
   347
	 *   csdm/ban        optional/csdm/ban
dvander@203
   348
	 * All of these will return true for an alias match.  
dvander@203
   349
	 * Wildcards are allowed in the filename.
dvander@203
   350
	 */
dvander@209
   351
	bool TestAliasMatch(const char *alias, const char *localdir);
dvander@211
   352
dvander@211
   353
	/** 
dvander@211
   354
	 * Returns whether anything loaded will be a late load.
dvander@211
   355
	 */
faluco@290
   356
	bool IsLateLoadTime() const;
dvander@233
   357
dvander@233
   358
	/**
dvander@233
   359
	 * Adds natives from core into the native pool.
dvander@233
   360
	 */
dvander@233
   361
	void RegisterNativesFromCore(sp_nativeinfo_t *natives);
dvander@247
   362
dvander@247
   363
	/**
dvander@247
   364
	 * Converts a Handle to an IPlugin if possible.
dvander@247
   365
	 */
dvander@247
   366
	IPlugin *PluginFromHandle(Handle_t handle, HandleError *err);
faluco@290
   367
faluco@290
   368
	/**
dvander@309
   369
	 * Finds a plugin based on its index. (starts on index 1)
dvander@309
   370
	 */
faluco@290
   371
	CPlugin *GetPluginByOrder(int num);
dvander@309
   372
ds@457
   373
	/** 
ds@457
   374
	 * Internal version of FindPluginByContext()
ds@457
   375
	 */
ds@457
   376
	inline CPlugin *GetPluginByCtx(const sp_context_t *ctx)
ds@457
   377
	{
ds@457
   378
		return reinterpret_cast<CPlugin *>(ctx->user[SM_CONTEXTVAR_MYSELF]);
ds@457
   379
	}
ds@457
   380
dvander@309
   381
	/**
dvander@309
   382
	 * Gets status text for a status code 
dvander@309
   383
	 */
dvander@309
   384
	const char *GetStatusText(PluginStatus status);
dvander@315
   385
faluco@333
   386
	/**
faluco@333
   387
	* Reload or update plugins on level shutdown.
faluco@333
   388
	*/
faluco@333
   389
	void ReloadOrUnloadPlugins();
faluco@333
   390
ds@611
   391
	/**
ds@611
   392
	 * Add public functions from all running or paused
ds@611
   393
	 * plugins to the specified forward if the names match.
ds@611
   394
	 */
ds@611
   395
	void AddFunctionsToForward(const char *name, IChangeableForward *pForward);
ds@611
   396
dvander@900
   397
	CPlugin *GetPluginFromIdentity(IdentityToken_t *pToken);
dvander@900
   398
dvander@1018
   399
	void Shutdown();
dvander@1018
   400
dvander@209
   401
private:
ds@755
   402
	LoadRes _LoadPlugin(CPlugin **pPlugin, const char *path, bool debug, PluginType type, char error[], size_t maxlength);
dvander@298
   403
dvander@298
   404
	void LoadAutoPlugin(const char *plugin);
dvander@298
   405
dvander@209
   406
	/**
dvander@209
   407
	 * Recursively loads all plugins in the given directory.
dvander@209
   408
	 */
dvander@209
   409
	void LoadPluginsFromDir(const char *basedir, const char *localdir);
dvander@209
   410
dvander@209
   411
	/**
dvander@211
   412
	 * Adds a plugin object.  This is wrapped by LoadPlugin functions.
dvander@211
   413
	 */
dvander@211
   414
	void AddPlugin(CPlugin *pPlugin);
dvander@211
   415
dvander@211
   416
	/**
dvander@211
   417
	 * Runs the second loading pass on a plugin.
dvander@209
   418
	 */
dvander@298
   419
	bool RunSecondPass(CPlugin *pPlugin, char *error, size_t maxlength);
dvander@211
   420
dvander@211
   421
	/**
dvander@211
   422
	 * Adds any globally registered natives to a plugin
dvander@211
   423
	 */
dvander@211
   424
	void AddCoreNativesToPlugin(CPlugin *pPlugin);
dvander@315
   425
dvander@315
   426
	/**
dvander@315
   427
	 * Runs an extension pass on a plugin.
dvander@315
   428
	 */
dvander@315
   429
	bool LoadOrRequireExtensions(CPlugin *pPlugin, unsigned int pass, char *error, size_t maxlength);
faluco@430
   430
faluco@1112
   431
	/**
faluco@1112
   432
	* Manages required natives.
faluco@1112
   433
	*/
faluco@1112
   434
	bool FindOrRequirePluginDeps(CPlugin *pPlugin, char *error, size_t maxlength);
faluco@1112
   435
faluco@430
   436
	void _SetPauseState(CPlugin *pPlugin, bool pause);
dvander@978
   437
dvander@978
   438
	void ExecAndGenPluginConfs();
dvander@174
   439
protected:
dvander@209
   440
	/**
dvander@209
   441
	 * Caching internal objects
dvander@209
   442
	 */
dvander@174
   443
	void ReleaseIterator(CPluginIterator *iter);
dvander@900
   444
public:
dvander@229
   445
	inline IdentityToken_t *GetIdentity()
dvander@229
   446
	{
dvander@229
   447
		return m_MyIdent;
dvander@229
   448
	}
dvander@601
   449
public:
dvander@601
   450
	bool AddFakeNative(IPluginFunction *pFunction, const char *name, SPVM_FAKENATIVE_FUNC func);
dvander@601
   451
private:
dvander@601
   452
	void AddFakeNativesToPlugin(CPlugin *pPlugin);
faluco@1112
   453
	void TryRefreshDependencies(CPlugin *pOther);
dvander@174
   454
private:
dvander@174
   455
	List<IPluginsListener *> m_listeners;
dvander@213
   456
	List<CPlugin *> m_plugins;
dvander@211
   457
	List<sp_nativeinfo_t *> m_natives;
dvander@174
   458
	CStack<CPluginManager::CPluginIterator *> m_iters;
dvander@203
   459
	CPluginInfoDatabase m_PluginInfo;
dvander@211
   460
	Trie *m_LoadLookup;
dvander@211
   461
	bool m_AllPluginsLoaded;
dvander@229
   462
	IdentityToken_t *m_MyIdent;
dvander@601
   463
dvander@601
   464
	/* Dynamic native stuff */
dvander@601
   465
	List<FakeNative *> m_Natives;
dvander@601
   466
	Trie *m_pNativeLookup;
dvander@601
   467
dvander@174
   468
};
dvander@174
   469
dvander@211
   470
extern CPluginManager g_PluginSys;
dvander@174
   471
dvander@173
   472
#endif //_INCLUDE_SOURCEMOD_PLUGINSYSTEM_H_