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

Diff for /pegasus/src/Pegasus/Common/CIMResponseData.cpp between version 1.5 and 1.9.2.1

version 1.5, 2011/01/07 02:17:20 version 1.9.2.1, 2012/05/25 13:04:22
Line 311 
Line 311 
 { {
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::encodeBinaryResponse");         "CIMResponseData::encodeBinaryResponse");
   
     // Need to do a complete job here by transferring all contained data     // Need to do a complete job here by transferring all contained data
     // into binary format and handing it out in the CIMBuffer     // into binary format and handing it out in the CIMBuffer
     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))
Line 402 
Line 401 
                         p.setNameSpace(nsName);                         p.setNameSpace(nsName);
                     }                     }
                 }                 }
                   break;
             }             }
             case RESP_INSTANCES:             case RESP_INSTANCES:
             {             {
Line 548 
Line 548 
                 for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)                 for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)
                 {                 {
                     SCMOInstance & scmoInst=_scmoInstances[j];                     SCMOInstance & scmoInst=_scmoInstances[j];
                     if (0 == scmoInst.getHostName())                      scmoInst.completeHostNameAndNamespace(
                     {                          hnChars,
                         scmoInst.setHostName_l(hnChars,hnLen);                          hnLen,
                     }                          nsChars,
                     if (0 == scmoInst.getNameSpace())                          nsLen);
                     {  
                         scmoInst.setNameSpace_l(nsChars,nsLen);  
                     }  
                 }                 }
                 break;                 break;
             }             }
Line 581 
Line 578 
     {     {
         _resolveBinary();         _resolveBinary();
     }     }
   
     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))
     {     {
         switch (_dataType)         switch (_dataType)
Line 658 
Line 654 
             {             {
                 if (_instances.size() > 0)                 if (_instances.size() > 0)
                 {                 {
                     XmlWriter::appendInstanceElement(out, _instances[0]);                      XmlWriter::appendInstanceElement(
                           out,
                           _instances[0],
                           _includeQualifiers,
                           _includeClassOrigin,
                           _propertyList);
                 }                 }
                 break;                 break;
             }             }
Line 667 
Line 668 
                 for (Uint32 i = 0, n = _instances.size(); i < n; i++)                 for (Uint32 i = 0, n = _instances.size(); i < n; i++)
                 {                 {
                     XmlWriter::appendValueNamedInstanceElement(                     XmlWriter::appendValueNamedInstanceElement(
                         out, _instances[i]);                          out,
                           _instances[i],
                           _includeQualifiers,
                           _includeClassOrigin,
                           _propertyList);
                 }                 }
                 break;                 break;
             }             }
Line 677 
Line 682 
                 {                 {
                     XmlWriter::appendValueObjectWithPathElement(                     XmlWriter::appendValueObjectWithPathElement(
                         out,                         out,
                         _objects[i]);                          _objects[i],
                           _includeQualifiers,
                           _includeClassOrigin,
                           _propertyList);
                 }                 }
                 break;                 break;
             }             }
Line 711 
Line 719 
                     SCMOXmlWriter::appendInstanceNameElement(                     SCMOXmlWriter::appendInstanceNameElement(
                         out,                         out,
                         _scmoInstances[i]);                         _scmoInstances[i]);
   
                 }                 }
                 break;                 break;
             }             }
Line 718 
Line 727 
             {             {
                 if (_scmoInstances.size() > 0)                 if (_scmoInstances.size() > 0)
                 {                 {
                     SCMOXmlWriter::appendInstanceElement(out,_scmoInstances[0]);                      if(_propertyList.isNull())
                       {
                           Array<Uint32> emptyNodes;
                           SCMOXmlWriter::appendInstanceElement(
                               out,
                               _scmoInstances[0],
                               false,
                               emptyNodes);
                       }
                       else
                       {
                           Array<propertyFilterNodesArray_t> propFilterNodesArrays;
                           // This searches for an already created array of nodes,
                           //if not found, creates it inside propFilterNodesArrays
                           const Array<Uint32> & nodes=
                               SCMOXmlWriter::getFilteredNodesArray(
                                   propFilterNodesArrays,
                                   _scmoInstances[0],
                                   _propertyList);
                           SCMOXmlWriter::appendInstanceElement(
                               out,
                               _scmoInstances[0],
                               true,
                               nodes);
                       }
                 }                 }
                 break;                 break;
             }             }
             case RESP_INSTANCES:             case RESP_INSTANCES:
             {             {
                 for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++)                  SCMOXmlWriter::appendValueSCMOInstanceElements(
                 {  
                     SCMOXmlWriter::appendValueSCMOInstanceElement(  
                         out,                         out,
                         _scmoInstances[i]);                      _scmoInstances,
                 }                      _propertyList);
                 break;                 break;
             }             }
             case RESP_OBJECTS:             case RESP_OBJECTS:
             {             {
                 for (Uint32 i = 0; i < _scmoInstances.size(); i++)  
                 {  
                     SCMOXmlWriter::appendValueObjectWithPathElement(                     SCMOXmlWriter::appendValueObjectWithPathElement(
                         out,                         out,
                         _scmoInstances[i]);                     _scmoInstances,
                 }                    _propertyList);
                 break;                 break;
             }             }
             case RESP_OBJECTPATHS:             case RESP_OBJECTPATHS:
