fixed inheritance not being used in the base menu style when removing clients from the watch list
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_DATABASE_MANAGER_H_
16 #define _INCLUDE_DATABASE_MANAGER_H_
18 #include <IDBDriver.h>
19 #include "sm_globals.h"
20 #include <sh_vector.h>
21 #include <sh_string.h>
23 #include <ITextParsers.h>
24 #include "sm_memtable.h"
26 using namespace SourceHook;
30 ConfDbInfo() : name(-1), driver(-1), host(-1), user(-1), pass(-1),
31 database(-1), realDriver(NULL)
40 IDBDriver *realDriver;
47 public IHandleTypeDispatch,
48 public ITextListener_SMC
53 const char *GetInterfaceName();
54 unsigned int GetInterfaceVersion();
55 public: //SMGlobalClass
56 void OnSourceModAllInitialized();
57 void OnSourceModLevelChange(const char *mapName);
58 void OnSourceModShutdown();
59 public: //IHandleTypeDispatch
60 void OnHandleDestroy(HandleType_t type, void *object);
62 void AddDriver(IDBDriver *pDrivera);
63 void RemoveDriver(IDBDriver *pDriver);
64 const DatabaseInfo *FindDatabaseConf(const char *name);
65 bool Connect(const char *name, IDBDriver **pdr, IDatabase **pdb, bool persistent, char *error, size_t maxlength);
66 unsigned int GetDriverCount();
67 IDBDriver *GetDriver(unsigned int index);
68 Handle_t CreateHandle(DBHandleType type, void *ptr, IdentityToken_t *pToken);
69 HandleError ReadHandle(Handle_t hndl, DBHandleType type, void **ptr);
70 HandleError ReleaseHandle(Handle_t hndl, DBHandleType type, IdentityToken_t *token);
71 public: //ITextListener_SMC
72 void ReadSMC_ParseStart();
73 SMCParseResult ReadSMC_NewSection(const char *name, bool opt_quotes);
74 SMCParseResult ReadSMC_KeyValue(const char *key, const char *value, bool key_quotes, bool value_quotes);
75 SMCParseResult ReadSMC_LeavingSection();
76 void ReadSMC_ParseEnd(bool halted, bool failed);
78 ConfDbInfo *GetDatabaseConf(const char *name);
79 IDBDriver *FindOrLoadDriver(const char *name);
80 IDBDriver *GetDefaultDriver();
82 CVector<IDBDriver *> m_drivers;
83 List<ConfDbInfo> m_confs;
84 HandleType_t m_DriverType;
85 HandleType_t m_DatabaseType;
87 BaseStringTable m_StrTab;
88 char m_Filename[PLATFORM_MAX_PATH];
89 unsigned int m_ParseLevel;
90 unsigned int m_ParseState;
91 IDBDriver *m_pDefault;
94 extern DBManager g_DBMan;
96 #endif //_INCLUDE_DATABASE_MANAGER_H_