(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.10 and 1.5.2.11

version 1.5.2.10, 2013/09/14 23:08:17 version 1.5.2.11, 2013/09/23 13:55:57
Line 51 
Line 51 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   // Defines debug code in CIMResponseData.  This under this
   // special compile flag so that it can be compiled independent of
   // PEGASUS_DEBUG flags.
   #define CIMRESPONSEDATA_DEBUG
   
 #define LOCAL_MIN(a, b) ((a < b) ? a : b) #define LOCAL_MIN(a, b) ((a < b) ? a : b)
 // C++ objects interface handling // C++ objects interface handling
  
 // KS_TODO Remove this completely when finished testing. // KS_TODO Remove this completely when finished testing.
 bool CIMResponseData::sizeValid() bool CIMResponseData::sizeValid()
 { {
     TRACELINE;      PEGASUS_DEBUG_ASSERT(valid());
   #ifdef CIMRESPONSEDATA_DEBUG
     PEGASUS_ASSERT(valid());  
     if (_size > 1000000)     if (_size > 1000000)
     {     {
         TRACELINE;  
         cout << "CIMResponseData::PSVALID _size too big " << _size << endl;         cout << "CIMResponseData::PSVALID _size too big " << _size << endl;
         PEG_TRACE((TRC_XML, Tracer::LEVEL4,         PEG_TRACE((TRC_XML, Tracer::LEVEL4,
                    "CIMResponseData::PSVALID _size too big %u",_size ));                    "CIMResponseData::PSVALID _size too big %u",_size ));
         return false;         return false;
     }     }
   #endif
     PEG_TRACE((TRC_XML, Tracer::LEVEL4,     PEG_TRACE((TRC_XML, Tracer::LEVEL4,
         "CIMResponseData Size _size=%u", _size));         "CIMResponseData Size _size=%u", _size));
     return true;     return true;
Line 75 
Line 79 
 // Instance Names handling // Instance Names handling
 Array<CIMObjectPath>& CIMResponseData::getInstanceNames() Array<CIMObjectPath>& CIMResponseData::getInstanceNames()
 { {
     TRACELINE;  
     PSVALID;     PSVALID;
     PEGASUS_DEBUG_ASSERT(     PEGASUS_DEBUG_ASSERT(
     (_dataType==RESP_INSTNAMES || _dataType==RESP_OBJECTPATHS));     (_dataType==RESP_INSTNAMES || _dataType==RESP_OBJECTPATHS));
Line 91 
Line 94 
 // an empty instance. // an empty instance.
 CIMInstance& CIMResponseData::getInstance() CIMInstance& CIMResponseData::getInstance()
 { {
     TRACELINE;  
     PEGASUS_DEBUG_ASSERT(_dataType == RESP_INSTANCE);     PEGASUS_DEBUG_ASSERT(_dataType == RESP_INSTANCE);
     _resolveToCIM();     _resolveToCIM();
     if (0 == _instances.size())     if (0 == _instances.size())
Line 104 
Line 106 
 // Instances handling // Instances handling
 Array<CIMInstance>& CIMResponseData::getInstances() Array<CIMInstance>& CIMResponseData::getInstances()
 { {
     TRACELINE;  
     PEGASUS_DEBUG_ASSERT(_dataType == RESP_INSTANCES);     PEGASUS_DEBUG_ASSERT(_dataType == RESP_INSTANCES);
     _resolveToCIM();     _resolveToCIM();
     return _instances;     return _instances;
Line 119 
Line 120 
 // this keeps it working for the moment. // this keeps it working for the moment.
 Array<CIMInstance>& CIMResponseData::getInstancesFromInstancesOrObjects() Array<CIMInstance>& CIMResponseData::getInstancesFromInstancesOrObjects()
 { {
     TRACELINE;  
     if (_dataType == RESP_INSTANCES)     if (_dataType == RESP_INSTANCES)
     {     {
         _resolveToCIM();         _resolveToCIM();
Line 135 
Line 135 
         return _instances;         return _instances;
  
     }     }
     PEGASUS_DEBUG_ASSERT(false);      PEGASUS_ASSERT(false);
 } }
  
 // Objects handling // Objects handling
 Array<CIMObject>& CIMResponseData::getObjects() Array<CIMObject>& CIMResponseData::getObjects()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::getObjects");
     PEGASUS_DEBUG_ASSERT(_dataType == RESP_OBJECTS);     PEGASUS_DEBUG_ASSERT(_dataType == RESP_OBJECTS);
     _resolveToCIM();     _resolveToCIM();
       PEG_METHOD_EXIT();
     return _objects;     return _objects;
 } }
  
Line 156 
Line 157 
 // represented as SCMOInstance this returns array of SCMOInstance. // represented as SCMOInstance this returns array of SCMOInstance.
 Array<SCMOInstance>& CIMResponseData::getSCMO() Array<SCMOInstance>& CIMResponseData::getSCMO()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::getSCMO");
   
     // This function resolves to instances and so cannot handle responses to     // This function resolves to instances and so cannot handle responses to
     // the associators,etc.requests that return classes (input object path with     // the associators,etc.requests that return classes (input object path with
     // no keys). That issue is resolved however, since CIMResponseData uses the     // no keys). That issue is resolved however, since CIMResponseData uses the
Line 166 
Line 166 
     // false(instancePaths) so that this should always produce instance paths.     // false(instancePaths) so that this should always produce instance paths.
  
     _resolveToSCMO();     _resolveToSCMO();
       PEG_METHOD_EXIT();
     return _scmoInstances;     return _scmoInstances;
 } }
  
 // set an array of SCMOInstances into the response data object // set an array of SCMOInstances into the response data object
 void CIMResponseData::setSCMO(const Array<SCMOInstance>& x) void CIMResponseData::setSCMO(const Array<SCMOInstance>& x)
 { {
   
       PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::setSCMO");
     //// AutoMutex autoMut(testLock);     //// AutoMutex autoMut(testLock);
     TRACELINE;  
     PSVALID;     PSVALID;
     _scmoInstances=x;     _scmoInstances=x;
     _encoding |= RESP_ENC_SCMO;     _encoding |= RESP_ENC_SCMO;
     _size += x.size();     _size += x.size();
       PEG_METHOD_EXIT();
 } }
  
 // Binary data is just a data stream // Binary data is just a data stream
 Array<Uint8>& CIMResponseData::getBinary() Array<Uint8>& CIMResponseData::getBinary()
 { {
     TRACELINE;  
     PEGASUS_DEBUG_ASSERT(_encoding == RESP_ENC_BINARY || _encoding == 0);     PEGASUS_DEBUG_ASSERT(_encoding == RESP_ENC_BINARY || _encoding == 0);
     return _binaryData;     return _binaryData;
 } }
  
 bool CIMResponseData::setBinary(CIMBuffer& in) bool CIMResponseData::setBinary(CIMBuffer& in)
 { {
     //// AutoMutex autoMut(testLock);  
   
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::setBinary");     PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::setBinary");
       //// AutoMutex autoMut(testLock);
  
     // Append all serial data from the CIMBuffer to the local data store.     // Append all serial data from the CIMBuffer to the local data store.
     // Returns error if input not a serialized Uint8A     // Returns error if input not a serialized Uint8A
Line 212 
Line 212 
 bool CIMResponseData::setRemainingBinaryData(CIMBuffer& in) bool CIMResponseData::setRemainingBinaryData(CIMBuffer& in)
 { {
     //// AutoMutex autoMut(testLock);     //// AutoMutex autoMut(testLock);
   
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::setRemainingBinaryData");     PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::setRemainingBinaryData");
  
     // Append any data that has not been deserialized already from     // Append any data that has not been deserialized already from
Line 229 
Line 227 
 bool CIMResponseData::setXml(CIMBuffer& in) bool CIMResponseData::setXml(CIMBuffer& in)
 { {
     //// AutoMutex autoMut(testLock);     //// AutoMutex autoMut(testLock);
     TRACELINE;  
     PSVALID;     PSVALID;
     switch (_dataType)     switch (_dataType)
     {     {
Line 370 
Line 367 
         case RESP_OBJECTPATHS:         case RESP_OBJECTPATHS:
         default:         default:
         {         {
             PEGASUS_DEBUG_ASSERT(false);              PEGASUS_ASSERT(false);
         }         }
     }     }
     _encoding |= RESP_ENC_XML;     _encoding |= RESP_ENC_XML;
Line 384 
Line 381 
 // that the from object is not used during the move. // that the from object is not used during the move.
 Uint32 CIMResponseData::moveObjects(CIMResponseData & from, Uint32 count) Uint32 CIMResponseData::moveObjects(CIMResponseData & from, Uint32 count)
 { {
       PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::moveObjects");
   
     //// AutoMutex autoMut(testLock);     //// AutoMutex autoMut(testLock);
  
     PEG_METHOD_ENTER(TRC_DISPATCHER, "CIMResponseData::moveObjects");  
     TRACELINE;  
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "CIMResponseData::move(%u)", count));         "CIMResponseData::move(%u)", count));
  
     PEGASUS_ASSERT(valid());                 // KS_TEMP      PEGASUS_DEBUG_ASSERT(valid());                 // KS_TEMP
     PEGASUS_ASSERT(_size == 0);    // Validate that to size == 0 or fix below      PEGASUS_DEBUG_ASSERT(_size == 0);    // Validate size == 0 or fix below
     if (_dataType != from._dataType)         // KS_TEMP  
     {  
         printf("ERROR moveObjects _dataType %u. from._dataType %u\n",  
         _dataType, from._dataType);  
     }  
     PEGASUS_DEBUG_ASSERT(_dataType == from._dataType);     PEGASUS_DEBUG_ASSERT(_dataType == from._dataType);
   
     Uint32 rtnSize = 0;     Uint32 rtnSize = 0;
     Uint32 toMove = count;     Uint32 toMove = count;
  
Line 411 
Line 404 
                 break;                 break;
             case RESP_INSTANCE:             case RESP_INSTANCE:
                 {                 {
                     //// TODO fix this Uint32 moveCount = toMove;  
                     if (from._instanceData.size() > 0)                     if (from._instanceData.size() > 0)
                     {                     {
                         // temp test to assure all sizes are the same.                         // temp test to assure all sizes are the same.
                         PEGASUS_ASSERT(from._hostsData.size() ==                          PEGASUS_DEBUG_ASSERT(from._hostsData.size() ==
                                         from._instanceData.size());                                         from._instanceData.size());
                         PEGASUS_ASSERT(from._referencesData.size() ==                          PEGASUS_DEBUG_ASSERT(from._referencesData.size() ==
                                         from._instanceData.size());                                         from._instanceData.size());
                         PEGASUS_ASSERT(from._nameSpacesData.size() ==                          PEGASUS_DEBUG_ASSERT(from._nameSpacesData.size() ==
                                         from._instanceData.size());                                         from._instanceData.size());
                         _instanceData.append(from._instanceData.getData(),1);                         _instanceData.append(from._instanceData.getData(),1);
                         from._instanceData.remove(0, 1);                         from._instanceData.remove(0, 1);
Line 444 
Line 436 
                 }                 }
                 break;                 break;
  
             // KS-TODO The above should probably be folded into the following.              // KS-TODO The above could probably be folded into the following.
             // Need something like an assert if there is ever more than             // Need something like an assert if there is ever more than
             // one instance in _instanceData for type RESP_INSTANCE             // one instance in _instanceData for type RESP_INSTANCE
             case RESP_INSTANCES:             case RESP_INSTANCES:
Line 453 
Line 445 
                     Uint32 moveCount = LOCAL_MIN(toMove,                     Uint32 moveCount = LOCAL_MIN(toMove,
                                                  from._instanceData.size());                                                  from._instanceData.size());
  
                     PEGASUS_ASSERT(from._referencesData.size() ==                      PEGASUS_DEBUG_ASSERT(from._referencesData.size() ==
                                     from._instanceData.size());                                     from._instanceData.size());
                     _instanceData.append(from._instanceData.getData(),                     _instanceData.append(from._instanceData.getData(),
                                          moveCount);                                          moveCount);
Line 470 
Line 462 
     }     }
     if (RESP_ENC_BINARY == (from._encoding & RESP_ENC_BINARY))     if (RESP_ENC_BINARY == (from._encoding & RESP_ENC_BINARY))
     {     {
         // KS_PULL TBD Add binary move function  
         // 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. Concluded that we do not
           // want to do that since cost higher than gain.  Therefore we do
           // not allow this option.  Should only mean that provider agent
           // cannot generate binary for pull operations.
         rtnSize += 0;         rtnSize += 0;
         PEGASUS_ASSERT(false);         PEGASUS_ASSERT(false);
     }     }
Line 538 
Line 532 
     _size += rtnSize;     _size += rtnSize;
     from._size -= rtnSize;     from._size -= rtnSize;
  
       //// KS_TODO diagnostic that we should be able to remove
     if (rtnSize != _size)     if (rtnSize != _size)
     {     {
         PEG_TRACE((TRC_XML, Tracer::LEVEL1,         PEG_TRACE((TRC_XML, Tracer::LEVEL1,
Line 557 
Line 552 
 Uint32 CIMResponseData::size() Uint32 CIMResponseData::size()
 { {
     AutoMutex autoMut(testLock);     AutoMutex autoMut(testLock);
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_XML,"CIMResponseData::size()");     PEG_METHOD_ENTER(TRC_XML,"CIMResponseData::size()");
     PSVALID;     PSVALID;
 // If debug mode, add up all the individual size components to // If debug mode, add up all the individual size components to
Line 567 
Line 561 
 // but there are many sources of size info and we need to be sure we // but there are many sources of size info and we need to be sure we
 // have covered them all. // have covered them all.
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
     PEGASUS_ASSERT(valid());            //KS_TEMP KS_TODO      PEGASUS_DEBUG_ASSERT(valid());            //KS_TEMP KS_TODO
  
     Uint32 rtnSize = 0;     Uint32 rtnSize = 0;
     TEMPLOG;     TEMPLOG;
Line 656 
Line 650 
 // target array // target array
 void CIMResponseData::appendResponseData(const CIMResponseData & x) void CIMResponseData::appendResponseData(const CIMResponseData & x)
 { {
       PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::appendResponseData");
     //// AutoMutex autoMut(testLock);     //// AutoMutex autoMut(testLock);
     TRACELINE;  
     // 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
  
     PEGASUS_ASSERT(valid());            // KS_TEMP      PEGASUS_DEBUG_ASSERT(valid());            // KS_TEMP
     PEGASUS_DEBUG_ASSERT(_dataType == x._dataType);     PEGASUS_DEBUG_ASSERT(_dataType == x._dataType);
     _encoding |= x._encoding;     _encoding |= x._encoding;
  
Line 691 
Line 685 
  
     // transfer property list     // transfer property list
     _propertyList = x._propertyList;     _propertyList = x._propertyList;
   
       PEG_METHOD_EXIT();
 } }
  
 // Encoding responses into output format // Encoding responses into output format
 void CIMResponseData::encodeBinaryResponse(CIMBuffer& out) void CIMResponseData::encodeBinaryResponse(CIMBuffer& out)
 { {
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::encodeBinaryResponse");         "CIMResponseData::encodeBinaryResponse");
  
Line 750 
Line 745 
             }             }
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 762 
Line 757 
     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))     if (RESP_ENC_XML == (_encoding & RESP_ENC_XML))
     {     {
         // This actually should not happen following general code logic         // This actually should not happen following general code logic
         PEGASUS_DEBUG_ASSERT(false);          PEGASUS_ASSERT(false);
     }     }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 770 
Line 765 
  
 void CIMResponseData::completeNamespace(const SCMOInstance * x) void CIMResponseData::completeNamespace(const SCMOInstance * x)
 { {
     TRACELINE;  
     const char * ns;     const char * ns;
     Uint32 len;     Uint32 len;
     ns = x->getNameSpace_l(len);     ns = x->getNameSpace_l(len);
Line 846 
Line 840 
             }             }
         }         }
     }     }
   
     if (RESP_ENC_SCMO == (_encoding & RESP_ENC_SCMO))     if (RESP_ENC_SCMO == (_encoding & RESP_ENC_SCMO))
     {     {
         for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)         for (Uint32 j = 0, n = _scmoInstances.size(); j < n; j++)
Line 863 
Line 858 
     const String & hn,     const String & hn,
     const CIMNamespaceName & ns)     const CIMNamespaceName & ns)
 { {
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::completeHostNameAndNamespace");         "CIMResponseData::completeHostNameAndNamespace");
  
     PEGASUS_ASSERT(valid());            // KS_TEMP      PEGASUS_DEBUG_ASSERT(valid());            // KS_TEMP
  
     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))     if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY))
     {     {
Line 941 
Line 935 
                 {                 {
                     CIMObjectPath& p = _instanceNames[j];                     CIMObjectPath& p = _instanceNames[j];
                     if (p.getHost().size() == 0)                     if (p.getHost().size() == 0)
                       {
                         p.setHost(hn);                         p.setHost(hn);
                       }
                     if (p.getNameSpace().isNull())                     if (p.getNameSpace().isNull())
                       {
                         p.setNameSpace(ns);                         p.setNameSpace(ns);
                 }                 }
                   }
                 break;                 break;
             }             }
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 983 
Line 981 
             }             }
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 995 
Line 993 
 // are one of the pull responses or not // are one of the pull responses or not
 void CIMResponseData::encodeXmlResponse(Buffer& out, Boolean isPullResponse) void CIMResponseData::encodeXmlResponse(Buffer& out, Boolean isPullResponse)
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::encodeXmlResponse");
  
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "CIMResponseData::encodeXmlResponse(encoding=%X,dataType=%X)",          "CIMResponseData::encodeXmlResponse(encoding=%X,dataType=%X, pull=)",
         _encoding,         _encoding,
         _dataType));          _dataType,
           (isPullResponse? "true" : "false")));
  
     // already existing Internal XML does not need to be encoded further     // already existing Internal XML does not need to be encoded further
     // binary input is not actually impossible here, but we have an established     // binary input is not actually impossible here, but we have an established
