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_CPPPROXYPROVIDER_HPP_
00036 #define OW_CPPPROXYPROVIDER_HPP_
00037 #include "OW_config.h"
00038 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00039 #include "OW_AssociatorProviderIFC.hpp"
00040 #endif
00041 #include "OW_InstanceProviderIFC.hpp"
00042 #include "OW_SecondaryInstanceProviderIFC.hpp"
00043 #include "OW_MethodProviderIFC.hpp"
00044 #include "OW_PolledProviderIFC.hpp"
00045 #include "OW_IndicationExportProviderIFC.hpp"
00046 #include "OW_IndicationProviderIFC.hpp"
00047 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00048 #include "OW_CppAssociatorProviderIFC.hpp"
00049 #endif
00050 #include "OW_CppInstanceProviderIFC.hpp"
00051 #include "OW_CppSecondaryInstanceProviderIFC.hpp"
00052 #include "OW_CppMethodProviderIFC.hpp"
00053 #include "OW_CppPolledProviderIFC.hpp"
00054 #include "OW_CppIndicationExportProviderIFC.hpp"
00055 #include "OW_CppIndicationProviderIFC.hpp"
00056
00057
00058
00059
00060 namespace OW_NAMESPACE
00061 {
00062
00063 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00064
00065 class OW_CPPPROVIFC_API CppAssociatorProviderProxy : public AssociatorProviderIFC
00066 {
00067 public:
00068 CppAssociatorProviderProxy(CppAssociatorProviderIFCRef pProv);
00069
00070 virtual void associators(
00071 const ProviderEnvironmentIFCRef& env,
00072 CIMInstanceResultHandlerIFC& result,
00073 const String& ns,
00074 const CIMObjectPath& objectName,
00075 const String& assocClass,
00076 const String& resultClass,
00077 const String& role,
00078 const String& resultRole,
00079 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00080 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00081 const StringArray* propertyList);
00082 virtual void associatorNames(
00083 const ProviderEnvironmentIFCRef& env,
00084 CIMObjectPathResultHandlerIFC& result,
00085 const String& ns,
00086 const CIMObjectPath& objectName,
00087 const String& assocClass,
00088 const String& resultClass,
00089 const String& role,
00090 const String& resultRole);
00091 virtual void references(
00092 const ProviderEnvironmentIFCRef& env,
00093 CIMInstanceResultHandlerIFC& result,
00094 const String& ns,
00095 const CIMObjectPath& objectName,
00096 const String& resultClass,
00097 const String& role,
00098 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00099 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00100 const StringArray* propertyList);
00101 virtual void referenceNames(
00102 const ProviderEnvironmentIFCRef& env,
00103 CIMObjectPathResultHandlerIFC& result,
00104 const String& ns,
00105 const CIMObjectPath& objectName,
00106 const String& resultClass,
00107 const String& role);
00108 private:
00109 CppAssociatorProviderIFCRef m_pProv;
00110 };
00111 #endif // #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00112
00113 class OW_CPPPROVIFC_API CppInstanceProviderProxy : public InstanceProviderIFC
00114 {
00115 public:
00116 CppInstanceProviderProxy(CppInstanceProviderIFCRef pProv);
00117 virtual void enumInstanceNames(
00118 const ProviderEnvironmentIFCRef& env,
00119 const String& ns,
00120 const String& className,
00121 CIMObjectPathResultHandlerIFC& result,
00122 const CIMClass& cimClass);
00123 virtual void enumInstances(
00124 const ProviderEnvironmentIFCRef& env,
00125 const String& ns,
00126 const String& className,
00127 CIMInstanceResultHandlerIFC& result,
00128 WBEMFlags::ELocalOnlyFlag localOnly,
00129 WBEMFlags::EDeepFlag deep,
00130 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00131 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00132 const StringArray* propertyList,
00133 const CIMClass& requestedClass,
00134 const CIMClass& cimClass);
00135 virtual CIMInstance getInstance(
00136 const ProviderEnvironmentIFCRef& env,
00137 const String& ns,
00138 const CIMObjectPath& instanceName,
00139 WBEMFlags::ELocalOnlyFlag localOnly,
00140 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00141 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00142 const StringArray* propertyList,
00143 const CIMClass& cimClass);
00144 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00145 virtual CIMObjectPath createInstance(
00146 const ProviderEnvironmentIFCRef& env,
00147 const String& ns,
00148 const CIMInstance& cimInstance);
00149 virtual void modifyInstance(
00150 const ProviderEnvironmentIFCRef& env,
00151 const String& ns,
00152 const CIMInstance& modifiedInstance,
00153 const CIMInstance& previousInstance,
00154 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00155 const StringArray* propertyList,
00156 const CIMClass& theClass);
00157 virtual void deleteInstance(
00158 const ProviderEnvironmentIFCRef& env,
00159 const String& ns,
00160 const CIMObjectPath& cop);
00161 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00162 private:
00163 CppInstanceProviderIFCRef m_pProv;
00164 };
00165
00166 class OW_CPPPROVIFC_API CppSecondaryInstanceProviderProxy : public SecondaryInstanceProviderIFC
00167 {
00168 public:
00169 CppSecondaryInstanceProviderProxy(CppSecondaryInstanceProviderIFCRef pProv);
00170 virtual void filterInstances(const ProviderEnvironmentIFCRef &env, const String &ns, const String &className, CIMInstanceArray &instances, WBEMFlags:: ELocalOnlyFlag localOnly, WBEMFlags:: EDeepFlag deep, WBEMFlags:: EIncludeQualifiersFlag includeQualifiers, WBEMFlags:: EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList, const CIMClass &requestedClass, const CIMClass &cimClass);
00171 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00172 virtual void createInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &cimInstance);
00173 virtual void modifyInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &modifiedInstance, const CIMInstance &previousInstance, WBEMFlags:: EIncludeQualifiersFlag includeQualifiers, const StringArray *propertyList, const CIMClass &theClass);
00174 virtual void deleteInstance(const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &cop);
00175 #endif // #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00176 private:
00177 CppSecondaryInstanceProviderIFCRef m_pProv;
00178 };
00179
00180 class OW_CPPPROVIFC_API CppMethodProviderProxy : public MethodProviderIFC
00181 {
00182 public:
00183 CppMethodProviderProxy(CppMethodProviderIFCRef pProv);
00184 virtual CIMValue invokeMethod(
00185 const ProviderEnvironmentIFCRef& env,
00186 const String& ns,
00187 const CIMObjectPath& path,
00188 const String& methodName,
00189 const CIMParamValueArray& in,
00190 CIMParamValueArray& out);
00191 private:
00192 CppMethodProviderIFCRef m_pProv;
00193 };
00194 class OW_CPPPROVIFC_API CppIndicationExportProviderProxy : public IndicationExportProviderIFC
00195 {
00196 public:
00197 CppIndicationExportProviderProxy(CppIndicationExportProviderIFCRef pProv) :
00198 m_pProv(pProv) {}
00199 virtual StringArray getHandlerClassNames()
00200 {
00201 return m_pProv->getHandlerClassNames();
00202 }
00203
00204 virtual void exportIndication(const ProviderEnvironmentIFCRef& env,
00205 const String& ns,
00206 const CIMInstance& indHandlerInst, const CIMInstance& indicationInst)
00207 {
00208 m_pProv->exportIndication(env, ns, indHandlerInst, indicationInst);
00209 }
00210
00211 virtual void doCooperativeCancel()
00212 {
00213 m_pProv->doCooperativeCancel();
00214 }
00215 virtual void doDefinitiveCancel()
00216 {
00217 m_pProv->doDefinitiveCancel();
00218 }
00219 private:
00220 CppIndicationExportProviderIFCRef m_pProv;
00221 };
00222 class OW_CPPPROVIFC_API CppPolledProviderProxy : public PolledProviderIFC
00223 {
00224 public:
00225 CppPolledProviderProxy(CppPolledProviderIFCRef pProv) :
00226 m_pProv(pProv) {}
00227 virtual Int32 poll(const ProviderEnvironmentIFCRef& env )
00228 { return m_pProv->poll(env); }
00229 virtual Int32 getInitialPollingInterval(const ProviderEnvironmentIFCRef& env )
00230 { return m_pProv->getInitialPollingInterval(env); }
00231 virtual void doCooperativeCancel()
00232 {
00233 m_pProv->doCooperativeCancel();
00234 }
00235 virtual void doDefinitiveCancel()
00236 {
00237 m_pProv->doDefinitiveCancel();
00238 }
00239 private:
00240 CppPolledProviderIFCRef m_pProv;
00241 };
00242 class OW_CPPPROVIFC_API CppIndicationProviderProxy : public IndicationProviderIFC
00243 {
00244 public:
00245 CppIndicationProviderProxy(CppIndicationProviderIFCRef pProv)
00246 : m_pProv(pProv)
00247 , m_activationCount(0) {}
00248 virtual void deActivateFilter(
00249 const ProviderEnvironmentIFCRef &env,
00250 const WQLSelectStatement &filter,
00251 const String &eventType,
00252 const String& nameSpace,
00253 const StringArray& classes)
00254 {
00255 bool lastActivation = (--m_activationCount == 0);
00256 m_pProv->deActivateFilter(env,filter,eventType,nameSpace, classes,lastActivation);
00257 }
00258 virtual void activateFilter(
00259 const ProviderEnvironmentIFCRef &env,
00260 const WQLSelectStatement &filter,
00261 const String &eventType,
00262 const String& nameSpace,
00263 const StringArray& classes)
00264 {
00265 bool firstActivation = (m_activationCount++ == 0);
00266 m_pProv->activateFilter(env,filter,eventType,nameSpace,classes,firstActivation);
00267 }
00268 virtual void authorizeFilter(
00269 const ProviderEnvironmentIFCRef &env,
00270 const WQLSelectStatement &filter,
00271 const String &eventType,
00272 const String& nameSpace,
00273 const StringArray& classes,
00274 const String &owner)
00275 {
00276 m_pProv->authorizeFilter(env,filter,eventType,nameSpace,classes,owner);
00277 }
00278 virtual int mustPoll(
00279 const ProviderEnvironmentIFCRef& env,
00280 const WQLSelectStatement& filter,
00281 const String& eventType,
00282 const String& nameSpace,
00283 const StringArray& classes
00284 )
00285 {
00286 return m_pProv->mustPoll(env,filter,eventType,nameSpace,classes);
00287 }
00288 private:
00289 CppIndicationProviderIFCRef m_pProv;
00290 unsigned int m_activationCount;
00291 };
00292
00293 }
00294
00295 #endif