Fixed PrintCenterTextAll not accepting the small translation key.
3 * ===============================================================
4 * SourceMod, Copyright (C) 2004-2007 AlliedModders LLC.
6 * ===============================================================
8 * This file is part of the SourceMod/SourcePawn SDK. This file may only be
9 * used or modified under the Terms and Conditions of its License Agreement,
10 * which is found in public/licenses/LICENSE.txt. As of this notice, derivative
11 * works must be licensed under the GNU General Public License (version 2 or
12 * greater). A copy of the GPL is included under public/licenses/GPL.txt.
14 * To view the latest information, see: http://www.sourcemod.net/license.php
19 #ifndef _INCLUDE_SOURCEMOD_IFACE_SHARE_SYS_H_
20 #define _INCLUDE_SOURCEMOD_IFACE_SHARE_SYS_H_
24 * @brief Defines the Share System, responsible for shared resources and dependencies.
26 * The Share System also manages the Identity_t data type, although this is internally
27 * implemented with the Handle System.
30 #include <sp_vm_types.h>
36 struct IdentityToken_t;
38 /** Forward declaration from IHandleSys.h */
39 typedef unsigned int HandleType_t;
41 /** Forward declaration from IHandleSys.h */
42 typedef HandleType_t IdentityType_t;
45 * @brief Defines the base functionality required by a shared interface.
51 * @brief Must return an integer defining the interface's version.
53 virtual unsigned int GetInterfaceVersion() =0;
56 * @brief Must return a string defining the interface's unique name.
58 virtual const char *GetInterfaceName() =0;
61 * @brief Must return whether the requested version number is backwards compatible.
62 * Note: This can be overridden for breaking changes or custom versioning.
64 * @param version Version number to compare against.
65 * @return True if compatible, false otherwise.
67 virtual bool IsVersionCompatible(unsigned int version)
69 if (version > GetInterfaceVersion())
79 * @brief Tracks dependencies and fires dependency listeners.
85 * @brief Adds an interface to the global interface system.
87 * @param myself Object adding this interface, in order to track dependencies.
88 * @param iface Interface pointer (must be unique).
89 * @return True on success, false otherwise.
91 virtual bool AddInterface(IExtension *myself, SMInterface *iface) =0;
94 * @brief Requests an interface from the global interface system.
95 * If found, the interface's internal reference count will be increased.
97 * @param iface_name Interface name.
98 * @param iface_vers Interface version to attempt to match.
99 * @param myself Object requesting this interface, in order to track dependencies.
100 * @param pIface Pointer to store the return value in.
102 virtual bool RequestInterface(const char *iface_name,
103 unsigned int iface_vers,
105 SMInterface **pIface) =0;
108 * @brief Adds a list of natives to the global native pool, to be bound on plugin load.
109 * NOTE: Adding natives currently does not bind them to any loaded plugins.
110 * You must manually bind late natives.
112 * @param myself Identity token of parent object.
113 * @param natives Array of natives to add. The last entry must have NULL members.
115 virtual void AddNatives(IExtension *myself, const sp_nativeinfo_t *natives) =0;
118 * @brief Creates a new identity type.
119 * NOTE: Module authors should never need to use this. Due to the current implementation,
120 * there is a hardcoded limit of 15 types. Core uses up a few, so think carefully!
122 * @param name String containing type name. Must not be empty or NULL.
123 * @return A new HandleType_t identifier, or 0 on failure.
125 virtual IdentityType_t CreateIdentType(const char *name) =0;
128 * @brief Finds an identity type by name.
129 * DEFAULT IDENTITY TYPES:
130 * "PLUGIN" - An IPlugin object.
131 * "MODULE" - An IModule object.
132 * "CORE" - An SMGlobalClass or other singleton.
134 * @param name String containing type name to search for.
135 * @return A HandleType_t identifier if found, 0 otherwise.
137 virtual IdentityType_t FindIdentType(const char *name) =0;
140 * @brief Creates a new identity token. This token is guaranteed to be
141 * unique amongst all other open identities.
143 * @param type Identity type.
144 * @param ptr Private data pointer (cannot be NULL).
145 * @return A new IdentityToken_t pointer, or NULL on failure.
147 virtual IdentityToken_t *CreateIdentity(IdentityType_t type, void *ptr) =0;
150 * @brief Destroys an identity type. Note that this will delete any identities
151 * that are under this type.
153 * @param type Identity type.
155 virtual void DestroyIdentType(IdentityType_t type) =0;
158 * @brief Destroys an identity token. Any handles being owned by this token, or
161 * @param identity Identity to remove.
163 virtual void DestroyIdentity(IdentityToken_t *identity) =0;
166 * @brief Requires an extension. This tells SourceMod that without this extension,
167 * your extension should not be loaded. The name should not include the ".dll" or
168 * the ".so" part of the file name.
170 * @param myself IExtension pointer to yourself.
171 * @param filename File of extension to require.
172 * @param require Whether or not this extension is a required dependency.
173 * @param autoload Whether or not to autoload this extension.
175 virtual void AddDependency(IExtension *myself, const char *filename, bool require, bool autoload) =0;
179 #endif //_INCLUDE_SOURCEMOD_IFACE_SHARE_SYS_H_