1 /*************************************************************************** 2 cplugin.h - description 3 ------------------- 4 begin : Fri Sep 27 2002 5 copyright : (C) 2002-2003 by Mathias Küster 6 email : mathen@users.berlios.de 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef CPLUGIN_H 19 #define CPLUGIN_H 20 21 /** 22 *@author Mathias Küster 23 * 24 * The interface for a dclib plugin which is almost completely 25 * unused. 26 */ 27 28 #include <dclib/dcos.h> 29 #include <dclib/core/cstring.h> 30 31 enum ePluginType { 32 eptNONE, 33 eptLIB, 34 eptGUI 35 }; 36 37 class CPlugin { 38 public: 39 /** */ CPlugin()40 CPlugin() {}; 41 /** */ ~CPlugin()42 virtual ~CPlugin() {}; 43 44 /** init function */ 45 virtual bool Init() = 0; 46 47 protected: 48 /** It is called by CManager so takes no parameters */ PluginCallback()49 virtual int PluginCallback() { return 0; }; 50 }; 51 52 typedef struct ePluginStruct { 53 /** */ 54 CPlugin * m_pPlugin; 55 /** */ 56 void (*init) (void); 57 /** */ 58 void (*deinit) (void); 59 /** */ 60 ePluginType m_eType; 61 /** Short description */ 62 CString m_sDesc; 63 /** Version info */ 64 CString m_sVersion; 65 66 } ePluginStruct; 67 68 #endif 69