2007-01-26 03:07:24 +01:00
|
|
|
/**
|
2007-02-12 10:00:55 +01:00
|
|
|
* vim: set ts=4 :
|
2007-01-26 03:07:24 +01:00
|
|
|
* ===============================================================
|
|
|
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
|
|
|
* ===============================================================
|
|
|
|
*
|
|
|
|
* This file is part of the SourceMod/SourcePawn SDK. This file may only be used
|
|
|
|
* or modified under the Terms and Conditions of its License Agreement, which is found
|
|
|
|
* in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
|
|
|
|
* may change at any time. To view the latest information, see:
|
|
|
|
* http://www.sourcemod.net/license.php
|
|
|
|
*
|
|
|
|
* Version: $Id$
|
|
|
|
*/
|
|
|
|
|
2007-01-16 20:41:21 +01:00
|
|
|
#if defined _core_included
|
|
|
|
#endinput
|
|
|
|
#endif
|
|
|
|
#define _core_included
|
|
|
|
|
2007-03-03 09:51:47 +01:00
|
|
|
#include <version>
|
|
|
|
|
|
|
|
#define SOURCEMOD_PLUGINAPI_VERSION 2
|
2007-01-16 20:41:21 +01:00
|
|
|
struct PlVers
|
|
|
|
{
|
|
|
|
version,
|
2007-03-03 09:51:47 +01:00
|
|
|
String:filevers[],
|
2007-01-16 20:41:21 +01:00
|
|
|
};
|
|
|
|
|
2007-03-16 07:54:24 +01:00
|
|
|
/**
|
|
|
|
* Function helper values
|
|
|
|
*/
|
|
|
|
enum Function
|
|
|
|
{
|
|
|
|
INVALID_FUNCTION = -1,
|
|
|
|
};
|
|
|
|
|
2007-02-13 07:26:01 +01:00
|
|
|
/**
|
|
|
|
* Specifies what to do after a hook completes.
|
|
|
|
*/
|
2007-02-15 23:16:19 +01:00
|
|
|
enum Action
|
2007-02-13 07:26:01 +01:00
|
|
|
{
|
|
|
|
Plugin_Continue = 0, /**< Continue with the original action */
|
|
|
|
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
|
|
|
|
Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */
|
|
|
|
}
|
|
|
|
|
2007-01-16 20:41:21 +01:00
|
|
|
public PlVers:__version =
|
|
|
|
{
|
|
|
|
version = SOURCEMOD_PLUGINAPI_VERSION,
|
2007-03-03 09:51:47 +01:00
|
|
|
filevers = SOURCEMOD_VERSION
|
2007-01-16 20:41:21 +01:00
|
|
|
};
|
|
|
|
|
2007-03-15 21:10:25 +01:00
|
|
|
/**
|
|
|
|
* Plugin status values.
|
|
|
|
*/
|
|
|
|
enum PluginStatus
|
|
|
|
{
|
|
|
|
Plugin_Running=0, /**< Plugin is running */
|
|
|
|
/* All states below are "temporarily" unexecutable */
|
|
|
|
Plugin_Paused, /**< Plugin is loaded but paused */
|
|
|
|
Plugin_Error, /**< Plugin is loaded but errored/locked */
|
|
|
|
/* All states below do not have all natives */
|
|
|
|
Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
|
|
|
|
Plugin_Failed, /**< Plugin has a fatal failure */
|
|
|
|
Plugin_Created, /**< Plugin is created but not initialized */
|
|
|
|
Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
|
|
|
|
Plugin_BadLoad, /**< Plugin failed to load */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Plugin information properties.
|
|
|
|
*/
|
|
|
|
enum PluginInfo
|
|
|
|
{
|
|
|
|
PlInfo_Name, /**< Plugin name */
|
|
|
|
PlInfo_Author, /**< Plugin author */
|
|
|
|
PlInfo_Description, /**< Plugin description */
|
|
|
|
PlInfo_Version, /**< Plugin verison */
|
|
|
|
PlInfo_URL, /**< Plugin URL */
|
|
|
|
};
|
|
|
|
|
2007-03-15 21:44:23 +01:00
|
|
|
/**
|
|
|
|
* Defines how an extension must expose itself for autoloading.
|
|
|
|
*/
|
2007-01-16 20:41:21 +01:00
|
|
|
struct Extension
|
|
|
|
{
|
|
|
|
const String:name[], /* Short name */
|
|
|
|
const String:file[], /* Default file name */
|
|
|
|
bool:autoload, /* Whether or not to auto-load */
|
|
|
|
bool:required, /* Whether or not to require */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define AUTOLOAD_EXTENSIONS
|
|
|
|
#define REQUIRE_EXTENSIONS
|