#include <public/IHandleSys.h>
Inherits SourceMod::SMInterface.
Inheritance diagram for SourceMod::IHandleSys:
Public Member Functions | |
| virtual unsigned int | GetInterfaceVersion () |
| Must return an integer defining the interface's version. | |
| virtual const char * | GetInterfaceName () |
| Must return a string defining the interface's unique name. | |
| virtual HandleType_t | CreateType (const char *name, IHandleTypeDispatch *dispatch, HandleType_t parent, const TypeAccess *typeAccess, const HandleAccess *hndlAccess, IdentityToken_t *ident, HandleError *err)=0 |
| Creates a new Handle type. NOTE: Currently, a child type may not have its own children. NOTE: Handle names must be unique if not private. | |
| virtual bool | RemoveType (HandleType_t type, IdentityToken_t *ident)=0 |
| Removes a handle type. NOTE: This removes all child types. | |
| virtual bool | FindHandleType (const char *name, HandleType_t *type)=0 |
| Finds a handle type by name. | |
| virtual Handle_t | CreateHandle (HandleType_t type, void *object, IdentityToken_t *owner, IdentityToken_t *ident, HandleError *err)=0 |
| Creates a new handle. | |
| virtual HandleError | FreeHandle (Handle_t handle, const HandleSecurity *pSecurity)=0 |
| Frees the memory associated with a handle and calls any destructors. NOTE: This function will decrement the internal reference counter. It will only perform any further action if the counter hits 0. | |
| virtual HandleError | CloneHandle (Handle_t handle, Handle_t *newhandle, IdentityToken_t *newOwner, const HandleSecurity *pSecurity)=0 |
| Clones a handle by adding to its internal reference count. Its data, type, and security permissions remain the same. | |
| virtual HandleError | ReadHandle (Handle_t handle, HandleType_t type, const HandleSecurity *pSecurity, void **object)=0 |
| Retrieves the contents of a handle. | |
| virtual bool | InitAccessDefaults (TypeAccess *pTypeAccess, HandleAccess *pHandleAccess)=0 |
| Sets access permissions on one or more structures. | |
| virtual Handle_t | CreateHandleEx (HandleType_t type, void *object, const HandleSecurity *pSec, const HandleAccess *pAccess, HandleError *err)=0 |
| Creates a new handle. | |
Definition at line 222 of file IHandleSys.h.
| virtual HandleType_t SourceMod::IHandleSys::CreateType | ( | const char * | name, | |
| IHandleTypeDispatch * | dispatch, | |||
| HandleType_t | parent, | |||
| const TypeAccess * | typeAccess, | |||
| const HandleAccess * | hndlAccess, | |||
| IdentityToken_t * | ident, | |||
| HandleError * | err | |||
| ) | [pure virtual] |
Creates a new Handle type. NOTE: Currently, a child type may not have its own children. NOTE: Handle names must be unique if not private.
| name | Name of handle type (NULL or "" to be anonymous) | |
| dispatch | Pointer to a valid IHandleTypeDispatch object. | |
| parent | Parent handle to inherit from, 0 for none. | |
| typeAccess | Pointer to a TypeAccess object, NULL to use default or inherited permissions. Pointer can be temporary. | |
| hndlAccess | Pointer to a HandleAccess object to define default default permissions on each Handle. NULL to use default permissions. | |
| ident | Security token for any permissions. If typeAccess is NULL, this becomes the owning identity. | |
| err | Optional pointer to store an error code on failure (undefined on success). |
| virtual bool SourceMod::IHandleSys::RemoveType | ( | HandleType_t | type, | |
| IdentityToken_t * | ident | |||
| ) | [pure virtual] |
Removes a handle type. NOTE: This removes all child types.
| type | Type chain to remove. | |
| ident | Identity token. Removal fails if the token does not match. |
| virtual bool SourceMod::IHandleSys::FindHandleType | ( | const char * | name, | |
| HandleType_t * | type | |||
| ) | [pure virtual] |
Finds a handle type by name.
| name | Name of handle type to find (anonymous not allowed). | |
| type | Address to store found handle in (if not found, undefined). |
| virtual Handle_t SourceMod::IHandleSys::CreateHandle | ( | HandleType_t | type, | |
| void * | object, | |||
| IdentityToken_t * | owner, | |||
| IdentityToken_t * | ident, | |||
| HandleError * | err | |||
| ) | [pure virtual] |
Creates a new handle.
| type | Type to use on the handle. | |
| object | Object to bind to the handle. | |
| owner | Owner of the new Handle (may be NULL). | |
| ident | Identity for type access if needed (may be NULL). | |
| err | Optional pointer to store an error code on failure (undefined on success). |
| virtual HandleError SourceMod::IHandleSys::FreeHandle | ( | Handle_t | handle, | |
| const HandleSecurity * | pSecurity | |||
| ) | [pure virtual] |
Frees the memory associated with a handle and calls any destructors. NOTE: This function will decrement the internal reference counter. It will only perform any further action if the counter hits 0.
| handle | Handle_t identifier to destroy. | |
| pSecurity | Security information struct (may be NULL). |
| virtual HandleError SourceMod::IHandleSys::CloneHandle | ( | Handle_t | handle, | |
| Handle_t * | newhandle, | |||
| IdentityToken_t * | newOwner, | |||
| const HandleSecurity * | pSecurity | |||
| ) | [pure virtual] |
Clones a handle by adding to its internal reference count. Its data, type, and security permissions remain the same.
| handle | Handle to duplicate. Any non-free handle target is valid. | |
| newhandle | Stores the duplicated handle in the pointer (must not be NULL). | |
| newOwner | New owner of cloned handle. | |
| pSecurity | Security information struct (may be NULL). |
| virtual HandleError SourceMod::IHandleSys::ReadHandle | ( | Handle_t | handle, | |
| HandleType_t | type, | |||
| const HandleSecurity * | pSecurity, | |||
| void ** | object | |||
| ) | [pure virtual] |
Retrieves the contents of a handle.
| handle | Handle_t from which to retrieve contents. | |
| type | Expected type to read as. 0 ignores typing rules. | |
| pSecurity | Security information struct (may be NULL). | |
| object | Optional address to store object in. |
| virtual bool SourceMod::IHandleSys::InitAccessDefaults | ( | TypeAccess * | pTypeAccess, | |
| HandleAccess * | pHandleAccess | |||
| ) | [pure virtual] |
Sets access permissions on one or more structures.
| pTypeAccess | Optional TypeAccess buffer to initialize with the default values. | |
| pHandleAccess | Optional HandleAccess buffer to initialize with the default values. |
| virtual Handle_t SourceMod::IHandleSys::CreateHandleEx | ( | HandleType_t | type, | |
| void * | object, | |||
| const HandleSecurity * | pSec, | |||
| const HandleAccess * | pAccess, | |||
| HandleError * | err | |||
| ) | [pure virtual] |
Creates a new handle.
| type | Type to use on the handle. | |
| object | Object to bind to the handle. | |
| pSec | Security pointer; pOwner is written as the owner, pIdent is used as the parent identity for authorization. | |
| pAccess | Access right descriptor for the Handle; NULL for type defaults. | |
| err | Optional pointer to store an error code on failure (undefined on success). |
1.5.1