Line 1078 
Line 1078 
             case RESP_OBJECTPATHS:             case RESP_OBJECTPATHS:
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 1197 
Line 1197 
             }             }
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 1313 
Line 1313 
             }             }
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
   
       PEG_METHOD_EXIT();
 } }
  
 // contrary to encodeXmlResponse this function encodes the Xml in a format // contrary to encodeXmlResponse this function encodes the Xml in a format
 // not usable by clients // not usable by clients
 void CIMResponseData::encodeInternalXmlResponse(CIMBuffer& out) void CIMResponseData::encodeInternalXmlResponse(CIMBuffer& out)
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::encodeInternalXmlResponse");
   
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "CIMResponseData::encodeInternalXmlResponse(encoding=%X,content=%X)",         "CIMResponseData::encodeInternalXmlResponse(encoding=%X,content=%X)",
         _encoding,         _encoding,
Line 1401 
Line 1405 
             case RESP_OBJECTPATHS:             case RESP_OBJECTPATHS:
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
Line 1455 
Line 1459 
             case RESP_OBJECTPATHS:             case RESP_OBJECTPATHS:
             default:             default:
             {             {
                 PEGASUS_DEBUG_ASSERT(false);                  PEGASUS_ASSERT(false);
             }             }
         }         }
     }     }
       PEG_METHOD_EXIT();
 } }
  
 void CIMResponseData::_resolveToCIM() void CIMResponseData::_resolveToCIM()
 { {
     TRACELINE;  
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "CIMResponseData::_resolveToCIM(encoding=%X,content=%X)",         "CIMResponseData::_resolveToCIM(encoding=%X,content=%X)",
         _encoding,         _encoding,
Line 1488 
Line 1491 
  
 void CIMResponseData::_resolveToSCMO() void CIMResponseData::_resolveToSCMO()
 { {
     TRACELINE;  
     PEG_TRACE((TRC_XML, Tracer::LEVEL3,     PEG_TRACE((TRC_XML, Tracer::LEVEL3,
         "CIMResponseData::_resolveToSCMO(encoding=%X,content=%X)",         "CIMResponseData::_resolveToSCMO(encoding=%X,content=%X)",
         _encoding,         _encoding,
Line 1514 
Line 1516 
 // avoided whenever possible // avoided whenever possible
 void CIMResponseData::_resolveBinary() void CIMResponseData::_resolveBinary()
 { {
     TRACELINE;  
     PEG_METHOD_ENTER(TRC_DISPATCHER,     PEG_METHOD_ENTER(TRC_DISPATCHER,
         "CIMResponseData::_resolveBinary");         "CIMResponseData::_resolveBinary");
  
Line 1610 
Line 1611 
                 }                 }
                 default:                 default:
                 {                 {
                     PEGASUS_DEBUG_ASSERT(false);                      PEGASUS_ASSERT(false);
                 }                 }
             } // switch             } // switch
             _encoding |= RESP_ENC_CIM;             _encoding |= RESP_ENC_CIM;
Line 1630 
Line 1631 
  
 void CIMResponseData::_deserializeObject(Uint32 idx,CIMObject& cimObject) void CIMResponseData::_deserializeObject(Uint32 idx,CIMObject& cimObject)
 { {
   
       PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_deserializeObject");
     // Only start the parser when instance data is present.     // Only start the parser when instance data is present.
     if (0 != _instanceData[idx].size())     if (0 != _instanceData[idx].size())
     {     {
Line 1652 
Line 1656 
         PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1,         PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1,
             "Failed to resolve XML object data, parser error!");             "Failed to resolve XML object data, parser error!");
     }     }
       PEG_METHOD_EXIT();
 } }
  
 void CIMResponseData::_deserializeInstance(Uint32 idx,CIMInstance& cimInstance) void CIMResponseData::_deserializeInstance(Uint32 idx,CIMInstance& cimInstance)
 { {
       PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_deserializeInstance");
     // Only start the parser when instance data is present.     // Only start the parser when instance data is present.
     if (0 != _instanceData[idx].size())     if (0 != _instanceData[idx].size())
     {     {
Line 1670 
Line 1677 
     // reset instance when parsing may not be successfull or     // reset instance when parsing may not be successfull or
     // no instance is present.     // no instance is present.
     cimInstance = CIMInstance();     cimInstance = CIMInstance();
   
       PEG_METHOD_EXIT();
 } }
  
 Boolean CIMResponseData::_deserializeReference( Boolean CIMResponseData::_deserializeReference(
Line 1728 
Line 1737 
  
 void CIMResponseData::_resolveXmlToCIM() void CIMResponseData::_resolveXmlToCIM()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_resolveXmlToCIM");
   
     switch (_dataType)     switch (_dataType)
     {     {
         // Xml encoding for instance names and object paths not used         // Xml encoding for instance names and object paths not used
Line 1787 
Line 1798 
         }         }
         default:         default:
         {         {
             PEGASUS_DEBUG_ASSERT(false);              PEGASUS_ASSERT(false);
         }         }
     }     }
     // Xml was resolved, release Xml content now     // Xml was resolved, release Xml content now
Line 1799 
Line 1810 
     _encoding &=(~RESP_ENC_XML);     _encoding &=(~RESP_ENC_XML);
     // add CIM Encoding flag     // add CIM Encoding flag
     _encoding |=RESP_ENC_CIM;     _encoding |=RESP_ENC_CIM;
   
       PEG_METHOD_EXIT();
 } }
  
 void CIMResponseData::_resolveXmlToSCMO() void CIMResponseData::_resolveXmlToSCMO()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_resolveXmlToSCMO");
     // Not optimal, can probably be improved     // Not optimal, can probably be improved
     // but on the other hand, since using the binary format this case should     // but on the other hand, since using the binary format this case should
     // actually not ever happen.     // actually not ever happen.
     _resolveXmlToCIM();     _resolveXmlToCIM();
     _resolveCIMToSCMO();     _resolveCIMToSCMO();
   
       PEG_METHOD_EXIT();
 } }
  
 void CIMResponseData::_resolveSCMOToCIM() void CIMResponseData::_resolveSCMOToCIM()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_resolveSCMOToCIM");
     switch(_dataType)     switch(_dataType)
     {     {
         case RESP_INSTNAMES:         case RESP_INSTNAMES:
Line 1859 
Line 1876 
         }         }
         default:         default:
         {         {
             PEGASUS_DEBUG_ASSERT(false);              PEGASUS_ASSERT(false);
         }         }
     }     }
     _scmoInstances.clear();     _scmoInstances.clear();
Line 1867 
Line 1884 
     _encoding &=(~RESP_ENC_SCMO);     _encoding &=(~RESP_ENC_SCMO);
     // add SCMO Encoding flag     // add SCMO Encoding flag
     _encoding |=RESP_ENC_CIM;     _encoding |=RESP_ENC_CIM;
   
       PEG_METHOD_EXIT();
 } }
  
 void CIMResponseData::_resolveCIMToSCMO() void CIMResponseData::_resolveCIMToSCMO()
 { {
     TRACELINE;      PEG_METHOD_ENTER(TRC_DISPATCHER,
           "CIMResponseData::_resolveCIMToSCMO");
     CString nsCString=_defaultNamespace.getString().getCString();     CString nsCString=_defaultNamespace.getString().getCString();
     const char* _defNamespace = nsCString;     const char* _defNamespace = nsCString;
     Uint32 _defNamespaceLen;     Uint32 _defNamespaceLen;
Line 1957 
Line 1977 
         }         }
         default:         default:
         {         {
             PEGASUS_DEBUG_ASSERT(false);              PEGASUS_ASSERT(false);
         }         }
     }     }
  
Line 1965 
Line 1985 
     _encoding &=(~RESP_ENC_CIM);     _encoding &=(~RESP_ENC_CIM);
     // add SCMO Encoding flag     // add SCMO Encoding flag
     _encoding |=RESP_ENC_SCMO;     _encoding |=RESP_ENC_SCMO;
   
       PEG_METHOD_EXIT();
 } }
  
 /** /**
Line 1984 
Line 2006 
     const Boolean includeClassOrigin,     const Boolean includeClassOrigin,
     const CIMPropertyList& propertyList)     const CIMPropertyList& propertyList)
 { {
     TRACELINE;  
     _includeQualifiers = includeQualifiers;     _includeQualifiers = includeQualifiers;
     _includeClassOrigin = includeClassOrigin;     _includeClassOrigin = includeClassOrigin;
     _propertyList = propertyList;     _propertyList = propertyList;


Legend:
Removed from v.1.5.2.10  
changed lines
  Added in v.1.5.2.11

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2