|
plugin.h00001 /* 00002 Copyright (C) 2001 by Jorrit Tyberghein 00003 Copyright (C) 1999 by Andrew Zabolotny <bit@eltech.ru> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __IUTIL_PLUGIN_H__ 00021 #define __IUTIL_PLUGIN_H__ 00022 00023 #include "csutil/scf.h" 00024 00025 struct iComponent; 00026 00033 #define CS_QUERY_PLUGIN_CLASS(Object,ClassID,Interface) \ 00034 (Interface *)((Object)->QueryPlugin \ 00035 (ClassID, #Interface, VERSION_##Interface)) 00036 00043 #define CS_LOAD_PLUGIN(Object,ClassID,Interface) \ 00044 (Interface *)((Object)->LoadPlugin \ 00045 (ClassID, #Interface, VERSION_##Interface)) 00046 00051 #define CS_LOAD_PLUGIN_ALWAYS(Object,ClassID) \ 00052 ((Object)->LoadPlugin (ClassID, NULL, 0)) 00053 00054 SCF_VERSION (iPluginManager, 0, 0, 3); 00055 00059 struct iPluginManager : public iBase 00060 { 00062 virtual iBase *LoadPlugin (const char *classID, 00063 const char *iInterface = NULL, int iVersion = 0) = 0; 00071 virtual iBase *QueryPlugin (const char *iInterface, int iVersion) = 0; 00073 virtual iBase *QueryPlugin (const char* classID, 00074 const char *iInterface, int iVersion) = 0; 00076 virtual bool UnloadPlugin (iComponent *obj) = 0; 00078 virtual bool RegisterPlugin (const char *classID, iComponent *obj) = 0; 00080 virtual int GetPluginCount () = 0; 00082 virtual iBase* GetPlugin (int idx) = 0; 00084 virtual void Clear () = 0; 00085 }; 00086 00087 #endif // __IUTIL_PLUGIN_H__ Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |