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

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.129.12.3 and 1.130

version 1.129.12.3, 2009/03/17 13:59:13 version 1.130, 2008/08/07 18:03:48
Line 31 
Line 31 
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Constants.h>  
 #include <errno.h> #include <errno.h>
 #include <cctype> #include <cctype>
 #include <cstdio> #include <cstdio>
Line 472 
Line 471 
     if (!entry.getAttributeValue("CLASSORIGIN", name))     if (!entry.getAttributeValue("CLASSORIGIN", name))
         return CIMName();         return CIMName();
  
     /* Interoperability hack to make the C++ client of OpenPegasus able  
        to deal with the wbemservices CIMOM delivered with Sun Solaris.  
        The issue is that the wbemservices delivers Xml responses with  
        CLASSORIGIN=""  
        Originally this had been reported with Bug#537.  
     */  
     if (name.size()==0)  
     {  
         return CIMName();  
     }  
   
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
         char buffer[MESSAGE_SIZE];         char buffer[MESSAGE_SIZE];
Line 494 
Line 482 
             buffer);             buffer);
         throw XmlSemanticError(lineNumber, mlParms);         throw XmlSemanticError(lineNumber, mlParms);
     }     }
     // The CIMName was already checked with legal() + String()  
     return CIMNameUnchecked(name);      return name;
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 504 
Line 492 
 // //
 //     <!ENTITY % EmbeddedObject "EmbeddedObject (object | instance) #IMPLIED"> //     <!ENTITY % EmbeddedObject "EmbeddedObject (object | instance) #IMPLIED">
 // //
 //     EmbeddedObjectAttributeType:  
 //        NO_EMBEDDED_OBJECT     = 0,  
 //        EMBEDDED_OBJECT_ATTR   = 1,  
 //        EMBEDDED_INSTANCE_ATTR = 2  
 //  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 XmlReader::EmbeddedObjectAttributeType XmlReader::getEmbeddedObjectAttribute(  String XmlReader::getEmbeddedObjectAttribute(
     Uint32 lineNumber,     Uint32 lineNumber,
     const XmlEntry& entry,     const XmlEntry& entry,
     const char* tagName)      const char* elementName)
 { {
     const char* embeddedObject;      String embeddedObject;
  
     // Check for both upper case and mixed case "EmbeddedObject"     // Check for both upper case and mixed case "EmbeddedObject"
     // because of an error in an earlier pegasus version  where we     // because of an error in an earlier pegasus version  where we
Line 524 
Line 507 
     // whereas the DMTF spec calls for mixed case.     // whereas the DMTF spec calls for mixed case.
     if (!entry.getAttributeValue("EmbeddedObject", embeddedObject) &&     if (!entry.getAttributeValue("EmbeddedObject", embeddedObject) &&
         !entry.getAttributeValue("EMBEDDEDOBJECT", embeddedObject))         !entry.getAttributeValue("EMBEDDEDOBJECT", embeddedObject))
         return NO_EMBEDDED_OBJECT;          return String();
  
     // The embeddedObject attribute, if present, must have the string     // The embeddedObject attribute, if present, must have the string
     // value "object" or "instance".     // value "object" or "instance".
     if (strcmp(embeddedObject, "object") == 0)      if (!(String::equal(embeddedObject, "object") ||
     {            String::equal(embeddedObject, "instance")))
         return EMBEDDED_OBJECT_ATTR;  
     }  
   
     if (strcmp(embeddedObject, "instance") == 0)  
     {     {
         return EMBEDDED_INSTANCE_ATTR;  
     }  
   
     char buffer[MESSAGE_SIZE];     char buffer[MESSAGE_SIZE];
     sprintf(buffer, "%s.EmbeddedObject", tagName);          sprintf(buffer, "%s.EmbeddedObject", elementName);
  
     MessageLoaderParms mlParms(     MessageLoaderParms mlParms(
         "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",         "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
         "Illegal value for $0 attribute",         "Illegal value for $0 attribute",
         buffer);         buffer);
     throw XmlSemanticError(lineNumber, mlParms);     throw XmlSemanticError(lineNumber, mlParms);
       }
  
     return NO_EMBEDDED_OBJECT;      return embeddedObject;
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 584 
Line 561 
             buffer);             buffer);
         throw XmlSemanticError(lineNumber, mlParms);         throw XmlSemanticError(lineNumber, mlParms);
     }     }
     // The CIMName was already checked with legal() + String()  
     return CIMNameUnchecked(name);      return name;
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 617 
Line 594 
             buffer);             buffer);
         throw XmlSemanticError(lineNumber, mlParms);         throw XmlSemanticError(lineNumber, mlParms);
     }     }
     // The CIMName was already checked with legal() + String()  
     return CIMNameUnchecked(superClass);      return superClass;
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 885 
Line 862 
     const char* valueString,     const char* valueString,
     CIMType type)     CIMType type)
 { {
     return stringToValue(lineNumber, valueString, strlen(valueString), type);  
 }  
   
 CIMValue XmlReader::stringToValue(  
     Uint32 lineNumber,  
     const char* valueString,  
     Uint32 valueStringLen,  
     CIMType type)  
 {  
     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):
  
     // Char string must have been null terminated.  
     PEGASUS_ASSERT (!valueString[valueStringLen]);  
   
     // Create value per type     // Create value per type
     switch (type)     switch (type)
     {     {
Line 919 
Line 884 
  
         case CIMTYPE_STRING:         case CIMTYPE_STRING:
         {         {
             return CIMValue(String(valueString, valueStringLen));              return CIMValue(String(valueString));
         }         }
  
         case CIMTYPE_CHAR16:         case CIMTYPE_CHAR16:
         {         {
             // Converts UTF-8 to UTF-16             // Converts UTF-8 to UTF-16
             String tmp(valueString, valueStringLen);              String tmp(valueString);
             if (tmp.size() != 1)             if (tmp.size() != 1)
             {             {
                 MessageLoaderParms mlParms(                 MessageLoaderParms mlParms(
Line 1058 
Line 1023 
                 // Bugzilla 137  Adds the following if line.                 // Bugzilla 137  Adds the following if line.
                 // Expect this to become permanent but test only for now                 // Expect this to become permanent but test only for now
 #ifdef PEGASUS_SNIA_INTEROP_TEST #ifdef PEGASUS_SNIA_INTEROP_TEST
                 if (valueStringLen != 0)                  if (strlen(valueString) != 0)
 #endif #endif
                     tmp.set(valueString);                     tmp.set(valueString);
             }             }
Line 1125 
Line 1090 
                 // just the value of the Embedded Object in String                 // just the value of the Embedded Object in String
                 // representation.                 // representation.
                 AutoArrayPtr<char> tmp_buffer(                 AutoArrayPtr<char> tmp_buffer(
                     new char[valueStringLen + 1]);                      new char[strlen(valueString) + 1]);
                 memcpy(tmp_buffer.get(), valueString, valueStringLen + 1);                  strcpy(tmp_buffer.get(), valueString);
                 XmlParser tmp_parser(tmp_buffer.get());                 XmlParser tmp_parser(tmp_buffer.get());
  
                 // The next bit of logic constructs a CIMObject from the                 // The next bit of logic constructs a CIMObject from the
Line 1250 
Line 1215 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
  
     const char* valueString = "";     const char* valueString = "";
     Uint32 valueStringLen = 0;  
     if (!empty)     if (!empty)
     {     {
         if (testContentOrCData(parser, entry))         if (testContentOrCData(parser, entry))
         {         {
             valueString = entry.text;             valueString = entry.text;
             valueStringLen = entry.textLen;  
         }         }
  
         expectEndTag(parser, "VALUE");         expectEndTag(parser, "VALUE");
Line 1268 
Line 1232 
     // Bugzilla tbd     // Bugzilla tbd
     if (!empty)     if (!empty)
 #endif #endif
         value = stringToValue(          value = stringToValue(parser.getLine(), valueString,type);
             parser.getLine(),  
             valueString,  
             valueStringLen,  
             type);  
  
     return true;     return true;
 } }
Line 1307 
Line 1267 
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
  
     const char* valueString = "";     const char* valueString = "";
     Uint32 valueStringLen = 0;  
  
     if (!empty)     if (!empty)
     {     {
         if (testContentOrCData(parser, entry))         if (testContentOrCData(parser, entry))
         {  
             valueString = entry.text;             valueString = entry.text;
             valueStringLen = entry.textLen;  
         }  
  
         expectEndTag(parser, "VALUE");         expectEndTag(parser, "VALUE");
     }     }
  
     str = String(valueString, valueStringLen);      str = String(valueString);
     return true;     return true;
 } }
  
Line 1389 
Line 1345 
 template<class T> template<class T>
 CIMValue StringArrayToValueAux( CIMValue StringArrayToValueAux(
     Uint32 lineNumber,     Uint32 lineNumber,
     const Array<CharString>& stringArray,      const Array<const char*>& stringArray,
     CIMType type,     CIMType type,
     T*)     T*)
 { {
Line 1398 
Line 1354 
     for (Uint32 i = 0, n = stringArray.size(); i < n; i++)     for (Uint32 i = 0, n = stringArray.size(); i < n; i++)
     {     {
         CIMValue value = XmlReader::stringToValue(         CIMValue value = XmlReader::stringToValue(
             lineNumber,              lineNumber, stringArray[i], type);
             stringArray[i].value,  
             stringArray[i].length,  
             type);  
  
         T x;         T x;
         value.get(x);         value.get(x);
Line 1416 
Line 1369 
     const Array<const char*> &array,     const Array<const char*> &array,
     CIMType type)     CIMType type)
 { {
     Array<CharString> strArray;  
   
     for (Uint32 i = 0, n = array.size() ; i < n ; ++i)  
     {  
         strArray.append(CharString(array[i], strlen(array[i])));  
     }  
   
     return _stringArrayToValue(lineNumber, strArray, type);  
 }  
   
 CIMValue XmlReader::_stringArrayToValue(  
     Uint32 lineNumber,  
     const Array<CharString> &array,  
     CIMType type)  
 {  
     switch (type)     switch (type)
     {     {
         case CIMTYPE_BOOLEAN:         case CIMTYPE_BOOLEAN:
Line 1518 
Line 1456 
     // Get VALUE.ARRAY open tag:     // Get VALUE.ARRAY open tag:
  
     XmlEntry entry;     XmlEntry entry;
     Array<CharString> stringArray;      Array<const char*> stringArray;
  
     // If no VALUE.ARRAY start tag, return false     // If no VALUE.ARRAY start tag, return false
     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.ARRAY"))     if (!testStartTagOrEmptyTag(parser, entry, "VALUE.ARRAY"))
Line 1530 
Line 1468 
  
         while (testStartTagOrEmptyTag(parser, entry, "VALUE"))         while (testStartTagOrEmptyTag(parser, entry, "VALUE"))
         {         {
             // ATTN: NULL values in array will have VALUE.NULL subelement  
             // See DSP0201 Version 2.3.0, Section 5.2.3.2  
             if (entry.type == XmlEntry::EMPTY_TAG)             if (entry.type == XmlEntry::EMPTY_TAG)
             {             {
                 stringArray.append(CharString("", 0));                  stringArray.append("");
                 continue;                 continue;
             }             }
  
             if (testContentOrCData(parser, entry))             if (testContentOrCData(parser, entry))
             {                  stringArray.append(entry.text);
                 stringArray.append(CharString(entry.text, entry.textLen));  
             }  
             else             else
             {                  stringArray.append("");
                 stringArray.append(CharString("", 0));  
             }  
             expectEndTag(parser, "VALUE");             expectEndTag(parser, "VALUE");
         }         }
  
         expectEndTag(parser, "VALUE.ARRAY");         expectEndTag(parser, "VALUE.ARRAY");
     }     }
  
     value = _stringArrayToValue(parser.getLine(), stringArray, type);      value = stringArrayToValue(parser.getLine(), stringArray, type);
     return true;     return true;
 } }
  
Line 1819 
Line 1752 
  
     // Get PROPERTY.EmbeddedObject attribute:     // Get PROPERTY.EmbeddedObject attribute:
  
     EmbeddedObjectAttributeType embeddedObject =      String embeddedObject = getEmbeddedObjectAttribute(
         getEmbeddedObjectAttribute(parser.getLine(), entry, "PROPERTY");          parser.getLine(), entry, "PROPERTY");
  
     // Get PROPERTY.TYPE attribute:     // Get PROPERTY.TYPE attribute:
  
Line 1841 
Line 1774 
     }     }
  
     Boolean embeddedObjectQualifierValue = false;     Boolean embeddedObjectQualifierValue = false;
     Uint32 ix = property.findQualifier(PEGASUS_QUALIFIERNAME_EMBEDDEDOBJECT);      Uint32 ix = property.findQualifier(CIMName("EmbeddedObject"));
     if (ix != PEG_NOT_FOUND)     if (ix != PEG_NOT_FOUND)
     {     {
         property.getQualifier(ix).getValue().get(embeddedObjectQualifierValue);         property.getQualifier(ix).getValue().get(embeddedObjectQualifierValue);
     }     }
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     String embeddedInstanceQualifierValue;     String embeddedInstanceQualifierValue;
     ix = property.findQualifier(PEGASUS_QUALIFIERNAME_EMBEDDEDINSTANCE);      ix = property.findQualifier(CIMName("EmbeddedInstance"));
     if (ix != PEG_NOT_FOUND)     if (ix != PEG_NOT_FOUND)
     {     {
         property.getQualifier(ix).getValue().get(         property.getQualifier(ix).getValue().get(
Line 1859 
Line 1792 
     // or the EmbeddedObject qualifier exists on this property with value "true"     // or the EmbeddedObject qualifier exists on this property with value "true"
     // then convert the EmbeddedObject-encoded string into a CIMObject     // then convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     Boolean isEmbeddedObject = (embeddedObject == EMBEDDED_OBJECT_ATTR) ||      Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||
         embeddedObjectQualifierValue;         embeddedObjectQualifierValue;
     Boolean isEmbeddedInstance = (embeddedObject == EMBEDDED_INSTANCE_ATTR) ||      Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance") ||
         embeddedInstanceQualifierValue.size() > 0;         embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)     if (isEmbeddedObject || isEmbeddedInstance)
     {     {
Line 1879 
Line 1812 
  
             // Copy the qualifiers from the String property to the CIMObject             // Copy the qualifiers from the String property to the CIMObject
             // property.             // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)              for (Uint32 i = 0; i < property.getQualifierCount(); ++i)
             {             {
                 // All properties are copied, including the EmbeddedObject                 // All properties are copied, including the EmbeddedObject
                 // qualifier.  This way we don't have to keep track to know                 // qualifier.  This way we don't have to keep track to know
                 // that the EmbeddedObject qualifier needs to be added back                 // that the EmbeddedObject qualifier needs to be added back
                 // during the encode step.                 // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));                  new_property.addQualifier(property.getQualifier(i));
             }             }
  
             value = new_value;             value = new_value;
Line 1900 
Line 1833 
         }         }
     }     }
 #else #else
     if ((embeddedObject == EMBEDDED_OBJECT_ATTR)|| embeddedObjectQualifierValue)      if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {     {
         // The EmbeddedObject attribute is only valid on Properties of type         // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
Line 1913 
Line 1846 
  
             // Copy the qualifiers from the String property to the CIMObject             // Copy the qualifiers from the String property to the CIMObject
             // property.             // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)              for (Uint32 i = 0; i < property.getQualifierCount(); ++i)
             {             {
                 // All properties are copied, including the EmbeddedObject                 // All properties are copied, including the EmbeddedObject
                 // qualifier.  This way we don't have to keep track to know                 // qualifier.  This way we don't have to keep track to know
                 // that the EmbeddedObject qualifier needs to be added back                 // that the EmbeddedObject qualifier needs to be added back
                 // during the encode step.                 // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));                  new_property.addQualifier(property.getQualifier(i));
             }             }
  
             value = new_value;             value = new_value;
Line 2046 
Line 1979 
  
     // Get PROPERTY.EmbeddedObject attribute:     // Get PROPERTY.EmbeddedObject attribute:
  
     EmbeddedObjectAttributeType embeddedObject = getEmbeddedObjectAttribute(      String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "PROPERTY.ARRAY");         parser.getLine(), entry, "PROPERTY.ARRAY");
  
     // Create property:     // Create property:
Line 2062 
Line 1995 
     }     }
  
     Boolean embeddedObjectQualifierValue = false;     Boolean embeddedObjectQualifierValue = false;
     Uint32 ix = property.findQualifier(PEGASUS_QUALIFIERNAME_EMBEDDEDOBJECT);      Uint32 ix = property.findQualifier(CIMName("EmbeddedObject"));
     if (ix != PEG_NOT_FOUND)     if (ix != PEG_NOT_FOUND)
     {     {
         property.getQualifier(ix).getValue().get(embeddedObjectQualifierValue);         property.getQualifier(ix).getValue().get(embeddedObjectQualifierValue);
     }     }
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     String embeddedInstanceQualifierValue;     String embeddedInstanceQualifierValue;
     ix = property.findQualifier(PEGASUS_QUALIFIERNAME_EMBEDDEDINSTANCE);      ix = property.findQualifier(CIMName("EmbeddedInstance"));
     if (ix != PEG_NOT_FOUND)     if (ix != PEG_NOT_FOUND)
     {     {
         property.getQualifier(ix).getValue().get(         property.getQualifier(ix).getValue().get(
Line 2081 
Line 2014 
     // then     // then
     //     Convert the EmbeddedObject-encoded string into a CIMObject     //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     Boolean isEmbeddedObject = (embeddedObject == EMBEDDED_OBJECT_ATTR) ||      Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||
         embeddedObjectQualifierValue;         embeddedObjectQualifierValue;
     Boolean isEmbeddedInstance = (embeddedObject == EMBEDDED_INSTANCE_ATTR) ||      Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance") ||
         embeddedInstanceQualifierValue.size() > 0;         embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)     if (isEmbeddedObject || isEmbeddedInstance)
     {     {
Line 2101 
Line 2034 
  
             // Copy the qualifiers from the String property to the CIMObject             // Copy the qualifiers from the String property to the CIMObject
             // property.             // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)              for (Uint32 i = 0; i < property.getQualifierCount(); ++i)
             {             {
                 // All properties are copied, including the EmbeddedObject                 // All properties are copied, including the EmbeddedObject
                 // qualifier.  This way we don't have to keep track to know                 // qualifier.  This way we don't have to keep track to know
                 // that the EmbeddedObject qualifier needs to be added back                 // that the EmbeddedObject qualifier needs to be added back
                 // during the encode step.                 // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));                  new_property.addQualifier(property.getQualifier(i));
             }             }
  
             value = new_value;             value = new_value;
Line 2122 
Line 2055 
         }         }
     }     }
 #else #else
     if ((embeddedObject == EMBEDDED_OBJECT_ATTR)||embeddedObjectQualifierValue)      if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {     {
         // The EmbeddedObject attribute is only valid on Properties of type         // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
Line 2135 
Line 2068 
  
             // Copy the qualifiers from the String property to the CIMObject             // Copy the qualifiers from the String property to the CIMObject
             // property.             // property.
             for (Uint32 ix = 0; ix < property.getQualifierCount(); ++ix)              for (Uint32 i = 0; i < property.getQualifierCount(); ++i)
             {             {
                 // All properties are copied, including the EmbeddedObject                 // All properties are copied, including the EmbeddedObject
                 // qualifier.  This way we don't have to keep track to know                 // qualifier.  This way we don't have to keep track to know
                 // that the EmbeddedObject qualifier needs to be added back                 // that the EmbeddedObject qualifier needs to be added back
                 // during the encode step.                 // during the encode step.
                 new_property.addQualifier(property.getQualifier(ix));                  new_property.addQualifier(property.getQualifier(i));
             }             }
  
             value = new_value;             value = new_value;
Line 2388 
Line 2321 
     const XmlEntry& entry,     const XmlEntry& entry,
     const char* elementName)     const char* elementName)
 { {
     const char* tmp;      String tmp;
  
     if (!entry.getAttributeValue("VALUETYPE", tmp))     if (!entry.getAttributeValue("VALUETYPE", tmp))
         return CIMKeyBinding::STRING;         return CIMKeyBinding::STRING;
  
     if (strcmp(tmp, "string") == 0)      if (String::equal(tmp, "string"))
         return CIMKeyBinding::STRING;         return CIMKeyBinding::STRING;
     else if (strcmp(tmp, "boolean") == 0)      else if (String::equal(tmp, "boolean"))
         return CIMKeyBinding::BOOLEAN;         return CIMKeyBinding::BOOLEAN;
     else if (strcmp(tmp, "numeric") == 0)      else if (String::equal(tmp, "numeric"))
         return CIMKeyBinding::NUMERIC;         return CIMKeyBinding::NUMERIC;
  
     char buffer[MESSAGE_SIZE];     char buffer[MESSAGE_SIZE];
Line 4258 
Line 4191 
  
     // Get PROPERTY.EmbeddedObject     // Get PROPERTY.EmbeddedObject
  
     EmbeddedObjectAttributeType embeddedObject = getEmbeddedObjectAttribute(      String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "PARAMVALUE");         parser.getLine(), entry, "PARAMVALUE");
  
     // Get PARAMVALUE.PARAMTYPE attribute:     // Get PARAMVALUE.PARAMTYPE attribute:
Line 4311 
Line 4244 
             // then             // then
             //     Convert the EmbeddedObject-encoded string into a CIMObject             //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
             if (embeddedObject != NO_EMBEDDED_OBJECT)              Boolean isEmbeddedObject = String::equal(embeddedObject, "object");
               Boolean isEmbeddedInstance =
                   String::equal(embeddedObject, "instance");
               if (isEmbeddedObject || isEmbeddedInstance)
             {             {
                 // The EmbeddedObject attribute is only valid on Parameters                 // The EmbeddedObject attribute is only valid on Parameters
                 // of type string                 // of type string
                 // The type must have been specified.                 // The type must have been specified.
                 if (gotType && (type == CIMTYPE_STRING))                 if (gotType && (type == CIMTYPE_STRING))
                 {                 {
                   if (embeddedObject == EMBEDDED_OBJECT_ATTR)                    if (isEmbeddedObject)
                       // Used below by getValueElement() or                       // Used below by getValueElement() or
                       // getValueArrayElement()                       // getValueArrayElement()
                       effectiveType = CIMTYPE_OBJECT;                       effectiveType = CIMTYPE_OBJECT;
Line 4335 
Line 4271 
                 }                 }
             }             }
 #else #else
             if (embeddedObject == EMBEDDED_OBJECT_ATTR)              if (String::equal(embeddedObject, "object"))
             {             {
                 // The EmbeddedObject attribute is only valid on Parameters                 // The EmbeddedObject attribute is only valid on Parameters
                 // of type string                 // of type string
Line 4396 
Line 4332 
  
     // Get PROPERTY.EmbeddedObject     // Get PROPERTY.EmbeddedObject
  
     EmbeddedObjectAttributeType embeddedObject = getEmbeddedObjectAttribute(      String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "RETURNVALUE");         parser.getLine(), entry, "RETURNVALUE");
  
     // Get RETURNVALUE.PARAMTYPE attribute:     // Get RETURNVALUE.PARAMTYPE attribute:
Line 4433 
Line 4369 
             type = CIMTYPE_STRING;             type = CIMTYPE_STRING;
         }         }
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
         if (embeddedObject != NO_EMBEDDED_OBJECT)          Boolean isEmbeddedObject = String::equal(embeddedObject, "object");
           Boolean isEmbeddedInstance = String::equal(embeddedObject, "instance");
           if (isEmbeddedObject || isEmbeddedInstance)
         {         {
             if (gotType && (type == CIMTYPE_STRING))             if (gotType && (type == CIMTYPE_STRING))
             {             {
                 if (embeddedObject == EMBEDDED_OBJECT_ATTR)                  if (isEmbeddedObject)
                     // Used below by getValueElement() or getValueArrayElement()                     // Used below by getValueElement() or getValueArrayElement()
                     type = CIMTYPE_OBJECT;                     type = CIMTYPE_OBJECT;
                 else                 else
Line 4453 
Line 4391 
             }             }
         }         }
 #else #else
         if (embeddedObject == EMBEDDED_OBJECT_ATTR)          if (String::equal(embeddedObject, "object"))
         {         {
             if (gotType && (type == CIMTYPE_STRING))             if (gotType && (type == CIMTYPE_STRING))
             {             {


Legend:
Removed from v.1.129.12.3  
changed lines
  Added in v.1.130

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2