public/mms_sample_ext/sm_ext.h
author Scott Ehlert <ds@alliedmods.net>
Fri Apr 11 17:16:36 2008 +0000 (2008-04-11)
changeset 1990 de135d1f05b1
parent 1952 b7aa2b626807
permissions -rw-r--r--
Added more missing svn:keywords properties to some files (this should be the last of them before I never have to do this again)
Moved sm_memtable files in sqlite extension to sdk directory (to be consistent with topmenus)
Some extension source files had an incorrect extension name in their headers
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod Extension Code for Metamod:Source
     5  * Copyright (C) 2004-2008 AlliedModders LLC.  All rights reserved.
     6  * =============================================================================
     7  *
     8  * This program is free software; you can redistribute it and/or modify it under
     9  * the terms of the GNU General Public License, version 3.0, as published by the
    10  * Free Software Foundation.
    11  * 
    12  * This program is distributed in the hope that it will be useful, but WITHOUT
    13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    14  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    15  * details.
    16  *
    17  * You should have received a copy of the GNU General Public License along with
    18  * this program.  If not, see <http://www.gnu.org/licenses/>.
    19  *
    20  * As a special exception, AlliedModders LLC gives you permission to link the
    21  * code of this program (as well as its derivative works) to "Half-Life 2," the
    22  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    23  * by the Valve Corporation.  You must obey the GNU General Public License in
    24  * all respects for all other code used.  Additionally, AlliedModders LLC grants
    25  * this exception to all derivative works.  AlliedModders LLC defines further
    26  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    27  * or <http://www.sourcemod.net/license.php>.
    28  *
    29  * Version: $Id$
    30  */
    31 
    32 #ifndef _INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_
    33 #define _INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_
    34 
    35 #include "sm_sdk_config.h"
    36 
    37 using namespace SourceMod;
    38 
    39 class MyExtension : public IExtensionInterface 
    40 {
    41 public:
    42 	virtual bool OnExtensionLoad(IExtension *me,
    43 		IShareSys *sys, 
    44 		char *error, 
    45 		size_t maxlength, 
    46 		bool late);
    47 	virtual void OnExtensionUnload();
    48 	virtual void OnExtensionsAllLoaded();
    49 	virtual void OnExtensionPauseChange(bool pause);
    50 	virtual bool QueryRunning(char *error, size_t maxlength);
    51 	virtual bool IsMetamodExtension();
    52 	virtual const char *GetExtensionName();
    53 	virtual const char *GetExtensionURL();
    54 	virtual const char *GetExtensionTag();
    55 	virtual const char *GetExtensionAuthor();
    56 	virtual const char *GetExtensionVerString();
    57 	virtual const char *GetExtensionDescription();
    58 	virtual const char *GetExtensionDateString();
    59 };
    60 
    61 bool SM_LoadExtension(char *error, size_t maxlength);
    62 void SM_UnloadExtension();
    63 
    64 extern IShareSys *sharesys;
    65 extern IExtension *myself;
    66 extern MyExtension g_SMExt;
    67 
    68 #endif //_INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_
    69