sourcepawn/include/sp_vm_api.h
changeset 262 de0e374ffa47
parent 256 5c8f45e980ed
child 263 df79012ba265
     1.1 --- a/sourcepawn/include/sp_vm_api.h	Tue Jan 02 02:59:49 2007 +0000
     1.2 +++ b/sourcepawn/include/sp_vm_api.h	Thu Jan 04 02:08:27 2007 +0000
     1.3 @@ -6,6 +6,13 @@
     1.4  
     1.5  #define SOURCEPAWN_VM_API_VERSION		1
     1.6  
     1.7 +#if defined SOURCEMOD_BUILD
     1.8 +namespace SourceMod
     1.9 +{
    1.10 +	struct IdentityToken_t;
    1.11 +};
    1.12 +#endif
    1.13 +
    1.14  namespace SourcePawn
    1.15  {
    1.16  	class IVirtualMachine;
    1.17 @@ -331,6 +338,16 @@
    1.18  		 * @return			0 for convenience.
    1.19  		 */
    1.20  		virtual cell_t ThrowNativeError(const char *msg, ...) =0;
    1.21 +
    1.22 +#if defined SOURCEMOD_BUILD
    1.23 +		/**
    1.24 +		 * @brief Returns the identity token for this context.
    1.25 +		 * Note: This is a helper function for native calls and the Handle System.
    1.26 +		 *
    1.27 +		 * @return			Identity token.
    1.28 +		 */
    1.29 +		virtual SourceMod::IdentityToken_t *GetIdentity() =0;
    1.30 +#endif
    1.31  	};
    1.32  
    1.33  
    1.34 @@ -449,21 +466,6 @@
    1.35  		virtual int FreeFromMemory(sp_plugin_t *plugin) =0;
    1.36  
    1.37  		/**
    1.38 -		 * @brief Creates a new IContext from a context handle.
    1.39 -		 *
    1.40 -		 * @param ctx		Context to use as a basis for the IPluginContext.
    1.41 -		 * @return			New IPluginContext handle.
    1.42 -		 */
    1.43 -		virtual IPluginContext *CreateBaseContext(sp_context_t *ctx) =0;
    1.44 -
    1.45 -		/** 
    1.46 -		 * @brief Frees a base context.  Does not free the sp_context_t it holds.
    1.47 -		 *
    1.48 -		 * @param ctx		Context pointer to free.
    1.49 -		 */
    1.50 -		virtual void FreeBaseContext(IPluginContext *ctx) =0;
    1.51 -
    1.52 -		/**
    1.53  		 * @brief Allocates large blocks of temporary memory.
    1.54  		 * 
    1.55  		 * @param size		Size of memory to allocate.