From e9204c0bf4988997784a8549b77fde5c6869dc7b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 6 Feb 2007 19:00:58 +0000 Subject: [PATCH] added interface spec for data packs --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40446 --- core/msvc8/sourcemod_mm.vcproj | 4 ++++ public/ISourceMod.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/core/msvc8/sourcemod_mm.vcproj b/core/msvc8/sourcemod_mm.vcproj index 0332881a..02e152f4 100644 --- a/core/msvc8/sourcemod_mm.vcproj +++ b/core/msvc8/sourcemod_mm.vcproj @@ -341,6 +341,10 @@ RelativePath="..\..\public\IAdminSystem.h" > + + diff --git a/public/ISourceMod.h b/public/ISourceMod.h index ca44945c..4c3b4116 100644 --- a/public/ISourceMod.h +++ b/public/ISourceMod.h @@ -116,6 +116,35 @@ namespace SourceMod SourcePawn::IPluginContext *pContext, const cell_t *params, unsigned int param) =0; + +#if 0 + /** + * @brief Creates a data pack object. + * + * @return A new IDataPack object. + */ + virtual IDataPack *CreateDataPack() =0; + + /** + * @brief Releases a data pack's resources so it can be re-used. + * + * @param pack An IDataPack object to release. + */ + virtual void FreeDataPack(IDataPack *pack) =0; + + /** + * @brief Returns the automated data pack handle type. + * + * The readonly data type is the parent of the writable type. + * Note that calling CloseHandle() on either type will release the data pack. + * The readonly type is inheritable, but due to limitations of the Handle System, + * the writable type is not. + * + * @param readonly If true, the readonly type will be returned. + * @return The Handle type for storing generic data packs. + */ + virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0; +#endif }; }