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 #include "OW_config.h"
00036 #include "OW_CppInstanceProviderIFC.hpp"
00037 #include "OW_CIMInstance.hpp"
00038 #include "OW_ResultHandlerIFC.hpp"
00039
00040 namespace OW_NAMESPACE
00041 {
00042
00043 class _RHEnumInstances : public CIMObjectPathResultHandlerIFC
00044 {
00045 public:
00046 _RHEnumInstances(
00047 CppInstanceProviderIFC& ip,
00048 const ProviderEnvironmentIFCRef& env,
00049 const String& ns,
00050 CIMInstanceResultHandlerIFC& result,
00051 WBEMFlags::ELocalOnlyFlag localOnly,
00052 WBEMFlags::EDeepFlag deep,
00053 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00054 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00055 const StringArray* propertyList,
00056 const CIMClass& cimClass )
00057 : _ip(ip)
00058 , _env(env)
00059 , _ns(ns)
00060 , _realHandler(result)
00061 , _localOnly(localOnly)
00062 , _includeQualifiers(includeQualifiers)
00063 , _includeClassOrigin(includeClassOrigin)
00064 , _propertyList(propertyList)
00065 , _cimClass(cimClass)
00066 {}
00067
00068 void doHandle(const CIMObjectPath& cop)
00069 {
00070 CIMInstance inst = _ip.getInstance(_env,_ns, cop,_localOnly,
00071 _includeQualifiers,
00072 _includeClassOrigin,
00073 _propertyList, _cimClass);
00074 _realHandler.handle(inst);
00075 }
00076 private:
00077 CppInstanceProviderIFC& _ip;
00078 const ProviderEnvironmentIFCRef& _env;
00079 const String& _ns;
00080 CIMInstanceResultHandlerIFC& _realHandler;
00081 WBEMFlags::ELocalOnlyFlag _localOnly;
00082 WBEMFlags::EIncludeQualifiersFlag _includeQualifiers;
00083 WBEMFlags::EIncludeClassOriginFlag _includeClassOrigin;
00084 const StringArray* _propertyList;
00085 const CIMClass& _cimClass;
00086 };
00088
00089 void
00090 CppInstanceProviderIFC::enumInstances(
00091 const ProviderEnvironmentIFCRef& env,
00092 const String& ns,
00093 const String& className,
00094 CIMInstanceResultHandlerIFC& result,
00095 WBEMFlags::ELocalOnlyFlag localOnly,
00096 WBEMFlags::EDeepFlag deep,
00097 WBEMFlags::EIncludeQualifiersFlag includeQualifiers,
00098 WBEMFlags::EIncludeClassOriginFlag includeClassOrigin,
00099 const StringArray* propertyList,
00100 const CIMClass& requestedClass,
00101 const CIMClass& cimClass )
00102 {
00103 _RHEnumInstances rh(*this,env , ns,result ,localOnly ,deep ,includeQualifiers ,
00104 includeClassOrigin ,propertyList , cimClass);
00105 enumInstanceNames(env,ns ,className , rh,cimClass);
00106 }
00107
00109 void
00110 CppInstanceProviderIFC::getInstanceProviderInfoWithEnv(
00111 const ProviderRegistrationEnvironmentIFCRef& env,
00112 InstanceProviderInfo& info)
00113 {
00114 return getInstanceProviderInfo(info);
00115 }
00116
00118 void
00119 CppInstanceProviderIFC::getInstanceProviderInfo(InstanceProviderInfo& info)
00120 {
00121 }
00122
00124 CppInstanceProviderIFC*
00125 CppInstanceProviderIFC::getInstanceProvider()
00126 {
00127 return this;
00128 }
00129
00131 CppInstanceProviderIFC::CppInstanceProviderIFC()
00132 {
00133 }
00134
00136 CppInstanceProviderIFC::~CppInstanceProviderIFC()
00137 {
00138 }
00139
00140 }
00141