Changeset 30207 in vbox
- Timestamp:
- Jun 15, 2010 3:49:27 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 9 edited
-
ConsoleImpl.cpp (modified) (25 diffs)
-
Makefile.kmk (modified) (1 diff)
-
VirtualBoxImpl.cpp (modified) (5 diffs)
-
glue/tests/Makefile.kmk (modified) (1 diff)
-
glue/tests/TestVBox.java (modified) (3 diffs)
-
glue/vboxapi.py (modified) (1 diff)
-
idl/VirtualBox.xidl (modified) (1 diff)
-
include/ConsoleImpl.h (modified) (4 diffs)
-
include/VirtualBoxImpl.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r30191 r30207 337 337 }; 338 338 339 #ifdef RT_OS_WINDOWS 340 341 /** 342 * Macro used to prepare for COM event firing, note CComObjectRootEx locking. 343 */ 344 #define CONSOLE_EVENTS_START(name,count) \ 345 { \ 346 ComEventDesc evDesc; \ 347 \ 348 this->Lock(); \ 349 int nConnections = this->m_vec.GetSize(); \ 350 if (nConnections) \ 351 evDesc.init(#name, count); 352 353 /** 354 * Actual event firing for all connection points. 355 * Note some subtlety in the fact that connection point list access 356 * must be synchronized with CComObjectRootEx Lock()/Unlock() methods. 357 */ 358 #define CONSOLE_EVENTS_END() \ 359 for (int i=0; i<nConnections; i++) \ 360 { \ 361 ComPtr<IUnknown> sp = this->m_vec.GetAt(i); \ 362 ComPtr<IDispatch> cbD; \ 363 cbD = sp; \ 364 if (cbD != NULL) \ 365 { \ 366 CComVariant varResult; \ 367 this->mComEvHelper.fire(cbD, evDesc, &varResult); \ 368 } \ 369 } \ 370 this->Unlock(); \ 371 } 372 373 /** 374 * A bit non-trivial part about those macros is that we rely heavily on C++ type 375 * casting and assignment operator overloading in CComVariant when instantiating 376 * member template add(), and every add() here could be, ofc, different function. 377 */ 378 #define PREP_ARGS0() 379 #define PREP_ARGS1(a1) evDesc.add(a1) 380 #define PREP_ARGS2(a1,a2) evDesc.add(a1).add(a2) 381 #define PREP_ARGS3(a1,a2,a3) evDesc.add(a1).add(a2).add(a3) 382 #define PREP_ARGS4(a1,a2,a3,a4) evDesc.add(a1).add(a2).add(a3).add(a4) 383 #define PREP_ARGS5(a1,a2,a3,a4,a5) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5) 384 #define PREP_ARGS6(a1,a2,a3,a4,a5,a6) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6) 385 #define PREP_ARGS7(a1,a2,a3,a4,a5,a6,a7) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7) 386 387 #else 388 389 /** 390 * No events for XPCOM targets now. In the future it looks natural to implmenet generic events mechanism 391 * for all platforms and get rid of callbacks. 392 */ 393 #define CONSOLE_EVENTS_START(name,count) 394 #define CONSOLE_EVENTS_END() 395 #define PREP_ARGS0() 396 #define PREP_ARGS1(a1) 397 #define PREP_ARGS2(a1,a2) 398 #define PREP_ARGS3(a1,a2,a3) 399 #define PREP_ARGS4(a1,a2,a3,a4) 400 #define PREP_ARGS5(a1,a2,a3,a4,a5) 401 #define PREP_ARGS6(a1,a2,a3,a4,a5,a6) 402 #define PREP_ARGS7(a1,a2,a3,a4,a5,a6,a7) 403 404 #endif 405 339 406 /** 340 407 * Macro for iterating the callback list (Console::mCallbacks) and invoking the 341 * given method on each entry .408 * given method on each entry, along with firing appropriate COM events on Windows. 342 409 * 343 410 * This handles VBOX_E_DONT_CALL_AGAIN as well as removing dead interfaces … … 351 418 * 352 419 * @param CallbackMethod The callback method, like OnKeyboardLedsChange. 353 * @param Args The method arguments enclosed in parentheses. 420 * @param InvokeCb Callbacks invocation code 421 * @param PreprEvent Event preparation code 422 * @param Args Number of callback arguments 354 423 */ 355 #define CONSOLE_DO_CALLBACKS (CallbackMethod, Args) \424 #define CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, InvokeCb, PrepEvent, Args) \ 356 425 do \ 357 426 { \ 427 CONSOLE_EVENTS_START(CallbackMethod,Args); \ 428 if (nConnections) { PrepEvent; } \ 429 CONSOLE_EVENTS_END(); \ 358 430 CallbackList::iterator it = this->mCallbacks.begin(); \ 359 431 while (it != this->mCallbacks.end()) \ … … 361 433 if (it->isWanted(ConsoleCallbackRegistration::k ## CallbackMethod)) \ 362 434 { \ 363 HRESULT hrc = it->ptrICb-> CallbackMethod Args;\435 HRESULT hrc = InvokeCb; \ 364 436 hrc = it->handleResult(ConsoleCallbackRegistration::k ## CallbackMethod, hrc); \ 365 437 if (FAILED_DEAD_INTERFACE(hrc)) \ … … 373 445 } while (0) 374 446 447 /* Actual invocation macro for different number of parameters */ 448 #define CONSOLE_DO_CALLBACKS0(CallbackMethod) \ 449 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(), PREP_ARGS0(), 0) 450 #define CONSOLE_DO_CALLBACKS1(CallbackMethod,Arg1) \ 451 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1), PREP_ARGS1(Arg1), 1) 452 #define CONSOLE_DO_CALLBACKS2(CallbackMethod,Arg1,Arg2) \ 453 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2), PREP_ARGS2(Arg1,Arg2), 2) 454 #define CONSOLE_DO_CALLBACKS3(CallbackMethod,Arg1,Arg2,Arg3) \ 455 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Arg3), PREP_ARGS3(Arg1,Arg2,Arg3), 3) 456 #define CONSOLE_DO_CALLBACKS4(CallbackMethod,Arg1,Arg2,Arg3,Arg4) \ 457 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Args3,Arg4), PREP_ARGS4(Arg1,Arg2,Arg3,Arg4), 4) 458 #define CONSOLE_DO_CALLBACKS7(CallbackMethod,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7) \ 459 CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), PREP_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), 7) 375 460 376 461 // constructor / destructor … … 494 579 unconst(mAudioSniffer) = new AudioSniffer(this); 495 580 AssertReturn(mAudioSniffer, E_FAIL); 581 582 #ifdef RT_OS_WINDOWS 583 if (SUCCEEDED(rc)) 584 rc = mComEvHelper.init(IID_IConsoleCallback); 585 #endif 496 586 497 587 /* Confirm a successful initialization when it's the case */ … … 2754 2844 2755 2845 /* notify console callbacks after the folder is added to the list */ 2756 CONSOLE_DO_CALLBACKS (OnSharedFolderChange,(Scope_Session));2846 CONSOLE_DO_CALLBACKS1(OnSharedFolderChange, Scope_Session); 2757 2847 2758 2848 return rc; … … 2811 2901 2812 2902 /* notify console callbacks after the folder is removed to the list */ 2813 CONSOLE_DO_CALLBACKS (OnSharedFolderChange,(Scope_Session));2903 CONSOLE_DO_CALLBACKS1(OnSharedFolderChange, Scope_Session); 2814 2904 2815 2905 return rc; … … 3229 3319 int vrc = VMR3ReqCall(mpVM, 3230 3320 VMCPUID_ANY, 3231 &pReq,3321 &pReq, 3232 3322 0 /* no wait! */, 3233 3323 VMREQFLAGS_VBOX_STATUS, … … 3522 3612 /* notify console callbacks on success */ 3523 3613 if (SUCCEEDED(rc)) 3524 CONSOLE_DO_CALLBACKS (OnNetworkAdapterChange,(aNetworkAdapter));3614 CONSOLE_DO_CALLBACKS1(OnNetworkAdapterChange, aNetworkAdapter); 3525 3615 3526 3616 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3738 3828 /* notify console callbacks on success */ 3739 3829 if (SUCCEEDED(rc)) 3740 CONSOLE_DO_CALLBACKS (OnSerialPortChange,(aSerialPort));3830 CONSOLE_DO_CALLBACKS1(OnSerialPortChange, aSerialPort); 3741 3831 3742 3832 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3772 3862 /* notify console callbacks on success */ 3773 3863 if (SUCCEEDED(rc)) 3774 CONSOLE_DO_CALLBACKS (OnParallelPortChange,(aParallelPort));3864 CONSOLE_DO_CALLBACKS1(OnParallelPortChange, aParallelPort); 3775 3865 3776 3866 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3806 3896 /* notify console callbacks on success */ 3807 3897 if (SUCCEEDED(rc)) 3808 CONSOLE_DO_CALLBACKS (OnStorageControllerChange,());3898 CONSOLE_DO_CALLBACKS0(OnStorageControllerChange); 3809 3899 3810 3900 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3840 3930 /* notify console callbacks on success */ 3841 3931 if (SUCCEEDED(rc)) 3842 CONSOLE_DO_CALLBACKS (OnMediumChange,(aMediumAttachment));3932 CONSOLE_DO_CALLBACKS1(OnMediumChange, aMediumAttachment); 3843 3933 3844 3934 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3877 3967 /* notify console callbacks on success */ 3878 3968 if (SUCCEEDED(rc)) 3879 CONSOLE_DO_CALLBACKS (OnCPUChange,(aCPU, aRemove));3969 CONSOLE_DO_CALLBACKS2(OnCPUChange, aCPU, aRemove); 3880 3970 3881 3971 LogFlowThisFunc(("Leaving rc=%#x\n", rc)); … … 3941 4031 /* notify console callbacks on success */ 3942 4032 if (SUCCEEDED(rc)) 3943 CONSOLE_DO_CALLBACKS (OnVRDPServerChange,());4033 CONSOLE_DO_CALLBACKS0(OnVRDPServerChange); 3944 4034 3945 4035 return rc; … … 3956 4046 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3957 4047 3958 CONSOLE_DO_CALLBACKS (OnRemoteDisplayInfoChange,());4048 CONSOLE_DO_CALLBACKS0(OnRemoteDisplayInfoChange); 3959 4049 } 3960 4050 … … 3996 4086 /* notify console callbacks on success */ 3997 4087 if (SUCCEEDED(rc)) 3998 CONSOLE_DO_CALLBACKS (OnUSBControllerChange,());4088 CONSOLE_DO_CALLBACKS0(OnUSBControllerChange); 3999 4089 4000 4090 return rc; … … 4021 4111 { 4022 4112 if (aGlobal) 4023 CONSOLE_DO_CALLBACKS (OnSharedFolderChange,(Scope_Global));4113 CONSOLE_DO_CALLBACKS1(OnSharedFolderChange, Scope_Global); 4024 4114 else 4025 CONSOLE_DO_CALLBACKS (OnSharedFolderChange,(Scope_Machine));4115 CONSOLE_DO_CALLBACKS1(OnSharedFolderChange, Scope_Machine); 4026 4116 } 4027 4117 … … 4680 4770 mCallbackData.mpsc.valid = true; 4681 4771 4682 CONSOLE_DO_CALLBACKS (OnMousePointerShapeChange,(fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayInArg(pShape)));4772 CONSOLE_DO_CALLBACKS7(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayInArg(pShape)); 4683 4773 4684 4774 #if 0 … … 4707 4797 mCallbackData.mcc.valid = true; 4708 4798 4709 CONSOLE_DO_CALLBACKS (OnMouseCapabilityChange,(supportsAbsolute, supportsRelative, needsHostCursor));4799 CONSOLE_DO_CALLBACKS3(OnMouseCapabilityChange, supportsAbsolute, supportsRelative, needsHostCursor); 4710 4800 } 4711 4801 … … 4719 4809 4720 4810 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4721 CONSOLE_DO_CALLBACKS (OnStateChange,(machineState));4811 CONSOLE_DO_CALLBACKS1(OnStateChange, machineState); 4722 4812 } 4723 4813 … … 4731 4821 4732 4822 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4733 CONSOLE_DO_CALLBACKS (OnAdditionsStateChange,());4823 CONSOLE_DO_CALLBACKS0(OnAdditionsStateChange); 4734 4824 } 4735 4825 … … 4768 4858 mCallbackData.klc.valid = true; 4769 4859 4770 CONSOLE_DO_CALLBACKS (OnKeyboardLedsChange,(fNumLock, fCapsLock, fScrollLock));4860 CONSOLE_DO_CALLBACKS3(OnKeyboardLedsChange, fNumLock, fCapsLock, fScrollLock); 4771 4861 } 4772 4862 … … 4781 4871 4782 4872 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4783 CONSOLE_DO_CALLBACKS (OnUSBDeviceStateChange,(aDevice, aAttached, aError));4873 CONSOLE_DO_CALLBACKS3(OnUSBDeviceStateChange, aDevice, aAttached, aError); 4784 4874 } 4785 4875 … … 4793 4883 4794 4884 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 4795 CONSOLE_DO_CALLBACKS (OnRuntimeError,(aFatal, aErrorID, aMessage));4885 CONSOLE_DO_CALLBACKS3(OnRuntimeError, aFatal, aErrorID, aMessage); 4796 4886 } 4797 4887 -
trunk/src/VBox/Main/Makefile.kmk
r30156 r30207 649 649 win/dllmain.cpp \ 650 650 win/VBoxC.def \ 651 win/VBoxC.rc 651 win/VBoxC.rc \ 652 win/VBoxComEvents.cpp 653 652 654 653 655 ifdef VBOX_WITH_XPCOM -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r30159 r30207 353 353 354 354 #ifdef RT_OS_WINDOWS 355 ComEventsHelper aComEvHelper;355 ComEventsHelper mComEvHelper; 356 356 #endif 357 357 }; … … 593 593 #ifdef RT_OS_WINDOWS 594 594 if (SUCCEEDED(rc)) 595 rc = m-> aComEvHelper.init(IID_IVirtualBoxCallback);595 rc = m->mComEvHelper.init(IID_IVirtualBoxCallback); 596 596 #endif 597 597 … … 4576 4576 4577 4577 CallbackList callbacks; 4578 #ifdef RT_OS_WINDOWS 4579 EventListenersList listeners; 4580 #endif 4578 4581 { 4579 4582 /* Make a copy to release the lock before iterating */ 4580 4583 AutoReadLock alock(mVirtualBox COMMA_LOCKVAL_SRC_POS); 4581 4584 callbacks = mVirtualBox->m->llCallbacks; 4582 }4583 4584 4585 4585 #ifdef RT_OS_WINDOWS 4586 #if 1 4586 IUnknown** pp; 4587 for (pp = mVirtualBox->m_vec.begin(); pp < mVirtualBox->m_vec.end(); pp++) 4588 { 4589 listeners.Add(*pp); 4590 } 4591 #endif 4592 } 4593 4594 4595 #ifdef RT_OS_WINDOWS 4587 4596 // WIP 4588 4597 { 4589 4598 ComEventDesc evDesc; 4590 4599 4591 int nConnections = mVirtualBox->m_vec.GetSize();4592 /* Only prepare args if someone needs them */4600 int nConnections = listeners.GetSize(); 4601 /* Only prepare args if someone really needs them */ 4593 4602 if (nConnections) 4594 4603 prepareEventDesc(evDesc); … … 4596 4605 for (int i=0; i<nConnections; i++) 4597 4606 { 4598 ComPtr<IUnknown> sp = mVirtualBox->m_vec.GetAt(i);4607 ComPtr<IUnknown> sp = listeners.GetAt(i); 4599 4608 ComPtr<IVirtualBoxCallback> cbI; 4600 4609 ComPtr<IDispatch> cbD; … … 4604 4613 4605 4614 /** 4606 * Would be just handleCallback(cbI) in ideal world, unfortunately our consumers want to be invoked via IDispatch,4607 *thus going the hard way.4615 * Would be just handleCallback(cbI) in an ideal world, unfortunately our 4616 * consumers want to be invoked via IDispatch, thus going the hard way. 4608 4617 */ 4609 4618 if (cbI != NULL && cbD != NULL) 4610 4619 { 4611 4620 CComVariant varResult; 4612 mVirtualBox->m-> aComEvHelper.fire(cbD, evDesc, &varResult);4621 mVirtualBox->m->mComEvHelper.fire(cbD, evDesc, &varResult); 4613 4622 // what we gonna do with the result? 4614 4623 } 4615 4624 } 4616 4625 } 4617 #endif4618 4626 #endif 4619 4627 -
trunk/src/VBox/Main/glue/tests/Makefile.kmk
r30159 r30207 17 17 18 18 ifeq ($(KBUILD_HOST),linux) 19 VBOX_SDK=/home/nike/work/ws/out/linux.amd64/debug/bin/sdk20 19 VBOX_BIN=/home/nike/work/ws/out/linux.amd64/debug/bin 20 VBOX_SDK=$(VBOX_BIN)/sdk 21 21 endif 22 22 23 23 ifeq ($(KBUILD_HOST),win) 24 VBOX_ SDK=c:/out/bin/sdk25 VBOX_ BIN=c:/out/bin24 VBOX_BIN=e:/ws/out/win.amd64/debug/bin 25 VBOX_SDK=$(VBOX_BIN)/sdk 26 26 JACOB_DIR=s:/jacob-1.15-M3/ 27 27 JACOB_JAR=$(JACOB_DIR)/jacob.jar -
trunk/src/VBox/Main/glue/tests/TestVBox.java
r30159 r30207 13 13 import org.virtualbox_3_3.*; 14 14 import java.util.List; 15 import java.math.BigInteger; 15 16 16 17 class VBoxCallbacks extends VBoxObjectBase implements IVirtualBoxCallback … … 63 64 } 64 65 66 class ConsoleCallbacks extends VBoxObjectBase implements IConsoleCallback 67 { 68 String mach; 69 ConsoleCallbacks(String mach) 70 { 71 this.mach = mach; 72 } 73 public void onMousePointerShapeChange(Boolean visible, Boolean alpha, Long xHot, Long yHot, Long width, Long height, List<Short> shape) 74 { 75 System.out.println("onMousePointerShapeChange -- VM: " + mach); 76 } 77 public void onMouseCapabilityChange(Boolean supportsAbsolute, Boolean supportsRelative, Boolean needsHostCursor) 78 { 79 System.out.println("onMouseCapabilityChange -- VM: " + mach+" abs="+supportsAbsolute+ " rel="+supportsRelative+" need host="+needsHostCursor); 80 } 81 public void onKeyboardLedsChange(Boolean numLock, Boolean capsLock, Boolean scrollLock) 82 { 83 System.out.println("onKeyboardLedsChange -- VM: " + mach); 84 } 85 public void onStateChange(org.virtualbox_3_3.MachineState state) 86 { 87 System.out.println("onStateChange -- VM: " + mach); 88 } 89 public void onAdditionsStateChange() 90 { 91 System.out.println("onAdditionsStateChange -- VM: " + mach); 92 } 93 public void onNetworkAdapterChange(org.virtualbox_3_3.INetworkAdapter networkAdapter) 94 { 95 System.out.println("onNetworkAdapterChange -- VM: " + mach); 96 } 97 public void onSerialPortChange(org.virtualbox_3_3.ISerialPort serialPort) 98 { 99 System.out.println("onSerialPortChange -- VM: " + mach); 100 } 101 public void onParallelPortChange(org.virtualbox_3_3.IParallelPort parallelPort) 102 { 103 System.out.println("onParallelPortChange -- VM: " + mach); 104 } 105 public void onStorageControllerChange() 106 { 107 System.out.println("onStorageControllerChange -- VM: " + mach); 108 } 109 public void onMediumChange(org.virtualbox_3_3.IMediumAttachment mediumAttachment) 110 { 111 System.out.println("onMediumChange -- VM: " + mach); 112 } 113 public void onCPUChange(Long cpu, Boolean add) 114 { 115 System.out.println("onCPUChange -- VM: " + mach); 116 } 117 public void onVRDPServerChange() 118 { 119 System.out.println("onVRDPServerChange -- VM: " + mach); 120 } 121 public void onRemoteDisplayInfoChange() 122 { 123 System.out.println("onRemoteDisplayInfoChange -- VM: " + mach); 124 } 125 public void onUSBControllerChange() 126 { 127 System.out.println("onUSBControllerChange -- VM: " + mach); 128 } 129 public void onUSBDeviceStateChange(org.virtualbox_3_3.IUSBDevice device, Boolean attached, org.virtualbox_3_3.IVirtualBoxErrorInfo error) 130 { 131 System.out.println("onUSBDeviceStateChange -- VM: " + mach); 132 } 133 public void onSharedFolderChange(org.virtualbox_3_3.Scope scope) 134 { 135 System.out.println("onSharedFolderChange -- VM: " + mach); 136 } 137 138 public void onRuntimeError(Boolean fatal, String id, String message) 139 { 140 System.out.println("onRuntimeError -- VM: " + mach); 141 } 142 143 public Boolean onCanShowWindow() 144 { 145 System.out.println("onCanShowWindow -- VM: " + mach); 146 return true; 147 } 148 149 public BigInteger onShowWindow() 150 { 151 System.out.println("onShowWindow -- VM: " + mach); 152 return BigInteger.ZERO; 153 } 154 } 155 65 156 public class TestVBox 66 157 { … … 70 161 IVirtualBoxCallback cbs = new VBoxCallbacks(); 71 162 mgr.registerGlobalCallback(vbox, cbs); 72 for (int i=0; i<100; i++) 73 { 163 164 IMachine mach = vbox.getMachines().get(0); 165 IConsoleCallback mcbs = new ConsoleCallbacks(mach.getName()); 166 167 ISession session = null; 168 try { 169 session = mgr.openMachineSession(mach); 170 mgr.registerMachineCallback(session, mcbs); 171 172 for (int i=0; i<100; i++) 173 { 74 174 mgr.waitForEvents(500); 175 } 176 177 System.out.println("done waiting"); 178 179 mgr.unregisterMachineCallback(session, mcbs); 180 } catch (Exception e) { 181 e.printStackTrace(); 182 } finally { 183 mgr.closeMachineSession(session); 75 184 } 76 185 mgr.unregisterGlobalCallback(vbox, cbs); -
trunk/src/VBox/Main/glue/vboxapi.py
r28890 r30207 217 217 win32com.client.gencache.EnsureDispatch('VirtualBox.Session') 218 218 win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBox') 219 win32com.client.gencache.EnsureDispatch('VirtualBox.Console') 219 220 win32com.client.gencache.EnsureDispatch('VirtualBox.CallbackWrapper') 220 221 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r29950 r30207 14558 14558 namespace="virtualbox.org"> 14559 14559 <interface name="ISession" default="yes"/> 14560 </class> 14561 14562 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7" 14563 namespace="virtualbox.org"> 14564 <interface name="IConsole" default="yes"/> 14560 14565 <eventsink name="IConsoleCallback" default="yes"/> 14561 14562 14566 </class> 14567 14563 14568 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE" 14564 14569 namespace="virtualbox.org"> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r29965 r30207 43 43 #ifdef VBOX_WITH_GUEST_PROPS 44 44 # include <VBox/HostServices/GuestPropertySvc.h> /* For the property notification callback */ 45 #endif 46 47 #ifdef RT_OS_WINDOWS 48 # include "win/VBoxComEvents.h" 45 49 #endif 46 50 … … 79 83 public VirtualBoxSupportTranslation<Console>, 80 84 VBOX_SCRIPTABLE_IMPL(IConsole) 85 #ifdef RT_OS_WINDOWS 86 , public CComCoClass<Console, &CLSID_Console> 87 , public IConnectionPointContainerImpl<Console> 88 , public IConnectionPointImpl<Console, &IID_IConsoleCallback, CComDynamicUnkArray> 89 #endif 81 90 { 82 91 Q_OBJECT … … 92 101 COM_INTERFACE_ENTRY(IConsole) 93 102 COM_INTERFACE_ENTRY(IDispatch) 103 COM_INTERFACE_ENTRY(IConnectionPointContainer) 94 104 END_COM_MAP() 105 106 #ifdef RT_OS_WINDOWS 107 BEGIN_CONNECTION_POINT_MAP(Console) 108 CONNECTION_POINT_ENTRY(IID_IConsoleCallback) 109 END_CONNECTION_POINT_MAP() 110 #endif 111 95 112 96 113 Console(); … … 713 730 mCallbackData; 714 731 732 #ifdef RT_OS_WINDOWS 733 ComEventsHelper mComEvHelper; 734 #endif 735 715 736 friend struct VMTask; 716 737 }; -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r29925 r30207 96 96 CONNECTION_POINT_ENTRY(IID_IVirtualBoxCallback) 97 97 END_CONNECTION_POINT_MAP() 98 99 typedef CComDynamicUnkArray EventListenersList; 98 100 #endif 99 101
Note:
See TracChangeset
for help on using the changeset viewer.

