~ubuntu-branches/ubuntu/trusty/sblim-sfcb/trusty-proposed

« back to all changes in this revision

Viewing changes to cimXmlGen.c

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2009-06-08 12:04:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090608120449-byfplk09rqz8rtg6
Tags: 1.3.3-0ubuntu1
* New upstream release.
* debian/rules: Removed rpath hacks, SFCB default build handles that now.
* Removed 1934753-remove-assignment.diff, now upstream.
* Refreshed patch cim-schema-location.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
{
295
295
        XtokProperty *p = NULL;
296
296
        CMPIValue val;
 
297
        memset(&val, 0, sizeof(CMPIValue));
297
298
        CMPIObjectPath *path;
298
299
        
299
300
        if(value.type == typeValue_Instance) {
345
346
     value.array = TrackedCMPIArray(max,t,NULL);
346
347
     if (value.array != NULL) {
347
348
       for (i=0; i<max; i++) {
348
 
         v = str2CMPIValue(t, arr->values[i], refarr->values+i,NULL);
 
349
         v = str2CMPIValue(t, arr->values[i], refarr->values+i,ns);
349
350
         CMSetArrayElementAt(value.array, i, &v, t); 
350
351
       }
351
352
       return value;
629
630
      sb->ft->appendBlock(sb, bTag,bTagLen);
630
631
      sb->ft->appendChars(sb, (char *) name->hdl);
631
632
      if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"");
632
 
      else if (bTag) {
633
 
        SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
634
 
        if(data->type & CMPI_instance || data->type & CMPI_class) {
635
 
             SFCB_APPENDCHARS_BLOCK(sb, "string");
636
 
        } else {
637
 
         sb->ft->appendChars(sb, dataType(data->type));
638
 
        }
 
633
      else if (bTag) SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
 
634
      if (data->type == CMPI_refA) {
 
635
         SFCB_APPENDCHARS_BLOCK(sb, "reference");
 
636
      }
 
637
      else if(((data->type & ~CMPI_ARRAY) == CMPI_instance) 
 
638
               || ((data->type & ~CMPI_ARRAY) == CMPI_class)) {
 
639
         SFCB_APPENDCHARS_BLOCK(sb, "string");
 
640
      } else {
 
641
          sb->ft->appendChars(sb, dataType(data->type));
639
642
      }
640
643
      SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
641
644
      if (qsb) sb->ft->appendChars(sb, (char *) qsb->hdl);
642
645
      if (data->state == 0) {
643
 
         SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.ARRAY>\n");
 
646
         if (data->type == CMPI_refA) {
 
647
            SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.REFARRAY>\n");
 
648
         }
 
649
         else {
 
650
            SFCB_APPENDCHARS_BLOCK(sb, "<VALUE.ARRAY>\n");
 
651
         }
644
652
         for (j = 0; j < ac; j++) {
645
653
            d = CMGetArrayElementAt(ar, j, NULL);
646
654
            if ((d.state & CMPI_nullValue)==0) {
651
659
              }
652
660
            }
653
661
         }
654
 
         SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.ARRAY>\n");
 
662
         if (data->type == CMPI_refA) {
 
663
            SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.REFARRAY>\n");
 
664
         } else {
 
665
            SFCB_APPENDCHARS_BLOCK(sb, "</VALUE.ARRAY>\n");
 
666
         }
655
667
      }
656
668
   }
657
669
   
674
686
      }
675
687
      
676
688
      else if (*type == '%') {                  
677
 
         sb->ft->appendBlock(sb, bTag, bTagLen);
 
689
             sb->ft->appendBlock(sb, bTag, bTagLen);
678
690
         sb->ft->appendChars(sb, (char *) name->hdl);
679
691
         SFCB_APPENDCHARS_BLOCK(sb, "\" EmbeddedObject=\"object");
680
692
         if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"string\">\n");
689
701
     }
690
702
      
691
703
      else {
692
 
         sb->ft->appendBlock(sb, bTag, bTagLen);
 
704
             sb->ft->appendBlock(sb, bTag, bTagLen);
693
705
         sb->ft->appendChars(sb, (char *) name->hdl);
694
706
         if (param) SFCB_APPENDCHARS_BLOCK(sb, "\" PARAMTYPE=\"");
695
 
         else  if (bTag) {
696
 
            SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
697
 
            sb->ft->appendChars(sb, type);
698
 
            SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
699
 
         }
 
707
         else  if (bTag) SFCB_APPENDCHARS_BLOCK(sb, "\" TYPE=\"");
 
708
         sb->ft->appendChars(sb, type);
 
709
         SFCB_APPENDCHARS_BLOCK(sb, "\">\n");
700
710
         if (qsb) sb->ft->appendChars(sb, (char *) qsb->hdl);
701
711
         if (data->state == 0) value2xml(*data, sb, 1);
702
712
      }