Changeset 29183 in vbox for trunk/src/libs/xpcom18a4/java
- Timestamp:
- May 7, 2010 7:36:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/java/tests/TestVBox.java
r29180 r29183 17 17 public class TestVBox 18 18 { 19 20 public static class VBoxCallbacks implements IVirtualBoxCallback 21 { 22 public void onGuestPropertyChange(String machineId, String name, String value, String flags) {} 23 public void onSnapshotChange(String machineId, String snapshotId) {} 24 public void onSnapshotDeleted(String machineId, String snapshotId) {} 25 public void onSnapshotTaken(String machineId, String snapshotId) {} 26 /** @todo is there a type SessionState instead of long? */ 27 public void onSessionStateChange(String machineId, long state) {} 28 public void onMachineRegistered(String machineId, boolean registered) {} 29 /** @todo long -> MediumType */ 30 public void onMediumRegistered(String mediumId, long mediumType, boolean registered) {} 31 public void onExtraDataChange(String machineId, String key, String value) {} 32 public boolean onExtraDataCanChange(String machineId, String key, String value, String[] error) { return true; } 33 public void onMachineDataChange(String machineId) {} 34 /** @todo long -> MachineState */ 35 public void onMachineStateChange(String machineId, long state) { System.out.println("onMachineStateChange -- VM: " + machineId + ", state: " + state); }; 36 37 /** @todo ugly reimplementation of queryInterface, should have base class to derive from */ 38 public nsISupports queryInterface(String iid) { return org.mozilla.xpcom.Mozilla.queryInterface(this, iid); } 39 }; 40 41 19 42 public static void main(String[] args) 20 43 { … … 45 68 } 46 69 70 // VBoxCallbacks vboxCallbacks = new VBoxCallbacks(); 71 // vbox.registerCallback(vboxCallbacks); 72 47 73 /* do something silly, start the first VM in the list */ 48 74 String m = machs[0].getName(); … … 57 83 System.out.println("cannot start machine "+m); 58 84 } 85 86 // vbox.unregisterCallback(vboxCallbacks); 59 87 } 60 88 catch (Throwable e)
Note:
See TracChangeset
for help on using the changeset viewer.