1.1 --- a/sourcemm/IPluginManager.h Mon Feb 18 03:57:26 2008 +0000
1.2 +++ b/sourcemm/IPluginManager.h Mon Feb 18 23:11:25 2008 +0000
1.3 @@ -1,4 +1,4 @@
1.4 -/**
1.5 +/*
1.6 * vim: set ts=4 :
1.7 * ======================================================
1.8 * Metamod:Source
1.9 @@ -60,6 +60,9 @@
1.10 Pl_Running=0,
1.11 };
1.12
1.13 + /**
1.14 + * @brief Programmatic management of the "loaded plugin" list.
1.15 + */
1.16 class ISmmPluginManager
1.17 {
1.18 public:
1.19 @@ -68,51 +71,50 @@
1.20 * then the plugin is considered to be "hot" - it might refuse its own load later!
1.21 * Also, a hot plugin might not have an error message.
1.22 *
1.23 - * @param file String containing file name
1.24 - * @param source Specifies who loaded the plugin
1.25 - * @param status Status of the plugin
1.26 - * @param ismm Pointer to Smm API
1.27 - * @param error String buffer for error messages
1.28 - * @param maxlen Maximum length of buffer
1.29 - * @return Id of plugin
1.30 + * @param file String containing file name.
1.31 + * @param source Specifies who loaded the plugin.
1.32 + * @param already Whether or not the plugin was already loaded.
1.33 + * @param error String buffer for error messages.
1.34 + * @param maxlen Maximum length of buffer.
1.35 + * @return Id of plugin.
1.36 */
1.37 virtual PluginId Load(const char *file, PluginId source, bool &already, char *error, size_t maxlen) =0;
1.38
1.39 /**
1.40 - * @brief Unloads a plugin
1.41 + * @brief Unloads a plugin.
1.42 *
1.43 - * @param id Id of plugin
1.44 - * @param error String buffer for error messages
1.45 - * @param maxlen Maximum length of buffer
1.46 - * @return True on success, false otherwise
1.47 + * @param id Id of plugin
1.48 + * @param force True to forcefully unload, false to let plugin opt-out.
1.49 + * @param error String buffer for error messages
1.50 + * @param maxlen Maximum length of buffer
1.51 + * @return True on success, false otherwise
1.52 */
1.53 virtual bool Unload(PluginId id, bool force, char *error, size_t maxlen) =0;
1.54
1.55 /**
1.56 * @brief Pauses a plugin
1.57 *
1.58 - * @param id Id of plugin
1.59 - * @param error String buffer for error messages
1.60 - * @param maxlen Maximum length of buffer
1.61 - * @return True on success, false otherwise
1.62 + * @param id Id of plugin
1.63 + * @param error String buffer for error messages
1.64 + * @param maxlen Maximum length of buffer
1.65 + * @return True on success, false otherwise
1.66 */
1.67 virtual bool Pause(PluginId id, char *error, size_t maxlen) =0;
1.68
1.69 /**
1.70 * @brief Unpauses a plugin
1.71 *
1.72 - * @param id Id of plugin
1.73 - * @param force If true, forces the plugin to unload
1.74 - * @param error String buffer for error messages
1.75 - * @param maxlen Maximum length of buffer
1.76 - * @return True on success, false otherwise
1.77 + * @param id Id of plugin
1.78 + * @param error String buffer for error messages
1.79 + * @param maxlen Maximum length of buffer
1.80 + * @return True on success, false otherwise
1.81 */
1.82 virtual bool Unpause(PluginId id, char *error, size_t maxlen) =0;
1.83
1.84 /**
1.85 * @brief Unloads all plugins forcefully
1.86 *
1.87 - * @return True on success, false otherwise
1.88 + * @return True on success, false otherwise
1.89 */
1.90 virtual bool UnloadAll() =0;
1.91
1.92 @@ -132,7 +134,7 @@
1.93 *
1.94 * @param id Id of plugin
1.95 * @param error Message buffer
1.96 - * @param maxlen Size of error buffer
1.97 + * @param maxlength Size of error buffer
1.98 * @return Status value
1.99 */
1.100 virtual bool QueryRunning(PluginId id, char *error, size_t maxlength) =0;