Changeset 31708 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 16, 2010 3:56:57 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/glue-java.xsl
r31694 r31708 249 249 250 250 <xsl:variable name="needarray" select="($safearray='yes') and not($forceelem='yes')" /> 251 252 <xsl:if test="$needarray"> 251 <xsl:variable name="needlist" select="($needarray) and not($type='octet')" /> 252 253 <xsl:if test="($needlist)"> 253 254 <xsl:value-of select="'List<'" /> 254 255 </xsl:if> … … 271 272 </xsl:choose> 272 273 273 <xsl:if test="$needarray"> 274 <xsl:value-of select="'>'" /> 275 </xsl:if> 274 <xsl:choose> 275 <xsl:when test="($needlist)"> 276 <xsl:value-of select="'>'" /> 277 </xsl:when> 278 <xsl:when test="($needarray)"> 279 <xsl:value-of select="'[]'" /> 280 </xsl:when> 281 </xsl:choose> 276 282 </xsl:template> 277 283 … … 510 516 </xsl:when> 511 517 512 <xsl:when test="$idltype='unsigned long long'">513 <xsl:choose>514 <xsl:when test="$safearray='yes'">515 <xsl:value-of select="concat('Helper.wrapUnsignedLongLong(', $value,')')"/>516 </xsl:when>517 <xsl:otherwise>518 <xsl:value-of select="concat('Helper.doubleToBigInteger(', $value,')')"/>519 </xsl:otherwise>520 </xsl:choose>521 </xsl:when>522 523 518 <xsl:otherwise> 524 519 <xsl:choose> 520 <xsl:when test="($safearray='yes') and ($idltype='octet')"> 521 <xsl:value-of select="$value"/> 522 </xsl:when> 525 523 <xsl:when test="$safearray='yes'"> 526 524 <xsl:value-of select="concat('Helper.wrap(', $value,')')"/> … … 656 654 <xsl:when test="//interface[@name=$idltype] or $idltype='$unknown'"> 657 655 <xsl:value-of select="concat('Helper.wrap(',$elemgluetype,'.class, port, ', $value,')')"/> 656 </xsl:when> 657 <xsl:when test="$idltype='octet'"> 658 <xsl:value-of select="concat('Helper.wrapBytes(',$value,')')"/> 658 659 </xsl:when> 659 660 <xsl:otherwise> … … 2374 2375 public static <T1, T2> List<T1> wrap2(Class<T1> wrapperClass1, Class<T2> wrapperClass2, T2[] thisPtrs) { 2375 2376 try { 2376 if (thisPtrs==null) 2377 if (thisPtrs==null) 2377 2378 return null; 2378 2379 … … 3228 3229 } 3229 3230 } 3231 // temporary method, will bo away soon 3232 public static byte[] wrapBytes(List<Short> arr) 3233 { 3234 if (arr == null) 3235 return null; 3236 int i = 0; 3237 byte[] rv = new byte[arr.size()]; 3238 for (short s : arr) 3239 rv[i++] = (byte)(s & 0xff); 3240 return rv; 3241 } 3230 3242 } 3231 3243 ]]></xsl:text> -
trunk/src/VBox/Main/glue/tests/TestVBox.java
r31694 r31708 116 116 } 117 117 118 /*119 static void testReadLogBI(VirtualBoxManager mgr, IVirtualBox vbox)120 {121 IMachine m = vbox.getMachines().get(0);122 long logNo = 0;123 BigInteger off = BigInteger.valueOf(0);124 BigInteger size = BigInteger.valueOf(16 * 1024);125 while (true)126 {127 byte[] buf = m.readLog(logNo, off, size);128 if (buf.length == 0)129 break;130 System.out.print(new String(buf));131 off.add(BigInteger.valueOf(buf.length));132 }133 }134 135 118 static void testReadLog(VirtualBoxManager mgr, IVirtualBox vbox) 136 119 { … … 147 130 off += buf.length; 148 131 } 149 } 150 */ 132 } 151 133 152 134 -
trunk/src/VBox/Main/webservice/websrv-shared.inc.xsl
r28800 r31708 158 158 159 159 <xsl:variable name="G_aSharedTypes"> 160 <type idlname="octet" xmlname="unsignedByte" cname="unsigned char" gluename="BYTE" javaname=" Short" />160 <type idlname="octet" xmlname="unsignedByte" cname="unsigned char" gluename="BYTE" javaname="byte" /> 161 161 <type idlname="boolean" xmlname="boolean" cname="bool" gluename="BOOL" javaname="Boolean" /> 162 162 <type idlname="short" xmlname="short" cname="short" gluename="SHORT" javaname="Short" />
Note:
See TracChangeset
for help on using the changeset viewer.