Changeset 31096 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jul 26, 2010 8:55:20 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64048
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/glue-java.xsl
r31095 r31096 2755 2755 } 2756 2756 2757 @SuppressWarnings("unchecked") 2757 2758 public static <T> Object wrapVariant(Class<T> wrapperClass, Variant v) 2758 2759 { … … 2784 2785 } 2785 2786 2787 @SuppressWarnings("unchecked") 2786 2788 public static <T> List<T> wrap(Class<T> wrapperClass, SafeArray sa) { 2787 2789 if (sa==null) return null; … … 2911 2913 } 2912 2914 2915 @SuppressWarnings("unchecked") 2913 2916 public static <T> T[] unwrap(Class<T> wrapperClass, List<T> thisPtrs) { 2914 2917 if (thisPtrs==null) return null; … … 2916 2919 } 2917 2920 2921 @SuppressWarnings("unchecked") 2918 2922 public static <T1 extends IUnknown,T2> T2[] unwrap2(Class<T1> wrapperClass1, Class<T2> wrapperClass2, List<T1> thisPtrs) { 2919 2923 if (thisPtrs==null) return null; … … 2998 3002 } 2999 3003 3000 public ISession openMachineSession( String mid) throws Exception3004 public ISession openMachineSession(IMachine m) 3001 3005 { 3002 3006 ISession s = getSessionObject(); 3003 try { 3004 this.vbox.openExistingSession(s, mid); 3005 return s; 3006 } catch (Exception e) { 3007 try { 3008 this.vbox.openSession(s, mid); 3009 return s; 3010 } catch (Exception e1) { 3011 closeMachineSession(s); 3012 throw e1; 3013 } 3014 } 3015 } 3016 3017 public ISession openMachineSession(IMachine m) throws Exception 3018 { 3019 return openMachineSession(m.getId()); 3020 } 3021 3007 m.lockMachine(s, LockType.Shared); 3008 return s; 3009 } 3010 3022 3011 public void closeMachineSession(ISession s) 3023 3012 { … … 3065 3054 return false; 3066 3055 ISession session = getSessionObject(); 3067 3068 String mid = m.getId();3069 3056 if (type == null) 3070 3057 type = "gui"; 3071 IProgress p = vbox.openRemoteSession(session, mid, type, "");3058 IProgress p = m.launchVMProcess(session, type, ""); 3072 3059 progressBar(p, timeout); 3073 3060 session.unlockMachine();
Note:
See TracChangeset
for help on using the changeset viewer.