00001 /* 00002 * 00003 * $Id: CmpiBaseMI.h,v 1.5 2008/07/09 19:36:59 tyreld Exp $ 00004 * 00005 * (C) Copyright IBM Corp. 2003, 2005, 2008 00006 * 00007 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE 00008 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE 00009 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. 00010 * 00011 * You can obtain a current copy of the Eclipse Public License from 00012 * http://www.opensource.org/licenses/eclipse-1.0.txt 00013 * 00014 * Author: Adrian Schuur <schuur@de.ibm.com> 00015 * Contributors: Heidi Neumann, heidineu@de.ibm.com 00016 * Angel Nunez Mencias, anunez@de.ibm.com 00017 * Viktor Mihajlovski, mihajlov@de.ibm.com 00018 * 00019 * Description: CMPI Base MI Definitions 00020 * 00021 */ 00022 00023 #ifndef _CmpiBaseMI_h_ 00024 #define _CmpiBaseMI_h_ 00025 00026 #include <iostream> 00027 00028 #include "cmpidt.h" 00029 #include "cmpift.h" 00030 #include "cmpimacs.h" 00031 00032 #include "Linkage.h" 00033 #include "CmpiProviderBase.h" 00034 00035 class CmpiBroker; 00036 class CmpiContext; 00037 class CmpiStatus; 00038 00039 class CMPI_PROVIDER_LINKAGE CmpiBaseMI { 00040 public: 00041 virtual ~CmpiBaseMI(); 00042 00043 CmpiBaseMI(const CmpiBroker &mbp, const CmpiContext& ctx); 00044 00045 void setProviderBase(CmpiProviderBase* base); 00046 CmpiProviderBase* getProviderBase(); 00047 00048 static CMPIStatus driveBaseCleanup(void* mi, const CMPIContext* eCtx, CMPIBoolean b); 00049 00050 virtual CmpiStatus initialize(const CmpiContext& ctx); 00051 virtual CmpiStatus cleanup(CmpiContext& ctx); 00052 virtual int isUnloadable() const; 00053 00054 protected: 00055 CmpiBroker* broker; 00056 private: 00057 CmpiProviderBase* providerBase; 00058 }; 00059 00060 #endif