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

Diff for /pegasus/src/Pegasus/ControlProviders/ConfigSettingProvider/ConfigSettingProvider.cpp between version 1.25 and 1.26

version 1.25, 2004/06/09 16:08:29 version 1.26, 2004/06/17 18:26:06
Line 61 
Line 61 
 #include <Pegasus/Provider/CIMInstanceProvider.h> #include <Pegasus/Provider/CIMInstanceProvider.h>
 #include <Pegasus/Common/ResponseHandler.h> #include <Pegasus/Common/ResponseHandler.h>
 #include <Pegasus/Common/MessageLoader.h> //l10n #include <Pegasus/Common/MessageLoader.h> //l10n
   #include <Pegasus/Common/ModuleController.h>
   #include <Pegasus/Common/CIMMessage.h>
   #include <Pegasus/Common/AutoPtr.h>
   
  
 PEGASUS_USING_STD; PEGASUS_USING_STD;
  
Line 356 
Line 360 
                         MessageLoaderParms("ControlProviders.ConfigSettingProvider.ConfigSettingProvider.UPDATE_CURRENT_VALUE_FAILED",                         MessageLoaderParms("ControlProviders.ConfigSettingProvider.ConfigSettingProvider.UPDATE_CURRENT_VALUE_FAILED",
                                                            "Failed to update the current value."));                                                            "Failed to update the current value."));
                 }                 }
   
                   // It is unset, get current value which is default
                   if (currentValueIsNull)
                   {
                       currentValue = _configManager->getCurrentValue(
                           configPropertyName);
                   }
   
                   // send notify config change message to ProviderManager Service
                   _sendNotifyConfigChangeMessage(configPropertyName,
                                                  currentValue,
                                                  true);
             }             }
  
             //             //
Line 377 
Line 393 
                         MessageLoaderParms("ControlProviders.ConfigSettingProvider.ConfigSettingProvider.UPDATE_PLANNED_VALUE_FAILED",                         MessageLoaderParms("ControlProviders.ConfigSettingProvider.ConfigSettingProvider.UPDATE_PLANNED_VALUE_FAILED",
                                                            "Failed to update the planned value."));                                                            "Failed to update the planned value."));
                 }                 }
   
                   // It is unset, get planned value which is default
                   if (plannedValueIsNull)
                   {
                       plannedValue = _configManager->getPlannedValue(
                           configPropertyName);
                   }
   
                   // send notify config change message to ProviderManager Service
                   _sendNotifyConfigChangeMessage(configPropertyName,
                                                  plannedValue,
                                                  false);
             }             }
         }         }
         catch (NonDynamicConfigProperty& ndcp)         catch (NonDynamicConfigProperty& ndcp)
Line 578 
Line 606 
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
     }     }
  
   //
   // send notify config change message to provider manager service
   //
   void ConfigSettingProvider::_sendNotifyConfigChangeMessage(
       const String& propertyName,
       const String& newPropertyValue,
       Boolean currentValueModified)
   {
       PEG_METHOD_ENTER(TRC_CONFIG,
           "ConfigSettingProvider::_sendNotifyConfigChangeMessage");
   
       pegasus_internal_identity _id = peg_credential_types::PROVIDER;
       ModuleController * _controller;
       ModuleController::client_handle *_client_handle;
   
       _controller = &(ModuleController::get_client_handle(_id, &_client_handle));
       if(_client_handle == NULL)
       {
           PEG_METHOD_EXIT();
           throw UninitializedObjectException();
       }
   
       MessageQueue * queue = MessageQueue::lookup(
           PEGASUS_QUEUENAME_PROVIDERMANAGER_CPP);
   
       MessageQueueService * service = dynamic_cast<MessageQueueService *>(queue);
   
       if (service != NULL)
       {
           // create CIMNotifyConfigChangeRequestMessage
           CIMNotifyConfigChangeRequestMessage * notify_req =
               new CIMNotifyConfigChangeRequestMessage (
               XmlWriter::getNextMessageId (),
               propertyName,
               newPropertyValue,
               currentValueModified,
               QueueIdStack(service->getQueueId()));
   
           // create request envelope
           AsyncLegacyOperationStart asyncRequest(
               service->get_next_xid(),
               NULL,
               service->getQueueId(),
               notify_req,
               service->getQueueId());
   
           AutoPtr<AsyncReply> asyncReply(
               _controller->ClientSendWait(*_client_handle,
               service->getQueueId(),
               &asyncRequest));
   
           AutoPtr<CIMNotifyConfigChangeResponseMessage> response(
               reinterpret_cast<CIMNotifyConfigChangeResponseMessage *>(
               (static_cast<AsyncLegacyOperationResult *>
               (asyncReply.get()))->get_result()));
   
           if (response->cimException.getCode() != CIM_ERR_SUCCESS)
           {
               CIMException e = response->cimException;
               throw (e);
           }
       }
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


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