(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.2.26 and 1.5.2.28

version 1.5.2.26, 2014/05/10 20:19:58 version 1.5.2.28, 2014/06/01 19:26:52
Line 557 
Line 557 
     else     else
     {     {
         from._size = 0;         from._size = 0;
         //// KS_TODO Diagnostic since this should never occur  
         PEG_TRACE((TRC_XML, Tracer::LEVEL1,  
             "Size in from set to zero from= %u rtnSize= %u",  
                 from._size, rtnSize));  
     }     }
  
     //// KS_TODO diagnostic that we should be able to remove     //// KS_TODO diagnostic that we should be able to remove
Line 580 
Line 576 
 // Sets the _size variable based on the internal size counts. // Sets the _size variable based on the internal size counts.
 void CIMResponseData::setSize() void CIMResponseData::setSize()
 { {
     PEGASUS_DEBUG_ASSERT(valid());            //KS_TEMP KS_TODO      PEGASUS_DEBUG_ASSERT(valid());
  
     Uint32 rtnSize = 0;     Uint32 rtnSize = 0;
     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))
Line 670 
Line 666 
         // Cannot resolve this one without actually processing         // Cannot resolve this one without actually processing
         // the data since it is a stream.         // the data since it is a stream.
         rtnSize += 0;         rtnSize += 0;
         //  KS_TODO flag on this one  
     }     }
  
     if (RESP_ENC_SCMO == (_encoding & RESP_ENC_SCMO))     if (RESP_ENC_SCMO == (_encoding & RESP_ENC_SCMO))
Line 705 
Line 700 
          boolToString(RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))          boolToString(RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))
                               ));                               ));
     }     }
     PEG_TRACE((TRC_XML, Tracer::LEVEL1, "ReturnSize=%u", _size ));  
 #endif #endif
     return _size;     return _size;
 } }
