00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Base Library 00005 * Module : IModule 00006 * Package : Zeus.ZeusBase.MOM.Interfaces 00007 * Author : Benjamin Hadorn 00008 * Date : 27.12.2011 00009 * System : Zeus-Framework 00010 ***************************************************************************** 00011 * Licence: * 00012 * This library is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU Lesser General Public License as * 00014 * published by the Free Software Foundation; either version * 00015 * 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00025 *****************************************************************************/ 00026 00027 /***************************************************************************** 00028 * Changes: 00029 * 27.12.2011 bha: created zeus 2.0 00030 *****************************************************************************/ 00031 00032 #ifndef IModuleHPP 00033 #define IModuleHPP 00034 00035 #include <zeusbase/System/Interfaces/IZUnknown.hpp> 00036 #include <zeusbase/System/Interfaces/IString.hpp> 00037 #include <zeusbase/MOM/Interfaces/IZeusAPI.hpp> 00038 #include <zeusbase/MOM/Interfaces/IModuleSession.hpp> 00039 00040 #define MODULEMODE_NORMAL 0 00041 #define MODULEMODE_LOAD 1 00042 00043 00044 // {F5316165-FDAF-42FB-8FDF-94790A0EE916} 00045 #define INTERFACE_IModule TIID(0xF5316165, 0xFDAF, 0x42FB, 0x8F, 0xDF, 0x94, 0x79, 0x0A, 0x0E, 0xE9, 0x16) 00046 00047 00048 BEGIN_NAMESPACE_Zeus 00049 00050 /***************************************************************************/ 00053 /***************************************************************************/ 00054 class IModule : public IZUnknown 00055 { 00056 HIDE_ASSIGNMENT_OPERATOR(IModule) 00057 00058 public: 00059 00060 /**********************************************************************/ 00066 /**********************************************************************/ 00067 virtual Uint MQUALIFIER getMode() const=0; 00068 00069 /**********************************************************************/ 00072 /**********************************************************************/ 00073 virtual void MQUALIFIER activate()=0; 00074 00075 /**********************************************************************/ 00078 /**********************************************************************/ 00079 virtual void MQUALIFIER deactivate()=0; 00080 00081 /**********************************************************************/ 00089 /**********************************************************************/ 00090 virtual bool MQUALIFIER isActive(bool bGlobaly = false) const=0; 00091 00092 /**********************************************************************/ 00098 /**********************************************************************/ 00099 virtual Retval MQUALIFIER getZeusAPI(IZeusAPI*& rpApi)=0; 00100 00101 /**********************************************************************/ 00110 /**********************************************************************/ 00111 virtual Retval MQUALIFIER getModule(const IString& rName, IModule*& rpModule)=0; 00112 00113 /**********************************************************************/ 00117 /**********************************************************************/ 00118 virtual void MQUALIFIER getName(IString& rName)const=0; 00119 00120 /**********************************************************************/ 00128 /**********************************************************************/ 00129 virtual Retval MQUALIFIER registerActiveModule(IModule& rModule)=0; 00130 00131 /**********************************************************************/ 00139 /**********************************************************************/ 00140 virtual Retval MQUALIFIER unregisterActiveModule(IModule& rModule)=0; 00141 00142 /**********************************************************************/ 00148 /**********************************************************************/ 00149 virtual Retval MQUALIFIER getActiveModule(IModule*& rpModule)=0; 00150 00151 /**********************************************************************/ 00159 /**********************************************************************/ 00160 virtual Retval MQUALIFIER getModuleSession(IModuleSession*& rpSession)=0; 00161 00162 /**********************************************************************/ 00167 /**********************************************************************/ 00168 virtual void MQUALIFIER getModuleSessionLibrary(IString& rName)const=0; 00169 }; 00170 00171 END_NAMESPACE_Zeus 00172 00173 #endif