version 1.11.8.4, 2006/03/10 14:30:39
|
version 1.13.2.1, 2006/02/28 19:53:30
|
|
|
#include "OperationResponseHandler.h" | #include "OperationResponseHandler.h" |
| |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <Pegasus/Provider/CIMOMHandle.h> |
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
/********************************************************** |
|
* Define CIMOMHandleContext class |
|
**********************************************************/ |
|
class CIMOMHandleContext : public NormalizerContext |
|
{ |
|
public: |
|
CIMOMHandleContext() {} |
|
virtual ~CIMOMHandleContext() {} |
|
|
|
virtual CIMClass getClass( |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& name); |
|
|
|
virtual Array<CIMName> enumerateClassNames( |
|
const CIMNamespaceName& nameSpace, const CIMName& className, |
|
bool deepInheritance); |
|
|
|
virtual AutoPtr<NormalizerContext> clone(); |
|
|
|
protected: |
|
CIMOMHandleContext(CIMOMHandle & hndl) : handle(hndl) {} |
|
private: |
|
CIMOMHandle handle; |
|
OperationContext emptyContext; |
|
}; |
|
|
|
CIMClass CIMOMHandleContext::getClass( |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& name) |
|
{ |
|
// Get the whole class definition |
|
return handle.getClass(emptyContext, nameSpace, name, false, true, true, |
|
CIMPropertyList()); |
|
} |
|
|
|
Array<CIMName> CIMOMHandleContext::enumerateClassNames( |
|
const CIMNamespaceName& nameSpace, const CIMName& className, |
|
bool deepInheritance) |
|
{ |
|
return handle.enumerateClassNames(emptyContext, nameSpace, className, |
|
deepInheritance); |
|
} |
|
|
|
AutoPtr<NormalizerContext> CIMOMHandleContext::clone() |
|
{ |
|
AutoPtr<NormalizerContext> tmpPtr(new CIMOMHandleContext(handle)); |
|
return tmpPtr; |
|
} |
|
|
|
/********************************************************** |
|
* End CIMOMHandleContext class |
|
**********************************************************/ |
|
|
|
// | // |
// OperationResponseHandler | // OperationResponseHandler |
// | // |
|
|
request->operationContext.get(CachedClassDefinitionContainer::NAME); | request->operationContext.get(CachedClassDefinitionContainer::NAME); |
| |
cimClass = container.getClass(); | cimClass = container.getClass(); |
|
|
} | } |
catch(Exception &) | catch(Exception &) |
{ | { |
|
|
// for this operation. | // for this operation. |
} | } |
| |
AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext()); |
_normalizer = |
ObjectNormalizer tmpNormalizer( |
ObjectNormalizer( |
cimClass, | cimClass, |
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin, |
request->includeClassOrigin); |
request->nameSpace, |
|
tmpContext); |
|
_normalizer = tmpNormalizer; |
|
#endif | #endif |
} | } |
| |
|
|
// for this operation. | // for this operation. |
} | } |
| |
AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext()); |
_normalizer = |
ObjectNormalizer tmpNormalizer( |
ObjectNormalizer( |
cimClass, | cimClass, |
request->includeQualifiers, | request->includeQualifiers, |
request->includeClassOrigin, |
request->includeClassOrigin); |
request->nameSpace, |
|
tmpContext); |
|
_normalizer = tmpNormalizer; |
|
#endif | #endif |
} | } |
| |
|
|
// for this operation. | // for this operation. |
} | } |
| |
AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext()); |
_normalizer = |
ObjectNormalizer tmpNormalizer( |
ObjectNormalizer( |
cimClass, | cimClass, |
false, | false, |
false, |
false); |
request->nameSpace, |
|
tmpContext); |
|
_normalizer = tmpNormalizer; |
|
#endif | #endif |
} | } |
| |