ds@1952: /** ds@1952: * vim: set ts=4 : ds@1952: * ============================================================================= ds@1952: * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved. ds@1952: * ============================================================================= ds@1952: * ds@1952: * This file is part of the SourceMod/SourcePawn SDK. ds@1952: * ds@1952: * This program is free software; you can redistribute it and/or modify it under ds@1952: * the terms of the GNU General Public License, version 3.0, as published by the ds@1952: * Free Software Foundation. ds@1952: * ds@1952: * This program is distributed in the hope that it will be useful, but WITHOUT ds@1952: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ds@1952: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ds@1952: * details. ds@1952: * ds@1952: * You should have received a copy of the GNU General Public License along with ds@1952: * this program. If not, see . ds@1952: * ds@1952: * As a special exception, AlliedModders LLC gives you permission to link the ds@1952: * code of this program (as well as its derivative works) to "Half-Life 2," the ds@1952: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software ds@1952: * by the Valve Corporation. You must obey the GNU General Public License in ds@1952: * all respects for all other code used. Additionally, AlliedModders LLC grants ds@1952: * this exception to all derivative works. AlliedModders LLC defines further ds@1952: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), ds@1952: * or . ds@1952: * ds@1952: * Version: $Id$ ds@1952: */ ds@1952: ds@1952: #if defined _core_included ds@1952: #endinput ds@1952: #endif ds@1952: #define _core_included ds@1952: ds@1952: #include ds@1952: dvander@2105: #define SOURCEMOD_PLUGINAPI_VERSION 3 ds@1952: struct PlVers ds@1952: { ds@1952: version, ds@1952: String:filevers[], dvander@2105: String:date[], dvander@2105: String:time[] ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Function helper values. ds@1952: */ ds@1952: enum Function ds@1952: { ds@1952: INVALID_FUNCTION = -1, ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Specifies what to do after a hook completes. ds@1952: */ ds@1952: enum Action ds@1952: { ds@1952: Plugin_Continue = 0, /**< Continue with the original action */ ds@1952: Plugin_Changed = 1, /**< Inputs or outputs have been overridden with new values */ ds@1952: Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */ ds@1952: Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */ ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Specifies identity types. ds@1952: */ ds@1952: enum Identity ds@1952: { ds@1952: Identity_Core = 0, ds@1952: Identity_Extension = 1, ds@1952: Identity_Plugin = 2 ds@1952: }; ds@1952: ds@1952: public PlVers:__version = ds@1952: { ds@1952: version = SOURCEMOD_PLUGINAPI_VERSION, dvander@2105: filevers = SOURCEMOD_VERSION, dvander@2105: date = __DATE__, dvander@2105: time = __TIME__ ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Plugin status values. ds@1952: */ ds@1952: enum PluginStatus ds@1952: { ds@1952: Plugin_Running=0, /**< Plugin is running */ ds@1952: /* All states below are "temporarily" unexecutable */ ds@1952: Plugin_Paused, /**< Plugin is loaded but paused */ ds@1952: Plugin_Error, /**< Plugin is loaded but errored/locked */ ds@1952: /* All states below do not have all natives */ ds@1952: Plugin_Loaded, /**< Plugin has passed loading and can be finalized */ ds@1952: Plugin_Failed, /**< Plugin has a fatal failure */ ds@1952: Plugin_Created, /**< Plugin is created but not initialized */ ds@1952: Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */ ds@1952: Plugin_BadLoad, /**< Plugin failed to load */ ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Plugin information properties. ds@1952: */ ds@1952: enum PluginInfo ds@1952: { ds@1952: PlInfo_Name, /**< Plugin name */ ds@1952: PlInfo_Author, /**< Plugin author */ ds@1952: PlInfo_Description, /**< Plugin description */ ds@1952: PlInfo_Version, /**< Plugin verison */ ds@1952: PlInfo_URL, /**< Plugin URL */ ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Defines how an extension must expose itself for autoloading. ds@1952: */ ds@1952: struct Extension ds@1952: { ds@1952: const String:name[], /**< Short name */ ds@1952: const String:file[], /**< Default file name */ ds@1952: bool:autoload, /**< Whether or not to auto-load */ ds@1952: bool:required, /**< Whether or not to require */ ds@1952: }; ds@1952: ds@1952: /** ds@1952: * Defines how a plugin must expose itself for native requiring. ds@1952: */ ds@1952: struct SharedPlugin ds@1952: { ds@1952: const String:name[], /**< Short name */ ds@1952: const String:file[], /**< File name */ ds@1952: bool:required, /**< Whether or not to require */ ds@1952: }; ds@1952: ds@1952: public Float:NULL_VECTOR[3]; /**< Pass this into certain functions to act as a C++ NULL */ ds@1952: public const String:NULL_STRING[1]; /**< pass this into certain functions to act as a C++ NULL */ ds@1952: ds@1952: #define AUTOLOAD_EXTENSIONS ds@1952: #define REQUIRE_EXTENSIONS ds@1952: #define REQUIRE_PLUGIN