(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.11.8.4 and 1.17

version 1.11.8.4, 2006/03/10 14:30:39 version 1.17, 2006/08/29 17:48:57
Line 38 
Line 38 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "OperationResponseHandler.h" #include "OperationResponseHandler.h"
   #include "CIMOMHandleContext.h"
  
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
   #include <Pegasus/Common/AutoPtr.h>
 #include <Pegasus/Provider/CIMOMHandle.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
 // //
Line 181 
Line 130 
  
 Boolean OperationResponseHandler::isAsync(void) const Boolean OperationResponseHandler::isAsync(void) const
 { {
     return(true);      return _responseChunkCallback != 0;
 } }
  
 // This is only called from SimpleResponseHandler.deliver() but lives in this // This is only called from SimpleResponseHandler.deliver() but lives in this
Line 334 
Line 283 
     // operation.     // operation.
     CIMClass cimClass;     CIMClass cimClass;
  
     try      if(request->operationContext.contains(CachedClassDefinitionContainer::NAME))
     {     {
         CachedClassDefinitionContainer container =         CachedClassDefinitionContainer container =
             request->operationContext.get(CachedClassDefinitionContainer::NAME);              request->operationContext.get(
                   CachedClassDefinitionContainer::NAME);
  
         cimClass = container.getClass();         cimClass = container.getClass();
     }     }
     catch(Exception &)  
     {  
         // Do nothing. Container is missing, which implies normalization is disabled  
         // for this operation.  
     }  
  
     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());
     ObjectNormalizer tmpNormalizer(     ObjectNormalizer tmpNormalizer(
Line 452 
Line 397 
     // operation.     // operation.
     CIMClass cimClass;     CIMClass cimClass;
  
     try      if(request->operationContext.contains(CachedClassDefinitionContainer::NAME))
     {     {
         CachedClassDefinitionContainer container =         CachedClassDefinitionContainer container =
             request->operationContext.get(CachedClassDefinitionContainer::NAME);              request->operationContext.get(
                   CachedClassDefinitionContainer::NAME);
         cimClass = container.getClass();         cimClass = container.getClass();
     }     }
     catch(Exception &)  
     {  
         // Do nothing. Container is missing, which implies normalization is disabled  
         // for this operation.  
     }  
  
     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());
     ObjectNormalizer tmpNormalizer(     ObjectNormalizer tmpNormalizer(
Line 523 
Line 463 
     // operation.     // operation.
     CIMClass cimClass;     CIMClass cimClass;
  
     try      if(request->operationContext.contains(CachedClassDefinitionContainer::NAME))
     {     {
         CachedClassDefinitionContainer container =         CachedClassDefinitionContainer container =
             request->operationContext.get(CachedClassDefinitionContainer::NAME);              request->operationContext.get(
                   CachedClassDefinitionContainer::NAME);
  
         cimClass = container.getClass();         cimClass = container.getClass();
     }     }
     catch(Exception &)  
     {  
         // Do nothing. Container is missing, which implies normalization is disabled  
         // for this operation.  
     }  
  
     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());     AutoPtr<NormalizerContext> tmpContext(new CIMOMHandleContext());
     ObjectNormalizer tmpNormalizer(     ObjectNormalizer tmpNormalizer(
Line 1022 
Line 958 
 EnableIndicationsResponseHandler::EnableIndicationsResponseHandler( EnableIndicationsResponseHandler::EnableIndicationsResponseHandler(
     CIMRequestMessage* request,     CIMRequestMessage* request,
     CIMResponseMessage* response,     CIMResponseMessage* response,
     CIMInstance& provider,      const CIMInstance& provider,
     PEGASUS_INDICATION_CALLBACK_T indicationCallback,     PEGASUS_INDICATION_CALLBACK_T indicationCallback,
     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)     PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)
     : OperationResponseHandler(request, response, responseChunkCallback),     : OperationResponseHandler(request, response, responseChunkCallback),
Line 1059 
Line 995 
     //  Get list of subscription instance names from context     //  Get list of subscription instance names from context
     Array<CIMObjectPath> subscriptionInstanceNames;     Array<CIMObjectPath> subscriptionInstanceNames;
  
     try      if(context.contains(SubscriptionInstanceNamesContainer::NAME))
     {     {
         SubscriptionInstanceNamesContainer container =         SubscriptionInstanceNamesContainer container =
             context.get(SubscriptionInstanceNamesContainer::NAME);             context.get(SubscriptionInstanceNamesContainer::NAME);
  
         subscriptionInstanceNames = container.getInstanceNames();         subscriptionInstanceNames = container.getInstanceNames();
     }     }
     catch(Exception &)      else
     {     {
         subscriptionInstanceNames.clear();         subscriptionInstanceNames.clear();
     }     }
Line 1074 
Line 1010 
     // l10n     // l10n
     ContentLanguageList contentLangs;     ContentLanguageList contentLangs;
  
     try      if(context.contains(ContentLanguageListContainer::NAME))
     {     {
         // Get the Content-Language for this indication.  The provider         // Get the Content-Language for this indication.  The provider
         // does not have to add specify a language for the indication.         // does not have to add specify a language for the indication.
Line 1083 
Line 1019 
  
         contentLangs = langContainer.getLanguages();         contentLangs = langContainer.getLanguages();
     }     }
     catch(Exception &)      else
     {     {
         // The provider did not explicitly set a Content-Language for         // The provider did not explicitly set a Content-Language for
         // the indication.  Fall back to the lang set in this object.         // the indication.  Fall back to the lang set in this object.
Line 1104 
Line 1040 
  
     request->operationContext = context;     request->operationContext = context;
  
     try      if(request->operationContext.contains(ContentLanguageListContainer::NAME))
     {     {
         request->operationContext.set(ContentLanguageListContainer(contentLangs));         request->operationContext.set(ContentLanguageListContainer(contentLangs));
     }     }
     catch(Exception &)      else
     {     {
         request->operationContext.insert(ContentLanguageListContainer(contentLangs));         request->operationContext.insert(ContentLanguageListContainer(contentLangs));
     }     }


Legend:
Removed from v.1.11.8.4  
changed lines
  Added in v.1.17

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2