Changeset 69388 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Oct 26, 2017 5:02:54 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 118712
- Location:
- trunk/src/VBox/Main/glue/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/tests/TestVBox.java
r56636 r69388 1 1 /* $Id$ */ 2 3 /* Small sample/testcase which demonstrates that the same source code can 4 * be used to connect to the webservice and (XP)COM APIs. */ 2 /*! file 3 * Small sample/testcase which demonstrates that the same source code can 4 * be used to connect to the webservice and (XP)COM APIs. 5 */ 5 6 6 7 /* … … 15 16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 17 */ 18 17 19 import org.virtualbox_5_0.*; 18 20 import java.util.List; … … 141 143 String name = m.getName(); 142 144 System.out.println("\nAttempting to start VM '" + name + "'"); 143 145 144 146 ISession session = mgr.getSessionObject(); 145 147 IProgress p = m.launchVMProcess(session, "gui", ""); -
trunk/src/VBox/Main/glue/tests/TestVBoxNATEngine.java
r56636 r69388 1 1 /* $Id$ */ 2 3 /* Small sample/testcase which demonstrates that the same source code can 4 * be used to connect to the webservice and (XP)COM APIs. */ 2 /*!file 3 * Small sample/testcase which demonstrates that the same source code can 4 * be used to connect to the webservice and (XP)COM APIs. 5 */ 5 6 6 7 /* … … 15 16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 17 */ 18 17 19 import org.virtualbox_5_0.*; 18 20 import java.util.List; … … 29 31 /* different chipsets might have different number of attachments */ 30 32 ChipsetType chipsetType = vm.getChipsetType(); 31 INetworkAdapter adapters[] = 33 INetworkAdapter adapters[] = 32 34 new INetworkAdapter[ 33 35 vbox.getSystemProperties().getMaxNetworkAdapters(chipsetType).intValue()]; … … 40 42 * dump it settings 41 43 */ 42 44 43 45 for (int nidx = 0; nidx < adapters.length; ++nidx) 44 46 { … … 46 48 adapters[nidx] = vm.getNetworkAdapter(new Long(nidx)); 47 49 INetworkAdapter n = adapters[nidx]; 48 50 49 51 if (n == null) 50 52 continue; … … 67 69 /* name,proto,hostip,host,hostport,guestip,guestport */ 68 70 nat.removeRedirect(pfAttributes[0]); 69 nat.addRedirect("", 71 nat.addRedirect("", 70 72 NATProtocol.fromValue(new Integer(pfAttributes[1]).longValue()), 71 73 pfAttributes[2], … … 78 80 } 79 81 } 80 82 81 83 } 82 84 catch (VBoxException e) … … 84 86 name = "<inaccessible>"; 85 87 inaccessible = true; 86 } 88 } 87 89 88 90 // process system event queue
Note:
See TracChangeset
for help on using the changeset viewer.