public/sample_ext/extension.h
changeset 757 b799caa9a190
parent 676 1ed65fdc194a
child 1226 478550a4d5ec
     1.1 --- a/public/sample_ext/extension.h	Tue May 08 22:26:30 2007 +0000
     1.2 +++ b/public/sample_ext/extension.h	Wed May 09 05:20:03 2007 +0000
     1.3 @@ -1,4 +1,26 @@
     1.4 -// vim: set ts=4 :
     1.5 +/**
     1.6 + * vim: set ts=4 :
     1.7 + * ===============================================================
     1.8 + * Sample SourceMod Extension
     1.9 + * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
    1.10 + * ===============================================================
    1.11 + *
    1.12 + * This program is free software; you can redistribute it and/or
    1.13 + * modify it under the terms of the GNU General Public License
    1.14 + * as published by the Free Software Foundation; either version 2
    1.15 + * of the License, or (at your option) any later version.
    1.16 + * This program is distributed in the hope that it will be useful,
    1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.19 + * GNU General Public License for more details.
    1.20 + * 
    1.21 + * You should have received a copy of the GNU General Public License
    1.22 + * along with this program; if not, write to the Free Software
    1.23 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    1.24 + *
    1.25 + * Version: $Id$
    1.26 + */
    1.27 +
    1.28  #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
    1.29  #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
    1.30  
    1.31 @@ -7,7 +29,6 @@
    1.32   * @brief Sample extension code header.
    1.33   */
    1.34  
    1.35 -
    1.36  #include "smsdk_ext.h"
    1.37  
    1.38  
    1.39 @@ -22,11 +43,11 @@
    1.40  	 * @brief This is called after the initial loading sequence has been processed.
    1.41  	 *
    1.42  	 * @param error		Error message buffer.
    1.43 -	 * @param err_max	Size of error message buffer.
    1.44 +	 * @param maxlength	Size of error message buffer.
    1.45  	 * @param late		Whether or not the module was loaded after map load.
    1.46  	 * @return			True to succeed loading, false to fail.
    1.47  	 */
    1.48 -	//virtual bool SDK_OnLoad(char *error, size_t err_max, bool late);
    1.49 +	//virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
    1.50  	
    1.51  	/**
    1.52  	 * @brief This is called right before the extension is unloaded.
    1.53 @@ -48,20 +69,43 @@
    1.54  	 * @brief this is called when Core wants to know if your extension is working.
    1.55  	 *
    1.56  	 * @param error		Error message buffer.
    1.57 -	 * @param err_max	Size of error message buffer.
    1.58 +	 * @param maxlength	Size of error message buffer.
    1.59  	 * @return			True if working, false otherwise.
    1.60  	 */
    1.61 -	//virtual void QueryRunning(char *error, size_t maxlength);
    1.62 +	//virtual bool QueryRunning(char *error, size_t maxlength);
    1.63  public:
    1.64  #if defined SMEXT_CONF_METAMOD
    1.65  	/**
    1.66 -	 * Read smext_base.h for documentation on these.
    1.67 +	 * @brief Called when Metamod is attached, before the extension version is called.
    1.68 +	 *
    1.69 +	 * @param error			Error buffer.
    1.70 +	 * @param maxlength		Maximum size of error buffer.
    1.71 +	 * @param late			Whether or not Metamod considers this a late load.
    1.72 +	 * @return				True to succeed, false to fail.
    1.73  	 */
    1.74 +	//virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
    1.75  
    1.76 -	//virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
    1.77 -	//virtual bool SDK_OnMetamodUnload(char *error, size_t err_max);
    1.78 -	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t err_max);
    1.79 +	/**
    1.80 +	 * @brief Called when Metamod is detaching, after the extension version is called.
    1.81 +	 * NOTE: By default this is blocked unless sent from SourceMod.
    1.82 +	 *
    1.83 +	 * @param error			Error buffer.
    1.84 +	 * @param maxlength		Maximum size of error buffer.
    1.85 +	 * @return				True to succeed, false to fail.
    1.86 +	 */
    1.87 +	//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
    1.88 +
    1.89 +	/**
    1.90 +	 * @brief Called when Metamod's pause state is changing.
    1.91 +	 * NOTE: By default this is blocked unless sent from SourceMod.
    1.92 +	 *
    1.93 +	 * @param paused		Pause state being set.
    1.94 +	 * @param error			Error buffer.
    1.95 +	 * @param maxlength		Maximum size of error buffer.
    1.96 +	 * @return				True to succeed, false to fail.
    1.97 +	 */
    1.98 +	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
    1.99  #endif
   1.100  };
   1.101  
   1.102 -#endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
   1.103 +#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_