Update CS:GO team score gamedata.
2 * vim: set ts=4 sw=4 tw=99 noet:
3 * =============================================================================
4 * SourceMod Client Preferences Extension
5 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
33 #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
37 #include "smsdk_ext.h"
40 #include <am-thread-utils.h>
41 #include <am-refcounting.h>
43 char * UTIL_strncpy(char * destination, const char * source, size_t num);
55 #define MAX_TRANSLATE_PARAMS 32
60 * @brief Sample implementation of the SDK Extension.
61 * Note: Uncomment one of the pre-defined virtual functions in order to use it.
63 class ClientPrefs : public SDKExtension
69 * @brief This is called after the initial loading sequence has been processed.
71 * @param error Error message buffer.
72 * @param maxlength Size of error message buffer.
73 * @param late Whether or not the module was loaded after map load.
74 * @return True to succeed loading, false to fail.
76 virtual bool SDK_OnLoad(char *error, size_t maxlength, bool late);
78 virtual void SDK_OnDependenciesDropped();
81 * @brief This is called once all known extensions have been loaded.
82 * Note: It is is a good idea to add natives here, if any are provided.
84 virtual void SDK_OnAllLoaded();
86 virtual bool QueryInterfaceDrop(SMInterface *pInterface);
88 virtual void NotifyInterfaceDrop(SMInterface *pInterface);
90 const char *GetExtensionVerString();
91 const char *GetExtensionDateString();
93 virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
95 void DatabaseConnect();
97 bool AddQueryToQueue(TQueryOp *query);
98 void ProcessQueryCache();
100 void AttemptReconnection();
101 void CatchLateLoadClients();
102 void ClearQueryCache(int serial);
105 * @brief Called when the pause state is changed.
107 //virtual void SDK_OnPauseChange(bool paused);
110 * @brief this is called when Core wants to know if your extension is working.
112 * @param error Error message buffer.
113 * @param maxlength Size of error message buffer.
114 * @return True if working, false otherwise.
116 //virtual bool QueryRunning(char *error, size_t maxlength);
118 #if defined SMEXT_CONF_METAMOD
120 * @brief Called when Metamod is attached, before the extension version is called.
122 * @param error Error buffer.
123 * @param maxlength Maximum size of error buffer.
124 * @param late Whether or not Metamod considers this a late load.
125 * @return True to succeed, false to fail.
127 //virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
130 * @brief Called when Metamod is detaching, after the extension version is called.
131 * NOTE: By default this is blocked unless sent from SourceMod.
133 * @param error Error buffer.
134 * @param maxlength Maximum size of error buffer.
135 * @return True to succeed, false to fail.
137 //virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
140 * @brief Called when Metamod's pause state is changing.
141 * NOTE: By default this is blocked unless sent from SourceMod.
143 * @param paused Pause state being set.
144 * @param error Error buffer.
145 * @param maxlength Maximum size of error buffer.
146 * @return True to succeed, false to fail.
148 //virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
151 IdentityToken_t *GetIdentity() const;
154 ke::Ref<IDatabase> Database;
155 IPhraseCollection *phrases;
156 const DatabaseInfo *DBInfo;
158 bool databaseLoading;
161 SourceHook::List<TQueryOp *> cachedQueries;
163 IdentityToken_t *identity;
166 class CookieTypeHandler : public IHandleTypeDispatch
169 void OnHandleDestroy(HandleType_t type, void *object)
171 /* No delete needed since Cookies are persistent */
175 class CookieIteratorHandler : public IHandleTypeDispatch
178 void OnHandleDestroy(HandleType_t type, void *object)
180 delete (SourceHook::List<Cookie *>::iterator *)object;
184 size_t IsAuthIdConnected(char *authID);
186 extern sp_nativeinfo_t g_ClientPrefNatives[];
188 extern ClientPrefs g_ClientPrefs;
189 extern HandleType_t g_CookieType;
190 extern CookieTypeHandler g_CookieTypeHandler;
192 extern HandleType_t g_CookieIterator;
193 extern CookieIteratorHandler g_CookieIteratorHandler;
195 bool Translate(char *buffer,
198 unsigned int numparams,
202 extern DbDriver g_DriverType;
204 #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_