1.1 --- a/public/IPluginSys.h Thu Jan 25 22:39:12 2007 +0000
1.2 +++ b/public/IPluginSys.h Fri Jan 26 01:55:06 2007 +0000
1.3 @@ -1,12 +1,32 @@
1.4 +/**
1.5 + * ===============================================================
1.6 + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.7 + * ===============================================================
1.8 + *
1.9 + * This file is part of the SourceMod/SourcePawn SDK. This file may only be used
1.10 + * or modified under the Terms and Conditions of its License Agreement, which is found
1.11 + * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
1.12 + * may change at any time. To view the latest information, see:
1.13 + * http://www.sourcemod.net/license.php
1.14 + *
1.15 + * Version: $Id$
1.16 + */
1.17 +
1.18 #ifndef _INCLUDE_SOURCEMOD_PLUGINMNGR_INTERFACE_H_
1.19 #define _INCLUDE_SOURCEMOD_PLUGINMNGR_INTERFACE_H_
1.20
1.21 +/**
1.22 + * @file IPluginSys.h
1.23 + * @brief Defines the interface for the Plugin System, which manages loaded plugins.
1.24 + */
1.25 +
1.26 #include <IShareSys.h>
1.27 #include <sp_vm_api.h>
1.28
1.29 #define SMINTERFACE_PLUGINSYSTEM_NAME "IPluginManager"
1.30 #define SMINTERFACE_PLUGINSYSTEM_VERSION 1
1.31
1.32 +/** Context user slot 3 is used Core for holding an IPluginContext pointer. */
1.33 #define SM_CONTEXTVAR_USER 3
1.34
1.35 namespace SourceMod
1.36 @@ -14,35 +34,33 @@
1.37 class IPlugin;
1.38
1.39 /**
1.40 - * @brief Encapsulates plugin public information.
1.41 + * @brief Encapsulates plugin public information exposed through "myinfo."
1.42 */
1.43 typedef struct sm_plugininfo_s
1.44 {
1.45 - const char *name;
1.46 - const char *author;
1.47 - const char *description;
1.48 - const char *version;
1.49 - const char *url;
1.50 + const char *name; /**< Plugin name */
1.51 + const char *author; /**< Plugin author */
1.52 + const char *description; /**< Plugin description */
1.53 + const char *version; /**< Plugin version string */
1.54 + const char *url; /**< Plugin URL */
1.55 } sm_plugininfo_t;
1.56
1.57
1.58 /**
1.59 * @brief Describes the usability status of a plugin.
1.60 - * Note: The status "Loaded" and "Created" are only reachable
1.61 - * during map load.
1.62 */
1.63 enum PluginStatus
1.64 {
1.65 - Plugin_Running=0, /* Plugin is running */
1.66 + Plugin_Running=0, /**< Plugin is running */
1.67 /* All states below are unexecutable */
1.68 - Plugin_Paused, /* Plugin is loaded but paused */
1.69 - Plugin_Error, /* Plugin is loaded but errored/locked */
1.70 + Plugin_Paused, /**< Plugin is loaded but paused */
1.71 + Plugin_Error, /**< Plugin is loaded but errored/locked */
1.72 /* All states below do not have all natives */
1.73 - Plugin_Loaded, /* Plugin has passed loading and can be finalized */
1.74 - Plugin_Failed, /* Plugin has a fatal failure */
1.75 - Plugin_Created, /* Plugin is created but not initialized */
1.76 - Plugin_Uncompiled, /* Plugin is not yet compiled by the JIT */
1.77 - Plugin_BadLoad, /* Plugin failed to load */
1.78 + Plugin_Loaded, /**< Plugin has passed loading and can be finalized */
1.79 + Plugin_Failed, /**< Plugin has a fatal failure */
1.80 + Plugin_Created, /**< Plugin is created but not initialized */
1.81 + Plugin_Uncompiled, /**< Plugin is not yet compiled by the JIT */
1.82 + Plugin_BadLoad, /**< Plugin failed to load */
1.83 };
1.84
1.85
1.86 @@ -51,10 +69,10 @@
1.87 */
1.88 enum PluginType
1.89 {
1.90 - PluginType_Private, /* Plugin is privately managed and receives no forwards */
1.91 - PluginType_MapUpdated, /* Plugin will never be unloaded unless for updates on mapchange */
1.92 - PluginType_MapOnly, /* Plugin will be removed at mapchange */
1.93 - PluginType_Global, /* Plugin will never be unloaded or updated */
1.94 + PluginType_Private, /**< Plugin is privately managed and receives no forwards */
1.95 + PluginType_MapUpdated, /**< Plugin will never be unloaded unless for updates on mapchange */
1.96 + PluginType_MapOnly, /**< Plugin will be removed at mapchange */
1.97 + PluginType_Global, /**< Plugin will never be unloaded or updated */
1.98 };
1.99
1.100 /**
1.101 @@ -63,6 +81,7 @@
1.102 class IPlugin
1.103 {
1.104 public:
1.105 + /** Virtual destructor */
1.106 virtual ~IPlugin()
1.107 {
1.108 }
1.109 @@ -140,6 +159,7 @@
1.110 class IPluginIterator
1.111 {
1.112 public:
1.113 + /** Virtual destructor */
1.114 virtual ~IPluginIterator()
1.115 {
1.116 };