dvander@608: /** ds@683: * vim: set ts=4 sw=4 tw=99 noet : dvander@608: * ====================================================== dvander@608: * Metamod:Source ds@683: * Copyright (C) 2004-2009 AlliedModders LLC and authors. dvander@608: * All rights reserved. dvander@608: * ====================================================== dvander@608: * dvander@608: * This software is provided 'as-is', without any express or implied warranty. dvander@608: * In no event will the authors be held liable for any damages arising from dvander@608: * the use of this software. dvander@608: * dvander@608: * Permission is granted to anyone to use this software for any purpose, dvander@608: * including commercial applications, and to alter it and redistribute it dvander@608: * freely, subject to the following restrictions: dvander@608: * dvander@608: * 1. The origin of this software must not be misrepresented; you must not dvander@608: * claim that you wrote the original software. If you use this software in a dvander@608: * product, an acknowledgment in the product documentation would be dvander@608: * appreciated but is not required. dvander@608: * 2. Altered source versions must be plainly marked as such, and must not be dvander@608: * misrepresented as being the original software. dvander@608: * 3. This notice may not be removed or altered from any source distribution. dvander@608: */ dvander@608: dvander@546: #ifndef _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ dvander@546: #define _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ dvander@546: dvander@546: typedef void* (*QueryValveInterface)(const char *pName, int *pReturnCode); dvander@546: class IServerPluginCallbacks; dvander@546: dvander@546: struct vsp_bridge_info dvander@546: { dvander@546: QueryValveInterface engineFactory; dvander@546: QueryValveInterface gsFactory; dvander@546: IServerPluginCallbacks * vsp_callbacks; dvander@546: unsigned int vsp_version; dvander@546: }; dvander@546: dvander@546: class IVspBridge dvander@546: { dvander@546: public: dvander@547: virtual bool Load(const vsp_bridge_info *info, char *buffer, size_t maxlength) = 0; dvander@546: virtual void Unload() = 0; dvander@546: virtual const char *GetDescription() = 0; dvander@546: }; dvander@546: dvander@579: struct gamedll_bridge_info dvander@579: { dvander@579: QueryValveInterface engineFactory; dvander@579: QueryValveInterface fsFactory; dvander@579: QueryValveInterface physicsFactory; dvander@579: QueryValveInterface gsFactory; dvander@579: void * pGlobals; dvander@579: unsigned int dllVersion; dvander@579: void * isgd; ds@683: const char * vsp_listener_path; dvander@579: }; dvander@579: dvander@579: class IGameDllBridge dvander@579: { dvander@579: public: dvander@579: virtual bool DLLInit_Pre(const gamedll_bridge_info *info, char *buffer, size_t maxlength) = 0; dvander@582: virtual void DLLInit_Post(int *isgdUnload) = 0; dvander@579: virtual void *QueryInterface(const char *name, int *ret) = 0; dvander@579: virtual void Unload() = 0; dvander@579: }; dvander@579: dvander@546: #endif /* _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ */ dvander@546: