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

Diff for /pegasus/src/Pegasus/ProviderManager2/OperationResponseHandler.h between version 1.1 and 1.3

version 1.1, 2004/03/04 09:55:38 version 1.3, 2004/06/18 07:00:29
Line 30 
Line 30 
 //              Dave Rosckes (rosckes@us.ibm.com) //              Dave Rosckes (rosckes@us.ibm.com)
 //              Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com) //              Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
 //              Adrian Schuur (schuur@de.ibm.com) //              Adrian Schuur (schuur@de.ibm.com)
   //              Seema Gupta (gseema@in.ibm.com) for PEP135
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 134 
Line 135 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
 }; };
  
Line 157 
Line 159 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 181 
Line 184 
  
         // l10n         // l10n
         getResponse()->contentLanguages = getLanguages();         getResponse()->contentLanguages = getLanguages();
           getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 211 
Line 215 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 268 
Line 273 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
 }; };
  
Line 303 
Line 309 
  
         // l10n         // l10n
         getResponse()->contentLanguages = getLanguages();         getResponse()->contentLanguages = getLanguages();
           getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 328 
Line 335 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 352 
Line 360 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 376 
Line 385 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 400 
Line 410 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
Line 434 
Line 445 
  
                 // l10n                 // l10n
                 getResponse()->contentLanguages = getLanguages();                 getResponse()->contentLanguages = getLanguages();
                   getResponse()->operationContext.set(ContentLanguageListContainer(getLanguages()));
     }     }
  
 }; };
  
  
   typedef void (*PEGASUS_INDICATION_CALLBACK)(
       CIMProcessIndicationRequestMessage*);
   
 class EnableIndicationsResponseHandler : public OperationResponseHandler, public SimpleIndicationResponseHandler class EnableIndicationsResponseHandler : public OperationResponseHandler, public SimpleIndicationResponseHandler
 { {
 public: public:
Line 446 
Line 461 
         CIMEnableIndicationsRequestMessage * request,         CIMEnableIndicationsRequestMessage * request,
         CIMEnableIndicationsResponseMessage * response,         CIMEnableIndicationsResponseMessage * response,
         CIMInstance & provider,         CIMInstance & provider,
         MessageQueueService * source,          PEGASUS_INDICATION_CALLBACK indicationCallback)
         MessageQueueService * target = 0)  
     : OperationResponseHandler(request, response),     : OperationResponseHandler(request, response),
         _source(source),  
         _target(target),  
         _request_copy(*request),         _request_copy(*request),
         _response_copy(*response)          _response_copy(*response),
           _indicationCallback(indicationCallback)
     {     {
         PEGASUS_ASSERT(_source != 0);  
   
         _provider = provider;         _provider = provider;
   
         // get indication service  
         if(_target == 0)  
         {  
             Array<Uint32> serviceIds;  
   
             _source->find_services(PEGASUS_QUEUENAME_INDICATIONSERVICE, 0, 0, &serviceIds);  
   
             PEGASUS_ASSERT(serviceIds.size() != 0);  
   
             _target = dynamic_cast<MessageQueueService *>(MessageQueue::lookup(serviceIds[0]));  
   
             PEGASUS_ASSERT(_target != 0);  
         }  
     }     }
  
     virtual void deliver(const CIMIndication & cimIndication)     virtual void deliver(const CIMIndication & cimIndication)
Line 504 
Line 501 
             subscriptionInstanceNames =             subscriptionInstanceNames =
                 container.getInstanceNames();                 container.getInstanceNames();
         }         }
         catch (Exception& e)          catch (Exception&)
         {         {
             subscriptionInstanceNames.clear();             subscriptionInstanceNames.clear();
         }         }
Line 519 
Line 516 
                                 (ContentLanguageListContainer::NAME);                                 (ContentLanguageListContainer::NAME);
  
                         contentLangs = langContainer.getLanguages();                         contentLangs = langContainer.getLanguages();
                 } catch (Exception & e)          }
           catch (Exception&)
                 {                 {
                         // 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 536 
Line 534 
             cimInstance,             cimInstance,
             subscriptionInstanceNames,             subscriptionInstanceNames,
             _provider,             _provider,
             QueueIdStack(_target->getQueueId(), _source->getQueueId()),              QueueIdStack(),  // Must be filled in by the callback function
             contentLangs);             contentLangs);
         request->operationContext = context;         request->operationContext = context;
  
         // send message          _indicationCallback(request);
         // <<< Wed Apr 10 21:04:00 2002 mdd >>>  
         // AsyncOpNode * op = _source->get_op();  
   
         AsyncLegacyOperationStart * asyncRequest =  
             new AsyncLegacyOperationStart(  
             _source->get_next_xid(),  
             0,  
             _target->getQueueId(),  
             request,  
             _target->getQueueId());  
   
         PEGASUS_ASSERT(asyncRequest != 0);  
   
         //AsyncReply * asyncReply = _source->SendWait(asyncRequest);  
         // <<< Wed Apr 10 21:04:50 2002 mdd >>>  
         _source->SendForget(asyncRequest);  
         //PEGASUS_ASSERT(asyncReply != 0);  
   
         //  Chip - receiver of the request should delete it  
         //delete asyncRequest;  
         // <<< Wed Apr 10 21:05:10 2002 mdd >>>  
     }     }
  
     virtual void deliver(const Array<CIMIndication> & cimIndications)     virtual void deliver(const Array<CIMIndication> & cimIndications)
Line 579 
Line 556 
         }         }
     }     }
  
 protected:  
     MessageQueueService * _source;  
     MessageQueueService * _target;  
   
 private: private:
     CIMEnableIndicationsRequestMessage _request_copy;     CIMEnableIndicationsRequestMessage _request_copy;
     CIMEnableIndicationsResponseMessage _response_copy;     CIMEnableIndicationsResponseMessage _response_copy;
       PEGASUS_INDICATION_CALLBACK _indicationCallback;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2