#include <public/IDBDriver.h>
Inherits SourceMod::SMInterface.
Inheritance diagram for SourceMod::IDBManager:
Public Member Functions | |
| virtual const char * | GetInterfaceName ()=0 |
| Must return a string defining the interface's unique name. | |
| virtual unsigned int | GetInterfaceVersion ()=0 |
| Must return an integer defining the interface's version. | |
| virtual void | AddDriver (IDBDriver *pDriver)=0 |
| Adds a driver to the DBI system. Not thread safe. | |
| virtual void | RemoveDriver (IDBDriver *pDriver)=0 |
| Removes a driver from the DBI system. Not thread safe. | |
| virtual const DatabaseInfo * | FindDatabaseConf (const char *name)=0 |
| Searches for database info by name. Both the return pointer and all pointers contained therein should be considered volatile. | |
| virtual bool | Connect (const char *name, IDBDriver **pdr, IDatabase **pdb, bool persistent, char *error, size_t maxlength)=0 |
| Tries to connect to a named database. Not thread safe. | |
| virtual unsigned int | GetDriverCount ()=0 |
| Returns the number of drivers loaded. Not thread safe. | |
| virtual IDBDriver * | GetDriver (unsigned int index)=0 |
| Returns a driver by index. Not thread safe. | |
| virtual Handle_t | CreateHandle (DBHandleType type, void *ptr, IdentityToken_t *pToken)=0 |
| Creates a Handle_t of the IDBDriver type. Not thread safe. | |
| virtual HandleError | ReadHandle (Handle_t hndl, DBHandleType type, void **ptr)=0 |
| Reads an IDBDriver pointer from an IDBDriver handle. Not thread safe. | |
| virtual HandleError | ReleaseHandle (Handle_t hndl, DBHandleType type, IdentityToken_t *token)=0 |
| Releases an IDBDriver handle. | |
| virtual IDBDriver * | FindOrLoadDriver (const char *driver)=0 |
| Given a driver name, attempts to find it. If it is not found, SourceMod will attempt to load it. This function is not thread safe. | |
| virtual IDBDriver * | GetDefaultDriver ()=0 |
| Returns the default driver, or NULL if none is set. This function is not thread safe. | |
| virtual bool | AddToThreadQueue (IDBThreadOperation *op, PrioQueueLevel prio)=0 |
| Adds a threaded database operation to the priority queue. This function is not thread safe. | |
| virtual void | AddDependency (IExtension *myself, IDBDriver *driver)=0 |
| Adds a dependency from one extension to the owner of a driver. | |
Definition at line 747 of file IDBDriver.h.
| virtual void SourceMod::IDBManager::AddDriver | ( | IDBDriver * | pDriver | ) | [pure virtual] |
Adds a driver to the DBI system. Not thread safe.
| pDriver | Database driver. |
| virtual void SourceMod::IDBManager::RemoveDriver | ( | IDBDriver * | pDriver | ) | [pure virtual] |
Removes a driver from the DBI system. Not thread safe.
| pDriver | Database driver. |
| virtual const DatabaseInfo* SourceMod::IDBManager::FindDatabaseConf | ( | const char * | name | ) | [pure virtual] |
Searches for database info by name. Both the return pointer and all pointers contained therein should be considered volatile.
| name | Named database info. |
| virtual bool SourceMod::IDBManager::Connect | ( | const char * | name, | |
| IDBDriver ** | pdr, | |||
| IDatabase ** | pdb, | |||
| bool | persistent, | |||
| char * | error, | |||
| size_t | maxlength | |||
| ) | [pure virtual] |
Tries to connect to a named database. Not thread safe.
| name | Named database info. | |
| pdr | Pointer to store the IDBDriver pointer in. If driver is not found, NULL will be stored. | |
| pdb | Pointer to store the IDatabase pointer in. If connection fails, NULL will be stored. | |
| persistent | If true, the dbmanager will attempt to PConnect instead of connect. | |
| error | Error buffer to store a driver's error message. | |
| maxlength | Maximum length of the error buffer. |
| virtual unsigned int SourceMod::IDBManager::GetDriverCount | ( | ) | [pure virtual] |
Returns the number of drivers loaded. Not thread safe.
| virtual IDBDriver* SourceMod::IDBManager::GetDriver | ( | unsigned int | index | ) | [pure virtual] |
Returns a driver by index. Not thread safe.
| index | Driver index, starting from 0. |
| virtual Handle_t SourceMod::IDBManager::CreateHandle | ( | DBHandleType | type, | |
| void * | ptr, | |||
| IdentityToken_t * | pToken | |||
| ) | [pure virtual] |
Creates a Handle_t of the IDBDriver type. Not thread safe.
| type | A DBHandleType value. | |
| ptr | A pointer corrresponding to a DBHandleType object. | |
| pToken | Identity pointer of the owning identity. |
| virtual HandleError SourceMod::IDBManager::ReadHandle | ( | Handle_t | hndl, | |
| DBHandleType | type, | |||
| void ** | ptr | |||
| ) | [pure virtual] |
| virtual HandleError SourceMod::IDBManager::ReleaseHandle | ( | Handle_t | hndl, | |
| DBHandleType | type, | |||
| IdentityToken_t * | token | |||
| ) | [pure virtual] |
Releases an IDBDriver handle.
| hndl | Handle_t handle to release. | |
| type | A DBHandleType value. | |
| token | Identity pointer of the owning identity. |
| virtual IDBDriver* SourceMod::IDBManager::FindOrLoadDriver | ( | const char * | driver | ) | [pure virtual] |
| virtual IDBDriver* SourceMod::IDBManager::GetDefaultDriver | ( | ) | [pure virtual] |
Returns the default driver, or NULL if none is set. This function is not thread safe.
| virtual bool SourceMod::IDBManager::AddToThreadQueue | ( | IDBThreadOperation * | op, | |
| PrioQueueLevel | prio | |||
| ) | [pure virtual] |
Adds a threaded database operation to the priority queue. This function is not thread safe.
| op | Instance of an IDBThreadOperation. | |
| prio | Priority level to run at. |
| virtual void SourceMod::IDBManager::AddDependency | ( | IExtension * | myself, | |
| IDBDriver * | driver | |||
| ) | [pure virtual] |
Adds a dependency from one extension to the owner of a driver.
| myself | Extension that is using the IDBDriver. | |
| driver | Driver that is being used. |
1.5.1