VirtualBox

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


Ignore:
Timestamp:
Jul 12, 2012 5:32:31 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79090
Message:

Main/VirtualBox+Machine: add support for VM groups (incomplete, saving of settings is not implemented), remaining code adjusted accordingly, use better parameter checking macros, make XSLT generators process setter attributes using safearrays correctly, various cleanups and warning fixes
Frontends/VBoxManage: first traces of groups support

File:
1 edited

Legend:

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

    r41040 r42129  
    534534  <xsl:param name="safearray" />
    535535
    536   <xsl:value-of select="concat('        // convert input arg ', $name)" />
     536  <xsl:value-of select="concat('        // convert input arg ', $name, '(safearray: ', $safearray, ')')" />
    537537  <xsl:call-template name="emitNewlineIndent8" />
    538538
     
    709709
    710710<!--
     711    emitInParam:
     712-->
     713<xsl:template name="emitInParam">
     714  <xsl:param name="name" />
     715  <xsl:param name="type" />
     716  <xsl:param name="safearray" />
     717  <xsl:param name="varprefix" />      <!-- only with nested set-attribute calls -->
     718
     719  <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
     720
     721  <xsl:choose>
     722    <xsl:when test="@safearray='yes'">
     723      <xsl:value-of select="concat('ComSafeArrayAsInParam(', $varname, ')')" />
     724    </xsl:when>
     725    <xsl:otherwise>
     726      <xsl:value-of select="$varname" />
     727      <xsl:if test="@type='wstring' or @type='uuid'">
     728        <xsl:text>.raw()</xsl:text>
     729      </xsl:if>
     730    </xsl:otherwise>
     731  </xsl:choose>
     732</xsl:template>
     733
     734<!--
    711735    emitOutParam:
    712736-->
     
    768792    <xsl:choose>
    769793      <xsl:when test="$attrdir='in'">
    770         <xsl:value-of select="concat('comcall_', $varprefix, @name)" />
    771         <xsl:if test="$attrtype='wstring' or $attrtype='uuid'">
    772           <xsl:text>.raw()</xsl:text>
    773         </xsl:if>
     794        <xsl:call-template name="emitInParam">
     795          <xsl:with-param name="name" select="$attrname" />
     796          <xsl:with-param name="type" select="$attrtype" />
     797          <xsl:with-param name="safearray" select="$attrsafearray" />
     798          <xsl:with-param name="varprefix" select="$varprefix" />
     799        </xsl:call-template>
    774800      </xsl:when>
    775801      <xsl:when test="$attrdir='return'">
     
    794820    <xsl:choose>
    795821      <xsl:when test="@dir='in'">
    796         <xsl:choose>
    797           <xsl:when test="@safearray='yes'">
    798             <xsl:value-of select="concat('ComSafeArrayAsInParam(comcall_', $varprefix, @name, ')')" />
    799           </xsl:when>
    800           <xsl:otherwise>
    801             <xsl:value-of select="concat('comcall_', $varprefix, @name)" />
    802             <xsl:if test="@type='wstring' or @type='uuid'">
    803               <xsl:text>.raw()</xsl:text>
    804             </xsl:if>
    805           </xsl:otherwise>
    806         </xsl:choose>
     822        <xsl:call-template name="emitInParam">
     823          <xsl:with-param name="name" select="@name" />
     824          <xsl:with-param name="type" select="@type" />
     825          <xsl:with-param name="safearray" select="@safearray" />
     826          <xsl:with-param name="varprefix" select="$varprefix" />
     827        </xsl:call-template>
    807828      </xsl:when>
    808829      <xsl:when test="@dir='out'">
     
    12041225  <xsl:param name="attrtype" select="$attrtype" />
    12051226  <xsl:param name="attrreadonly" select="$attrreadonly" />
     1227  <xsl:param name="attrsafearray" select="$attrsafearray" />
    12061228
    12071229  <xsl:variable name="settername"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
     
    12441266        <xsl:with-param name="attrname"><xsl:value-of select="$attrname" /></xsl:with-param>
    12451267        <xsl:with-param name="attrtype"><xsl:value-of select="$attrtype" /></xsl:with-param>
     1268        <xsl:with-param name="attrsafearray"><xsl:value-of select="$attrsafearray" /></xsl:with-param>
    12461269      </xsl:call-template>
    12471270    <!-- </xsl:otherwise>
     
    13161339              <xsl:with-param name="attrtype" select="$attrtype" />
    13171340              <xsl:with-param name="attrreadonly" select="$attrreadonly" />
     1341              <xsl:with-param name="attrsafearray" select="$attrsafearray" />
    13181342            </xsl:call-template>
    13191343          </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.

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