Line 771 
Line 800 
         "CIMResponseData::encodeInternalXmlResponse(encoding=%X,content=%X)",         "CIMResponseData::encodeInternalXmlResponse(encoding=%X,content=%X)",
         _encoding,         _encoding,
         _dataType));         _dataType));
   
     // For mixed (CIM+SCMO) responses, we need to tell the receiver the     // For mixed (CIM+SCMO) responses, we need to tell the receiver the
     // total number of instances. The totalSize variable is used to keep track     // total number of instances. The totalSize variable is used to keep track
     // of this.     // of this.
Line 794 
Line 822 
                 if (0 == _instances.size())                 if (0 == _instances.size())
                 {                 {
                     _instances.append(CIMInstance());                     _instances.append(CIMInstance());
                       CIMInternalXmlEncoder::_putXMLInstance(
                           out,
                           _instances[0]);
                       break;
                 }                 }
                 CIMInternalXmlEncoder::_putXMLInstance(out, _instances[0]);                  CIMInternalXmlEncoder::_putXMLInstance(
                       out,
                       _instances[0],
                       _includeQualifiers,
                       _includeClassOrigin,
                       _propertyList);
                 break;                 break;
             }             }
             case RESP_INSTANCES:             case RESP_INSTANCES:
Line 807 
Line 844 
                 {                 {
                     CIMInternalXmlEncoder::_putXMLNamedInstance(                     CIMInternalXmlEncoder::_putXMLNamedInstance(
                         out,                         out,
                         _instances[i]);                          _instances[i],
                           _includeQualifiers,
                           _includeClassOrigin,
                           _propertyList);
                 }                 }
                 break;                 break;
             }             }
Line 818 
Line 858 
                 out.putUint32(totalSize);                 out.putUint32(totalSize);
                 for (Uint32 i = 0; i < n; i++)                 for (Uint32 i = 0; i < n; i++)
                 {                 {
                     CIMInternalXmlEncoder::_putXMLObject(out, _objects[i]);                      CIMInternalXmlEncoder::_putXMLObject(
                           out,
                           _objects[i],
                           _includeQualifiers,
                           _includeClassOrigin,
                           _propertyList);
                 }                 }
                 break;                 break;
             }             }
Line 842 
Line 887 
                 {                 {
                     _scmoInstances.append(SCMOInstance());                     _scmoInstances.append(SCMOInstance());
                 }                 }
                 SCMOInternalXmlEncoder::_putXMLInstance(out, _scmoInstances[0]);                  SCMOInternalXmlEncoder::_putXMLInstance(
                       out,
                       _scmoInstances[0],
                       _propertyList);
                 break;                 break;
             }             }
             case RESP_INSTANCES:             case RESP_INSTANCES:
Line 853 
Line 901 
                 {                 {
                     out.putUint32(n);                     out.putUint32(n);
                 }                 }
                 for (Uint32 i = 0; i < n; i++)  
                 {  
                     SCMOInternalXmlEncoder::_putXMLNamedInstance(                     SCMOInternalXmlEncoder::_putXMLNamedInstance(
                             out,                             out,
                             _scmoInstances[i]);                      _scmoInstances,
                 }                      _propertyList);
                 break;                 break;
             }             }
             case RESP_OBJECTS:             case RESP_OBJECTS:
Line 869 
Line 915 
                 {                 {
                     out.putUint32(n);                     out.putUint32(n);
                 }                 }
                 for (Uint32 i = 0; i < n; i++)  
                 {  
                     SCMOInternalXmlEncoder::_putXMLObject(                     SCMOInternalXmlEncoder::_putXMLObject(
                         out,                         out,
                         _scmoInstances[i]);                      _scmoInstances,
                 }                      _propertyList);
                 break;                 break;
             }             }
             // internal xml encoding of instance names and object paths not             // internal xml encoding of instance names and object paths not
Line 887 
Line 931 
             }             }
         }         }
     }     }
   
 } }
  
 void CIMResponseData::_resolveToCIM() void CIMResponseData::_resolveToCIM()
Line 1368 
Line 1413 
     _encoding |=RESP_ENC_SCMO;     _encoding |=RESP_ENC_SCMO;
 } }
  
   void CIMResponseData::setRequestProperties(
       const Boolean includeQualifiers,
       const Boolean includeClassOrigin,
       const CIMPropertyList& propertyList)
   {
       _includeQualifiers = includeQualifiers;
       _includeClassOrigin = includeClassOrigin;
       _propertyList = propertyList;
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2