00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_CPP_PROVIDERBASEIFC_HPP_
00036 #define OW_CPP_PROVIDERBASEIFC_HPP_
00037 #include "OW_config.h"
00038 #include "OW_CIMFwd.hpp"
00039 #include "OW_ProviderEnvironmentIFC.hpp"
00040 #include "OW_ProviderRegistrationEnvironmentIFC.hpp"
00041 #include "OW_SharedLibraryReference.hpp"
00042 #include "OW_DateTime.hpp"
00043 #include "OW_IntrusiveReference.hpp"
00044 #include "OW_IntrusiveCountableBase.hpp"
00045
00046 namespace OW_NAMESPACE
00047 {
00048
00049 class CppInstanceProviderIFC;
00050 class CppSecondaryInstanceProviderIFC;
00051 class CppMethodProviderIFC;
00052 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00053 class CppAssociatorProviderIFC;
00054 #endif
00055 class CppIndicationExportProviderIFC;
00056 class CppPolledProviderIFC;
00057 class CppIndicationProviderIFC;
00073 class OW_CPPPROVIFC_API CppProviderBaseIFC : public virtual IntrusiveCountableBase
00074 {
00075 public:
00076
00077 CppProviderBaseIFC();
00078
00079 CppProviderBaseIFC(const CppProviderBaseIFC& arg);
00080
00081 virtual ~CppProviderBaseIFC();
00093 virtual void initialize(const ProviderEnvironmentIFCRef& env);
00094
00100 virtual void shuttingDown(const ProviderEnvironmentIFCRef& env);
00101
00108 virtual CppInstanceProviderIFC* getInstanceProvider();
00109 virtual CppSecondaryInstanceProviderIFC* getSecondaryInstanceProvider();
00110 virtual CppMethodProviderIFC* getMethodProvider();
00111 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00112 virtual CppAssociatorProviderIFC* getAssociatorProvider();
00113 #endif
00114 virtual CppIndicationExportProviderIFC* getIndicationExportProvider();
00115 virtual CppPolledProviderIFC* getPolledProvider();
00116 virtual CppIndicationProviderIFC* getIndicationProvider();
00117 DateTime getLastAccessTime() const;
00118 void updateAccessTime();
00119
00120 virtual bool canUnload();
00121
00122 bool getPersist() const;
00123 void setPersist(bool persist=true);
00124
00125 private:
00126 DateTime m_dt;
00127 bool m_persist;
00128 };
00129
00130 typedef SharedLibraryReference< IntrusiveReference<CppProviderBaseIFC> > CppProviderBaseIFCRef;
00131
00132 }
00133
00134
00135
00136
00137 #define OW_NOIDPROVIDERFACTORY(prov) OW_PROVIDERFACTORY(prov, NO_ID)
00138
00139 #if !defined(OW_STATIC_SERVICES)
00140
00141 #define OW_PROVIDERFACTORY_NOID(prov, name) OW_PROVIDERFACTORY(prov, NO_ID)
00142 #define OW_PROVIDERFACTORY(prov, name) \
00143 extern "C" OW_EXPORT const char* \
00144 getOWVersion() \
00145 { \
00146 return OW_VERSION; \
00147 } \
00148 extern "C" OW_EXPORT OW_NAMESPACE::CppProviderBaseIFC* \
00149 createProvider##name() \
00150 { \
00151 return new prov; \
00152 }
00153 #else
00154
00155 #define OW_PROVIDERFACTORY_NOID(prov, name) OW_PROVIDERFACTORY(prov, NO_ID##name)
00156 #define OW_PROVIDERFACTORY(prov, name) \
00157 extern "C" OW_NAMESPACE::CppProviderBaseIFC* \
00158 createProvider##name() \
00159 { \
00160 return new prov; \
00161 }
00162 #endif
00163
00164 #endif