summaryrefslogtreecommitdiff
path: root/src/VBox/Main/idl/comimpl.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/idl/comimpl.xsl')
-rw-r--r--src/VBox/Main/idl/comimpl.xsl36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/VBox/Main/idl/comimpl.xsl b/src/VBox/Main/idl/comimpl.xsl
index 58889cbd..59ae42b8 100644
--- a/src/VBox/Main/idl/comimpl.xsl
+++ b/src/VBox/Main/idl/comimpl.xsl
@@ -13,7 +13,7 @@
rather trivial container classes for their read-only attributes.
Further extension to other interfaces is possible and anticipated.
- Copyright (C) 2010-2012 Oracle Corporation
+ Copyright (C) 2010-2013 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
@@ -30,7 +30,7 @@
encoding="utf-8"
indent="no"/>
-<xsl:include href="../webservice/websrv-shared.inc.xsl" />
+<xsl:include href="typemap-shared.inc.xsl" />
<!-- $G_kind contains what kind of COM class implementation we generate -->
<xsl:variable name="G_xsltFilename" select="'autogen.xsl'" />
@@ -46,7 +46,7 @@
*/
/*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -149,6 +149,12 @@
<xsl:when test="$type='octet'">
<xsl:value-of select="'BYTE'" />
</xsl:when>
+ <xsl:when test="$type='unsigned short'">
+ <xsl:value-of select="'USHORT'" />
+ </xsl:when>
+ <xsl:when test="$type='short'">
+ <xsl:value-of select="'SHORT'" />
+ </xsl:when>
<xsl:when test="$type='unsigned long'">
<xsl:value-of select="'ULONG'" />
</xsl:when>
@@ -189,7 +195,7 @@
<xsl:when test="$safearray='yes'">
<xsl:variable name="elemtype">
<xsl:call-template name="typeIdl2Back">
- <xsl:with-param name="type" select="@type" />
+ <xsl:with-param name="type" select="$type" />
<xsl:with-param name="safearray" select="''" />
<xsl:with-param name="dir" select="'in'" />
</xsl:call-template>
@@ -212,7 +218,7 @@
<xsl:when test="$safearray='yes'">
<xsl:variable name="elemtype">
<xsl:call-template name="typeIdl2Back">
- <xsl:with-param name="type" select="@type" />
+ <xsl:with-param name="type" select="$type" />
<xsl:with-param name="safearray" select="''" />
<xsl:with-param name="dir" select="'in'" />
</xsl:call-template>
@@ -293,14 +299,14 @@
</xsl:call-template>
</xsl:variable>
<xsl:value-of select=" '#ifdef RT_OS_WINDOWS&#10;'"/>
- <xsl:value-of select=" ' SAFEARRAY * aPtr = va_arg(args, SAFEARRAY *);&#10;'"/>
- <xsl:value-of select="concat(' com::SafeArray&lt;', $elemtype,'&gt; aArr(aPtr);&#10;')"/>
+ <xsl:value-of select="concat(' SAFEARRAY *aPtr_', @name, ' = va_arg(args, SAFEARRAY *);&#10;')"/>
+ <xsl:value-of select="concat(' com::SafeArray&lt;', $elemtype,'&gt; aArr_', @name, '(aPtr_', @name, ');&#10;')"/>
<xsl:value-of select=" '#else&#10;'"/>
- <xsl:value-of select=" ' PRUint32 aArrSize = va_arg(args, PRUint32);&#10;'"/>
- <xsl:value-of select=" ' void* aPtr = va_arg(args, void*);&#10;'"/>
- <xsl:value-of select="concat(' com::SafeArray&lt;', $elemtype,'&gt; aArr(aArrSize, (', $elemtype,'*)aPtr);&#10;')"/>
+ <xsl:value-of select="concat(' PRUint32 aArrSize_', @name, ' = va_arg(args, PRUint32);&#10;')"/>
+ <xsl:value-of select="concat(' void* aPtr_', @name, ' = va_arg(args, void*);&#10;')"/>
+ <xsl:value-of select="concat(' com::SafeArray&lt;', $elemtype,'&gt; aArr_', @name, '(aArrSize_', @name, ', (', $elemtype,'*)aPtr_', @name, ');&#10;')"/>
<xsl:value-of select=" '#endif&#10;'"/>
- <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(ComSafeArrayAsInParam(aArr));&#10;')"/>
+ <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(ComSafeArrayAsInParam(aArr_', @name, '));&#10;')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(' ',$aTypeName, ' = va_arg(args, ',$aType,');&#10;')"/>
@@ -321,10 +327,10 @@
</xsl:variable>
<xsl:choose>
- <xsl:when test="$extends='IEvent'">
+ <xsl:when test="$name='IEvent'">
<xsl:value-of select=" '#ifdef VBOX_WITH_XPCOM&#10;'" />
<xsl:value-of select="concat('NS_DECL_CLASSINFO(', $impl, ')&#10;')" />
- <xsl:value-of select="concat('NS_IMPL_THREADSAFE_ISUPPORTS',$depth,'_CI(', $impl, ', ', $name, $parents, ', IEvent)&#10;')" />
+ <xsl:value-of select="concat('NS_IMPL_THREADSAFE_ISUPPORTS',$depth,'_CI(', $impl, $parents, ', IEvent)&#10;')" />
<xsl:value-of select=" '#endif&#10;&#10;'"/>
</xsl:when>
<xsl:when test="//interface[@name=$extends]">
@@ -332,7 +338,7 @@
<xsl:with-param name="impl" select="$impl" />
<xsl:with-param name="name" select="$extends" />
<xsl:with-param name="depth" select="$depth+1" />
- <xsl:with-param name="parents" select="concat($parents, ', ', @name)" />
+ <xsl:with-param name="parents" select="concat($parents, ', ', $name)" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
@@ -585,7 +591,7 @@ private:
<xsl:call-template name="genImplList">
<xsl:with-param name="impl" select="$implName" />
<xsl:with-param name="name" select="@name" />
- <xsl:with-param name="depth" select="'2'" />
+ <xsl:with-param name="depth" select="'1'" />
<xsl:with-param name="parents" select="''" />
</xsl:call-template>