Line 718 
Line 712 
 { {
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::appendResponseData");         "CIMResponseData::appendResponseData");
   
       PEGASUS_DEBUG_ASSERT(valid());
   
     // Confirm that the CIMResponseData type matches the type     // Confirm that the CIMResponseData type matches the type
     // of the data being appended     // of the data being appended
       // A CIMResponseData must represent a single data content type.
       // ex. Cannot mix objects and instances.
  
     PEGASUS_DEBUG_ASSERT(valid());            // KS_TEMP  
     PEGASUS_DEBUG_ASSERT(_dataType == x._dataType);     PEGASUS_DEBUG_ASSERT(_dataType == x._dataType);
     _encoding |= x._encoding;     _encoding |= x._encoding;
  
     // add all binary data     // add all binary data
     _binaryData.appendArray(x._binaryData);     _binaryData.appendArray(x._binaryData);
     // KS_TBD TODO PULL Add the counter incrementer for binary  
  
     // add all the C++ stuff     // add all the C++ stuff
     _instanceNames.appendArray(x._instanceNames);     _instanceNames.appendArray(x._instanceNames);
Line 741 
Line 738 
     _scmoInstances.appendArray(x._scmoInstances);     _scmoInstances.appendArray(x._scmoInstances);
     _size += x._scmoInstances.size();     _size += x._scmoInstances.size();
  
     // add Xml encodings  
     // KS_TODO these are temporary. delete before release  
     PEGASUS_ASSERT(x._referencesData.size() == x._instanceData.size());  
     PEGASUS_ASSERT(x._instanceData.size() == x._hostsData.size());  
     PEGASUS_ASSERT(x._instanceData.size() == x._nameSpacesData.size());  
   
     _referencesData.appendArray(x._referencesData);     _referencesData.appendArray(x._referencesData);
     _instanceData.appendArray(x._instanceData);     _instanceData.appendArray(x._instanceData);
     _hostsData.appendArray(x._hostsData);     _hostsData.appendArray(x._hostsData);
Line 928 
Line 919 
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::completeHostNameAndNamespace");         "CIMResponseData::completeHostNameAndNamespace");
  
     PEGASUS_DEBUG_ASSERT(valid());            // KS_TEMP      PEGASUS_DEBUG_ASSERT(valid());
   
     Uint32 count = 0;      //// KS_TODO this counter is just diagnostic  
  
         PEG_TRACE(( TRC_DISPATCHER, Tracer::LEVEL4,   // KS_TODO TEMP  ////  PEG_TRACE(( TRC_DISPATCHER, Tracer::LEVEL4,   // KS_TODO TEMP
           "completeHostNameAndNamespace Setting hostName, etc "  ////    "completeHostNameAndNamespace Setting hostName, etc "
           "host %s ns %s set for dataType=%u encoding=%u isPull=%s",  ////    "host %s ns %s set for dataType=%u encoding=%u isPull=%s",
               (const char *)hn.getCString(),  ////        (const char *)hn.getCString(),
               (const char *)ns.getString().getCString(),  ////        (const char *)ns.getString().getCString(),
               _dataType, _encoding, boolToString(isPullOperation) ));  ////        _dataType, _encoding, boolToString(isPullOperation) ));
  
     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))
     {     {
Line 946 
Line 935 
         // -> usage: See resolveBinary()         // -> usage: See resolveBinary()
         _defaultNamespace=ns;         _defaultNamespace=ns;
         _defaultHostname=hn;         _defaultHostname=hn;
         count++;  
     }     }
     // InternalXml does not support objectPath calls     // InternalXml does not support objectPath calls
     if ((RESP_ENC_XML == (_encoding & RESP_ENC_XML)) &&     if ((RESP_ENC_XML == (_encoding & RESP_ENC_XML)) &&
Line 957 
Line 945 
             if (0 == _hostsData[j].size())             if (0 == _hostsData[j].size())
             {             {
                 _hostsData[j]=hn;                 _hostsData[j]=hn;
                 count++;  
             }             }
             if (_nameSpacesData[j].isNull())             if (_nameSpacesData[j].isNull())
             {             {
Line 973 
Line 960 
         {         {
             if (0 == _hostsData[j].size())             if (0 == _hostsData[j].size())
             {             {
                 count++;  
                 _hostsData[j]=hn;                 _hostsData[j]=hn;
             }             }
             if (_nameSpacesData[j].isNull())             if (_nameSpacesData[j].isNull())
Line 1006 
Line 992 
                         const_cast<CIMObjectPath&>(instance.getPath());                         const_cast<CIMObjectPath&>(instance.getPath());
                     if (p.getHost().size()==0)                     if (p.getHost().size()==0)
                     {                     {
                         count++;  
                         p.setHost(hn);                         p.setHost(hn);
                     }                     }
                     if (p.getNameSpace().isNull())                     if (p.getNameSpace().isNull())
Line 1023 
Line 1008 
                         const_cast<CIMObjectPath&>(object.getPath());                         const_cast<CIMObjectPath&>(object.getPath());
                     if (p.getHost().size()==0)                     if (p.getHost().size()==0)
                     {                     {
                         count++;  
                         p.setHost(hn);                         p.setHost(hn);
                     }                     }
                     if (p.getNameSpace().isNull())                     if (p.getNameSpace().isNull())
Line 1043 
Line 1027 
                     CIMObjectPath& p = _instanceNames[j];                     CIMObjectPath& p = _instanceNames[j];
                     if (p.getHost().size() == 0)                     if (p.getHost().size() == 0)
                     {                     {
                         count++;  
                         p.setHost(hn);                         p.setHost(hn);
                     }                     }
                     if (p.getNameSpace().isNull())                     if (p.getNameSpace().isNull())
Line 1078 
Line 1061 
             {             {
                 for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)                 for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)
                 {                 {
                     count++;  
                     SCMOInstance & scmoInst=_scmoInstances[j];                     SCMOInstance & scmoInst=_scmoInstances[j];
                     scmoInst.completeHostNameAndNamespace(                     scmoInst.completeHostNameAndNamespace(
                         hnChars,                         hnChars,
Line 1094 
Line 1076 
             }             }
         }         }
     }     }
     PEG_TRACE(( TRC_DISPATCHER, Tracer::LEVEL4,   // KS_TODO TEMP  
       "completeHostNameAndNamespace Set hostName, etc count %u "  
       "host %s ns %s set for dataType=%u encoding=%u isPull=%s",  
           count,  
           (const char *)hn.getCString(),  
           (const char *)ns.getString().getCString(),  
           _dataType, _encoding, boolToString(isPullOperation) ));  
   
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 1150 
Line 1123 
                 {                 {
                     if (isPullResponse)                     if (isPullResponse)
                     {                     {
                         // KS_TODO these are temporary. delete before release  
                         PEGASUS_ASSERT(a.size() == b.size());  
                         PEGASUS_ASSERT(a.size() == _hostsData.size());  
                         PEGASUS_ASSERT(a.size() == _nameSpacesData.size());  
   
                         out << STRLIT("<VALUE.INSTANCEWITHPATH>\n");                         out << STRLIT("<VALUE.INSTANCEWITHPATH>\n");
                         out << STRLIT("<INSTANCEPATH>\n");                         out << STRLIT("<INSTANCEPATH>\n");
                         XmlWriter::appendNameSpacePathElement(out,                         XmlWriter::appendNameSpacePathElement(out,
Line 1316 
Line 1284 
                     // If pull, map to instances                     // If pull, map to instances
                     if (isPullResponse)                     if (isPullResponse)
                     {                     {
   
                         CIMInstance x = (CIMInstance)_objects[i];                         CIMInstance x = (CIMInstance)_objects[i];
                           if (encodeInstanceOnly)
                           {
                               XmlWriter::appendInstanceElement(
                                   out,
                                   x,
                                   _includeQualifiers,
                                   _includeClassOrigin,
                                   _propertyList);
                           }
                           else
                           {
                         XmlWriter::appendValueInstanceWithPathElement(                         XmlWriter::appendValueInstanceWithPathElement(
                             out,                             out,
                             x,                             x,
Line 1324 
Line 1304 
                             _includeClassOrigin,                             _includeClassOrigin,
                             _propertyList);                             _propertyList);
                     }                     }
                       }
                     else                     else
                     {                     {
                         XmlWriter::appendValueObjectWithPathElement(                         XmlWriter::appendValueObjectWithPathElement(
Line 1408 
Line 1389 
                     // OpenQueryInstances and pullInstances                     // OpenQueryInstances and pullInstances
                     if (encodeInstanceOnly)                     if (encodeInstanceOnly)
                     {                     {
                           // KS_TODO move this to SCMOXmlWriter
                         for (Uint32 i = 0, n = _scmoInstances.size();i < n; i++)                         for (Uint32 i = 0, n = _scmoInstances.size();i < n; i++)
                         {                         {
                             _appendInstanceElement(out, _scmoInstances[i]);                             _appendInstanceElement(out, _scmoInstances[i]);
Line 1430 
Line 1412 
             {             {
                 if (isPullResponse)                 if (isPullResponse)
                 {                 {
                       // if encodeInstanceOnly flag, encode objects as instances
                       // Used by OpenQueryInstances and pullInstances.
                       if (encodeInstanceOnly)
                       {
                           for (Uint32 i = 0, n = _scmoInstances.size();i < n; i++)
                           {
                               _appendInstanceElement(out, _scmoInstances[i]);
                           }
                       }
                       else
                       {
                     SCMOXmlWriter::appendValueSCMOInstanceWithPathElements(                     SCMOXmlWriter::appendValueSCMOInstanceWithPathElements(
                         out,_scmoInstances, _propertyList);                         out,_scmoInstances, _propertyList);
                 }                 }
                   }
                 else                 else
                 {                 {
                     // KS_TODO why is this one named element rather than                     // KS_TODO why is this one named element rather than
Line 2231 
Line 2225 
     _size = 0;     _size = 0;
 } }
  
 //// KS_TODO Remove. Diagnostic Displays below before commit to head  // The following are debugging support only
 void CIMResponseData::traceResponseData()  //// #ifdef PEGASUS_DEBUG
   void CIMResponseData::traceResponseData() const
 { {
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "%s", (const char*)toStringTraceResponseData().getCString() ));         "%s", (const char*)toStringTraceResponseData().getCString() ));
 } }
 String CIMResponseData::toStringTraceResponseData()  
   String CIMResponseData::toStringTraceResponseData() const
 { {
     int rtnSize;     int rtnSize;
     char *p;     char *p;
Line 2280 
Line 2276 
     free(p);     free(p);
     return(rtnStr);     return(rtnStr);
 } }
   //// #endif
  
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.5.2.26  
changed lines
  Added in v.1.5.2.28

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2