Changeset 30393 in vbox
- Timestamp:
- Jun 23, 2010 2:07:46 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/VBoxEvents.cpp
r30381 r30393 22 22 * of VBoxEvent to simplify multiple inheritance ambiguity. 23 23 */ 24 25 // @todo: add more elements to COM map too 24 26 #define EVENT_CLASS_TRIVIA(klazz, iface) \ 25 27 public: \ … … 481 483 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VBoxEvent, IEvent) 482 484 NS_DECL_CLASSINFO(MachineStateChangeEvent) 483 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(MachineStateChangeEvent, IMachineStateChangeEvent, IEvent)485 NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineStateChangeEvent, IMachineStateChangeEvent, IMachineEvent, IEvent) 484 486 NS_DECL_CLASSINFO(MachineDataChangeEvent) 485 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(MachineDataChangeEvent, IMachineDataChangeEvent, IEvent)487 NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineDataChangeEvent, IMachineDataChangeEvent, IMachineEvent, IEvent) 486 488 NS_DECL_CLASSINFO(MachineRegisteredEvent) 487 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(MachineRegisteredEvent, IMachineRegisteredEvent, IEvent)489 NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineRegisteredEvent, IMachineRegisteredEvent, IMachineEvent, IEvent) 488 490 NS_DECL_CLASSINFO(MachineSessionStateEvent) 489 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(MachineSessionStateEvent, IMachineSessionStateEvent, IEvent)491 NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineSessionStateEvent, IMachineSessionStateEvent, IMachineEvent, IEvent) 490 492 NS_DECL_CLASSINFO(GuestPropertyChangeEvent) 491 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(GuestPropertyChangeEvent, IGuestPropertyChangeEvent, IEvent)493 NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestPropertyChangeEvent, IGuestPropertyChangeEvent, IMachineEvent, IEvent) 492 494 NS_DECL_CLASSINFO(SnapshotTakenEvent) 493 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(SnapshotTakenEvent, ISnapshotTakenEvent, IEvent)495 NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotTakenEvent, ISnapshotTakenEvent, ISnapshotEvent, IMachineEvent, IEvent) 494 496 NS_DECL_CLASSINFO(SnapshotDeletedEvent) 495 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(SnapshotDeletedEvent, ISnapshotDeletedEvent, IEvent)497 NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotDeletedEvent, ISnapshotDeletedEvent, ISnapshotEvent, IMachineEvent, IEvent) 496 498 NS_DECL_CLASSINFO(SnapshotChangeEvent) 497 NS_IMPL_THREADSAFE_ISUPPORTS 2_CI(SnapshotChangeEvent, ISnapshotChangeEvent, IEvent)499 NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotChangeEvent, ISnapshotChangeEvent, ISnapshotEvent, IMachineEvent, IEvent) 498 500 NS_DECL_CLASSINFO(ExtraDataChangeEvent) 499 501 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ExtraDataChangeEvent, IExtraDataChangeEvent, IEvent) -
trunk/src/VBox/Main/glue/vboxapi.py
r30381 r30393 312 312 313 313 def queryInterface(self, obj, klazzName): 314 from win32com.client import CastTo 314 from win32com.client import CastTo 315 315 return CastTo(obj, klazzName) 316 316 … … 459 459 460 460 def queryInterface(self, obj, klazzName): 461 d = {} 462 d['obj'] = obj 463 str = "" 464 str += "from VirtualBox_wrappers import "+klazzName+"\n" 465 str += "result = "+klazzName+"(obj.mgr,obj.handle)\n" 461 466 # wrong, need to test if class indeed implements this interface 462 return globals()[klazzName](obj.mgr, obj.handle) 467 exec (str,d,d) 468 return d['result'] 463 469 464 470 class SessionManager: -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r30381 r30393 124 124 #define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI 125 125 #define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI 126 #define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI 127 126 128 127 129 #ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI … … 147 149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \ 148 150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3) 151 #endif 152 153 #ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI 154 # define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \ 155 NS_IMPL_THREADSAFE_ADDREF(_class) \ 156 NS_IMPL_THREADSAFE_RELEASE(_class) \ 157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \ 158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4) 149 159 #endif 150 160
Note:
See TracChangeset
for help on using the changeset viewer.