- Interface dropping semantics are now changed, any pointer can be piped through.

- IDBDriver lets you bind driver dependencies and cleanly shutdown now

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402315
This commit is contained in:
David Anderson
2008-07-01 06:12:16 +00:00
parent 4106620928
commit 968045ae62
6 changed files with 47 additions and 7 deletions
+10 -1
View File
@@ -42,7 +42,7 @@
*/
#define SMINTERFACE_DBI_NAME "IDBI"
#define SMINTERFACE_DBI_VERSION 6
#define SMINTERFACE_DBI_VERSION 7
namespace SourceMod
{
@@ -867,7 +867,16 @@ namespace SourceMod
* @return True on success, false on failure.
*/
virtual bool AddToThreadQueue(IDBThreadOperation *op, PrioQueueLevel prio) =0;
/**
* @brief Adds a dependency from one extension to the owner of a driver.
*
* @param myself Extension that is using the IDBDriver.
* @param driver Driver that is being used.
*/
virtual void AddDependency(IExtension *myself, IDBDriver *driver) =0;
};
}
#endif //_INCLUDE_SOURCEMOD_INTERFACE_DBDRIVER_H_
+13 -4
View File
@@ -186,10 +186,16 @@ namespace SourceMod
* interface it's using. If it's not safe, return false, and the
* extension will be unloaded afterwards.
*
* NOTE: It is important to also hook NotifyInterfaceDrop() in order to clean up resources.
* NOTE: It is important to also hook NotifyInterfaceDrop() in order to clean
* up resources.
*
* @param pInterface Pointer to interface being dropped.
* @return True to continue, false to unload this extension afterwards.
* @param pInterface Pointer to interface being dropped. This
* pointer may be opaque, and it should not
* be queried using SMInterface functions unless
* it can be verified to match an existing
* pointer of known type.
* @return True to continue, false to unload this
* extension afterwards.
*/
virtual bool QueryInterfaceDrop(SMInterface *pInterface)
{
@@ -199,7 +205,10 @@ namespace SourceMod
/**
* @brief Notifies the extension that an external interface it uses is being removed.
*
* @param pInterface Pointer to interface being dropped.
* @param pInterface Pointer to interface being dropped. This
* pointer may be opaque, and it should not
* be queried using SMInterface functions unless
* it can be verified to match an existing
*/
virtual void NotifyInterfaceDrop(SMInterface *pInterface)
{