VirtualBox

Changeset 49994 in vbox


Ignore:
Timestamp:
Dec 20, 2013 6:53:23 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91428
Message:

Main/idl/apiwrap-server.xsl: fix the generated NS_IMPL_THREADSAFE_ISUPPORTS<n>_CI macros, list every interface which the class extends, fixes USB breakage where all USB devices were listed as "Unknown device", exposed by the switch to wrapper usage there lately

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/apiwrap-server.xsl

    r49660 r49994  
    158158</xsl:template>
    159159
     160<xsl:template name="emitISupports">
     161    <xsl:param name="classname"/>
     162    <xsl:param name="extends"/>
     163    <xsl:param name="depth"/>
     164    <xsl:param name="interfacelist"/>
     165
     166    <xsl:choose>
     167        <xsl:when test="$extends and not($extends='$unknown') and not($extends='$dispatched') and not($extends='$errorinfo')">
     168            <xsl:variable name="newextends" select="//interface[@name=$extends]/@extends"/>
     169            <xsl:variable name="newiflist" select="concat($interfacelist, ', ', $extends)"/>
     170            <xsl:call-template name="emitISupports">
     171                <xsl:with-param name="classname" select="$classname"/>
     172                <xsl:with-param name="extends" select="$newextends"/>
     173                <xsl:with-param name="depth" select="$depth + 1"/>
     174                <xsl:with-param name="interfacelist" select="$newiflist"/>
     175            </xsl:call-template>
     176        </xsl:when>
     177        <xsl:otherwise>
     178            <xsl:value-of select="concat('NS_IMPL_THREADSAFE_ISUPPORTS', $depth, '_CI(', $classname, ', ', $interfacelist, ')&#10;')"/>
     179        </xsl:otherwise>
     180    </xsl:choose>
     181</xsl:template>
     182
    160183<xsl:template match="interface" mode="codefooter">
    161184    <xsl:text>#ifdef VBOX_WITH_XPCOM
    162185</xsl:text>
    163     <xsl:value-of select="concat('NS_DECL_CLASSINFO(', substring(@name, 2), 'Wrap)&#10;NS_IMPL_THREADSAFE_ISUPPORTS1_CI(', substring(@name, 2), 'Wrap, ', @name, ')&#10;')"/>
     186    <xsl:value-of select="concat('NS_DECL_CLASSINFO(', substring(@name, 2), 'Wrap)&#10;')"/>
     187
     188    <xsl:call-template name="emitISupports">
     189        <xsl:with-param name="classname" select="concat(substring(@name, 2), 'Wrap')"/>
     190        <xsl:with-param name="extends" select="@extends"/>
     191        <xsl:with-param name="depth" select="1"/>
     192        <xsl:with-param name="interfacelist" select="@name"/>
     193    </xsl:call-template>
     194
    164195    <xsl:text>#endif // VBOX_WITH_XPCOM
    165196</xsl:text>
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