00001 00002 /* 00003 * 00004 * CmpiDateTime.h 00005 * 00006 * (C) Copyright IBM Corp. 2003 00007 * 00008 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE 00009 * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE 00010 * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. 00011 * 00012 * You can obtain a current copy of the Common Public License from 00013 * http://oss.software.ibm.com/developerworks/opensource/license-cpl.html 00014 * 00015 * Author: Adrian Schuur <schuur@de.ibm.com> 00016 * Contributors: 00017 * 00018 * Description: CMPI C++ DatetTime wrapper 00019 * 00020 */ 00021 00022 #ifndef _CmpiDateTime_h_ 00023 #define _CmpiDateTime_h_ 00024 #include "OW_config.h" 00025 00026 #include "cmpidt.h" 00027 #include "cmpift.h" 00028 00029 #include "CmpiObject.h" 00030 00031 00035 class CmpiDateTime : public CmpiObject { 00036 protected: 00037 00040 inline CmpiDateTime(const CMPIDateTime* enc) 00041 { this->enc=(void*)enc; } 00042 00045 inline CMPIDateTime *getEnc() const 00046 { return (CMPIDateTime*)enc; } 00047 void *makeDateTime(CMPIBroker *mb); 00048 void *makeDateTime(CMPIBroker *mb, const char* utcTime); 00049 void *makeDateTime(CMPIBroker *mb, const CMPIUint64 binTime, 00050 const CmpiBoolean interval); 00051 private: 00052 public: 00053 00056 inline CmpiDateTime() { 00057 enc=makeDateTime(CmpiProviderBase::getBroker()); 00058 } 00059 00063 inline CmpiDateTime(const char* utcTime) { 00064 enc=makeDateTime(CmpiProviderBase::getBroker(),utcTime); 00065 } 00066 00072 inline CmpiDateTime(const CMPIUint64 binTime, const CmpiBoolean interval) { 00073 enc=makeDateTime(CmpiProviderBase::getBroker(),binTime,interval); 00074 } 00075 00079 CmpiBoolean isInterval(); 00080 00081 00085 CMPIUint64 getDateTime(); 00086 }; 00087 00088 #endif