VirtualBox

Changeset 85310 in vbox


Ignore:
Timestamp:
Jul 13, 2020 1:09:53 PM (4 years ago)
Author:
vboxsync
Message:

Main/comimpl.xsl,VirtualBox.xidl: Added an 'autogenflags' attribute to the xidl interface element so we can selectively generate BSTR variants for a handful events where we need it. bugref:9790

Location:
trunk/src/VBox/Main/idl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.dtd

    r82969 r85310  
    6767                <!-- autogen names the style of code auto-generation for this
    6868                     interface (currently only VBoxEvent). -->
     69    <!ATTLIST interface autogenflags CDATA #IMPLIED>
     70                <!-- autogenflags contains autogen tweaks.
     71                     For autoget=VBoxEvent: 'BSTR' - generate IN_BSTR variants of the functions. -->
    6972    <!ATTLIST interface id CDATA #IMPLIED>
    7073                <!-- id is only relevant for event interfaces, and specifies
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r85133 r85310  
    2584125841    name="IRuntimeErrorEvent" extends="IEvent"
    2584225842    uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
    25843     wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
     25843    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnRuntimeError"
    2584425844    >
    2584525845    <desc>
     
    2593725937    name="IExtraDataChangedEvent" extends="IEvent"
    2593825938    uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
    25939     wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
     25939    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnExtraDataChanged"
    2594025940    >
    2594125941    <desc>
     
    2617826178    waitable="yes"
    2617926179    uuid="a0bad6df-d612-47d3-89d4-db3992533948"
    26180     wsmap="managed" autogen="VBoxEvent" id="OnHostPCIDevicePlug"
     26180    wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnHostPCIDevicePlug"
    2618126181    >
    2618226182    <desc>
     
    2641926419  <interface name="INATNetworkCreationDeletionEvent" extends="INATNetworkAlterEvent"
    2642026420             uuid="8d984a7e-b855-40b8-ab0c-44d3515b4528"
    26421              wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkCreationDeletion">
     26421             wsmap="managed" autogen="VBoxEvent" autogenflags="BSTR" id="OnNATNetworkCreationDeletion">
    2642226422    <attribute name="creationEvent" type="boolean" readonly="yes"/>
    2642326423  </interface>
  • trunk/src/VBox/Main/idl/comimpl.xsl

    r85306 r85310  
    3535<!-- $G_kind contains what kind of COM class implementation we generate -->
    3636<xsl:variable name="G_xsltFilename" select="'autogen.xsl'" />
    37 <xsl:variable name="G_generateBstrVariants" select="'yes'" />
     37<xsl:variable name="G_generateBstrVariants" select="'no'" />
    3838
    3939
     
    905905    </xsl:call-template>
    906906
    907     <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     907    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    908908      <xsl:call-template name="genReinitFunction">
    909909        <xsl:with-param name="name" select="@name"/>
     
    927927  </xsl:call-template>
    928928
    929   <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     929  <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    930930    <xsl:call-template name="genCreateFunction">
    931931      <xsl:with-param name="name" select="@name"/>
     
    946946  </xsl:call-template>
    947947
    948   <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     948  <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    949949    <xsl:call-template name="genFireFunction">
    950950      <xsl:with-param name="evname" select="$evname"/>
     
    10431043    <xsl:text>);&#10;</xsl:text>
    10441044
    1045     <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     1045    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    10461046      <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Fire', $evname, '(IEventSource *aSource')"/>
    10471047      <xsl:call-template name="genFormalParams">
     
    10781078    <xsl:text>);&#10;</xsl:text>
    10791079
    1080     <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     1080    <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    10811081      <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Create', $evname, '(IEvent **aEvent, IEventSource *aSource')"/>
    10821082      <xsl:call-template name="genFormalParams">
     
    11151115      <xsl:text>);&#10;</xsl:text>
    11161116
    1117       <xsl:if test="($hasStringAttribs != '') and ($G_generateBstrVariants = 'yes')">
     1117      <xsl:if test="($hasStringAttribs != '') and (($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR')))">
    11181118        <xsl:value-of select="concat('DECLHIDDEN(HRESULT) Reinit', $evname, '(IEvent *aEvent')"/>
    11191119        <xsl:call-template name="genFormalParams">
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