00001 /* 00002 * 00003 * $Id: CmpiProviderBase.h,v 1.3 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 ProviderBase Helper Definitions 00020 * 00021 */ 00022 00023 #ifndef _CmpiProviderBase_h_ 00024 #define _CmpiProviderBase_h_ 00025 00026 #include "Linkage.h" 00027 00028 class CmpiBaseMI; 00029 00030 class CMPI_PROVIDER_LINKAGE CmpiProviderBase { 00031 public: 00032 CmpiProviderBase(); 00033 ~CmpiProviderBase(); 00034 CmpiBaseMI* getBaseMI(); 00035 void setBaseMI(CmpiBaseMI* aBaseMI); 00036 void incUseCount(); 00037 int decUseCount(); 00038 private: 00039 friend class CmpiArgs; 00040 friend class CmpiArray; 00041 friend class CmpiDateTime; 00042 friend class CmpiInstance; 00043 friend class CmpiObject; 00044 friend class CmpiObjectPath; 00045 friend class CmpiStatus; 00046 friend class CmpiString; 00047 friend class CmpiBaseMI; 00048 // per provider CmpiBaseMI 00049 CmpiBaseMI* baseMI; 00050 int useCount; 00051 // only for usage inside CMPI CPP library 00052 static CMPIBroker *getBroker(); 00053 static void setBroker(const CMPIBroker *mb); 00054 }; 00055 00056 #endif 00057 00058