(file) Return to OperationResponseHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2

Diff for /pegasus/src/Pegasus/ProviderManager2/OperationResponseHandler.cpp between version 1.25 and 1.26

version 1.25, 2008/05/12 09:14:54 version 1.26, 2008/09/17 06:02:57
Line 37 
Line 37 
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/SharedPtr.h> #include <Pegasus/Common/SharedPtr.h>
 #include <Pegasus/Provider/CIMOMHandle.h> #include <Pegasus/Provider/CIMOMHandle.h>
   #include <Pegasus/Config/ConfigManager.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   static void _initializeNormalizer(
       CIMOperationRequestMessage *request,
       Boolean includeQualifiers,
       Boolean includeClassOrigin,
       ObjectNormalizer &normalizer)
   {
       // Attempt to get the cached class definition, normalization is disabled
       // if it does not exist.
       if (request->operationContext.contains(
               CachedClassDefinitionContainer::NAME))
       {
           CIMClass cimClass;
           CachedClassDefinitionContainer container =
               request->operationContext.get(
                   CachedClassDefinitionContainer::NAME);
           cimClass = container.getClass();
           SharedPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());
           ObjectNormalizer tmpNormalizer(
               cimClass,
               includeQualifiers,
               includeClassOrigin,
               request->nameSpace,
               tmpContext);
           normalizer = tmpNormalizer;
       }
   }
   
 // //
 // OperationResponseHandler // OperationResponseHandler
 // //
Line 285 
Line 313 
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)
     : OperationResponseHandler(request, response, responseChunkCallback)     : OperationResponseHandler(request, response, responseChunkCallback)
 { {
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION      _initializeNormalizer(
     // Attempt to get the cached class definition used to validate results of          request,
     // this operation. If it does not exist, then this feature is disabled  
     // for this operation.  
     CIMClass cimClass;  
   
     if (request->operationContext.contains(  
             CachedClassDefinitionContainer::NAME))  
     {  
         CachedClassDefinitionContainer container =  
             request->operationContext.get(  
                 CachedClassDefinitionContainer::NAME);  
   
         cimClass = container.getClass();  
     }  
   
     SharedPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());  
     ObjectNormalizer tmpNormalizer(  
         cimClass,  
         request->includeQualifiers,         request->includeQualifiers,
         request->includeClassOrigin,         request->includeClassOrigin,
         request->nameSpace,          _normalizer);
         tmpContext);  
     _normalizer = tmpNormalizer;  
 #endif  
 } }
  
 void GetInstanceResponseHandler::deliver(const CIMInstance& cimInstance) void GetInstanceResponseHandler::deliver(const CIMInstance& cimInstance)
Line 332 
Line 340 
         throw CIMException(CIM_ERR_FAILED, message);         throw CIMException(CIM_ERR_FAILED, message);
     }     }
  
       CIMInstance localInstance(cimInstance);
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION
     // The normalizer expects an object path embedded in instances even     // The normalizer expects an object path embedded in instances even
     // though it is not required by this operation. Use the requested     // though it is not required by this operation. Use the requested
     // object path is missing from the instance.     // object path is missing from the instance.
     CIMInstance localInstance(cimInstance);  
   
     if (localInstance.getPath().getKeyBindings().size() == 0)     if (localInstance.getPath().getKeyBindings().size() == 0)
     {     {
         // ATTN: should clone before modification         // ATTN: should clone before modification
         localInstance.setPath(static_cast<CIMGetInstanceRequestMessage*>(         localInstance.setPath(static_cast<CIMGetInstanceRequestMessage*>(
             getRequest())->instanceName);             getRequest())->instanceName);
     }     }
   #endif
     SimpleInstanceResponseHandler::deliver(     SimpleInstanceResponseHandler::deliver(
         _normalizer.processInstance(localInstance));         _normalizer.processInstance(localInstance));
 #else  
     SimpleInstanceResponseHandler::deliver(cimInstance);  
 #endif  
 } }
  
 void GetInstanceResponseHandler::complete() void GetInstanceResponseHandler::complete()
Line 403 
Line 407 
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)
     : OperationResponseHandler(request, response, responseChunkCallback)     : OperationResponseHandler(request, response, responseChunkCallback)
 { {
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION      _initializeNormalizer(
     // Attempt to get the cached class definition used to validate results of          request,
     // this operation. If it does not exist, then this feature is disabled  
     // for this operation.  
     CIMClass cimClass;  
   
     if (request->operationContext.contains(  
             CachedClassDefinitionContainer::NAME))  
     {  
         CachedClassDefinitionContainer container =  
             request->operationContext.get(  
                 CachedClassDefinitionContainer::NAME);  
         cimClass = container.getClass();  
     }  
   
     SharedPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());  
     ObjectNormalizer tmpNormalizer(  
         cimClass,  
         request->includeQualifiers,         request->includeQualifiers,
         request->includeClassOrigin,         request->includeClassOrigin,
         request->nameSpace,          _normalizer);
         tmpContext);  
     _normalizer = tmpNormalizer;  
 #endif  
 } }
  
 void EnumerateInstancesResponseHandler::deliver(const CIMInstance& cimInstance) void EnumerateInstancesResponseHandler::deliver(const CIMInstance& cimInstance)
Line 440 
Line 425 
         throw CIMException(CIM_ERR_FAILED, message);         throw CIMException(CIM_ERR_FAILED, message);
     }     }
  
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION  
     SimpleInstanceResponseHandler::deliver(     SimpleInstanceResponseHandler::deliver(
         _normalizer.processInstance(cimInstance));         _normalizer.processInstance(cimInstance));
 #else  
     SimpleInstanceResponseHandler::deliver(cimInstance);  
 #endif  
 } }
  
 String EnumerateInstancesResponseHandler::getClass() const String EnumerateInstancesResponseHandler::getClass() const
Line 471 
Line 452 
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)
     : OperationResponseHandler(request, response, responseChunkCallback)     : OperationResponseHandler(request, response, responseChunkCallback)
 { {
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION      _initializeNormalizer(
     // Attempt to get the cached class definition used to validate results of          request,
     // this operation. If it does not exist, then this feature is disabled  
     // for this operation.  
     CIMClass cimClass;  
   
     if (request->operationContext.contains(  
             CachedClassDefinitionContainer::NAME))  
     {  
         CachedClassDefinitionContainer container =  
             request->operationContext.get(  
                 CachedClassDefinitionContainer::NAME);  
   
         cimClass = container.getClass();  
     }  
   
     SharedPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());  
     ObjectNormalizer tmpNormalizer(  
         cimClass,  
         false,         false,
         false,         false,
         request->nameSpace,          _normalizer);
         tmpContext);  
     _normalizer = tmpNormalizer;  
 #endif  
 } }
  
 void EnumerateInstanceNamesResponseHandler::deliver( void EnumerateInstanceNamesResponseHandler::deliver(
Line 510 
Line 471 
         throw CIMException(CIM_ERR_FAILED, message);         throw CIMException(CIM_ERR_FAILED, message);
     }     }
  
 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION  
     SimpleObjectPathResponseHandler::deliver(     SimpleObjectPathResponseHandler::deliver(
         _normalizer.processInstanceObjectPath(cimObjectPath));         _normalizer.processInstanceObjectPath(cimObjectPath));
 #else  
     SimpleObjectPathResponseHandler::deliver(cimObjectPath);  
 #endif  
 } }
  
 String EnumerateInstanceNamesResponseHandler::getClass() const String EnumerateInstanceNamesResponseHandler::getClass() const


Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2