VirtualBox

Changeset 36676 in vbox for trunk/src/VBox/Main/webservice


Ignore:
Timestamp:
Apr 14, 2011 5:45:51 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71170
Message:

Main/webservice: Fix for variable sanity checking, and provide VirtualBox COM result variables as constants. Contributed by James Lucas.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/websrv-php.xsl

    r33656 r36676  
    142142       $request = new stdClass();
    143143       $request->_this = $this->handle;
    144        if (is_int($value) || is_string($value) || is_bool($value)) {
     144       if (is_null($value) || is_scalar($value)) {
    145145            $request-><xsl:value-of select="$attrname"/> = $value;
    146146       }
     
    345345</xsl:template>
    346346
     347<xsl:template name="comResultCodes">
     348   const <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>;
     349</xsl:template>
     350
    347351<xsl:template match="/">
    348352<xsl:text>&lt;?php
     
    567571
    568572</xsl:text>
     573
     574<xsl:text>
     575/**
     576* VirtualBox COM result codes
     577*/
     578class VirtualBox_COM_result_codes {
     579</xsl:text>
     580  <xsl:for-each select="/idl/library/result">
     581       <xsl:call-template name="comResultCodes"/>
     582  </xsl:for-each>
     583<xsl:text>
     584}
     585</xsl:text>
    569586  <xsl:for-each select="//interface[@wsmap='managed' or @wsmap='global']">
    570587       <xsl:call-template name="interface"/>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette