VirtualBox

Changeset 30393 in vbox


Ignore:
Timestamp:
Jun 23, 2010 2:07:46 PM (15 years ago)
Author:
vboxsync
Message:

Main, glue: webservice events

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VBoxEvents.cpp

    r30381 r30393  
    2222 *        of VBoxEvent to simplify multiple inheritance ambiguity.
    2323 */
     24
     25// @todo: add more elements to COM map too
    2426#define EVENT_CLASS_TRIVIA(klazz, iface) \
    2527  public:                                \
     
    481483NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VBoxEvent, IEvent)
    482484NS_DECL_CLASSINFO(MachineStateChangeEvent)
    483 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(MachineStateChangeEvent, IMachineStateChangeEvent, IEvent)
     485NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineStateChangeEvent, IMachineStateChangeEvent, IMachineEvent, IEvent)
    484486NS_DECL_CLASSINFO(MachineDataChangeEvent)
    485 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(MachineDataChangeEvent, IMachineDataChangeEvent, IEvent)
     487NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineDataChangeEvent, IMachineDataChangeEvent, IMachineEvent, IEvent)
    486488NS_DECL_CLASSINFO(MachineRegisteredEvent)
    487 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(MachineRegisteredEvent, IMachineRegisteredEvent, IEvent)
     489NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineRegisteredEvent, IMachineRegisteredEvent, IMachineEvent, IEvent)
    488490NS_DECL_CLASSINFO(MachineSessionStateEvent)
    489 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(MachineSessionStateEvent, IMachineSessionStateEvent, IEvent)
     491NS_IMPL_THREADSAFE_ISUPPORTS3_CI(MachineSessionStateEvent, IMachineSessionStateEvent, IMachineEvent, IEvent)
    490492NS_DECL_CLASSINFO(GuestPropertyChangeEvent)
    491 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestPropertyChangeEvent, IGuestPropertyChangeEvent, IEvent)
     493NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestPropertyChangeEvent, IGuestPropertyChangeEvent, IMachineEvent, IEvent)
    492494NS_DECL_CLASSINFO(SnapshotTakenEvent)
    493 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(SnapshotTakenEvent, ISnapshotTakenEvent, IEvent)
     495NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotTakenEvent, ISnapshotTakenEvent, ISnapshotEvent, IMachineEvent, IEvent)
    494496NS_DECL_CLASSINFO(SnapshotDeletedEvent)
    495 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(SnapshotDeletedEvent, ISnapshotDeletedEvent, IEvent)
     497NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotDeletedEvent, ISnapshotDeletedEvent, ISnapshotEvent, IMachineEvent, IEvent)
    496498NS_DECL_CLASSINFO(SnapshotChangeEvent)
    497 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(SnapshotChangeEvent, ISnapshotChangeEvent, IEvent)
     499NS_IMPL_THREADSAFE_ISUPPORTS4_CI(SnapshotChangeEvent, ISnapshotChangeEvent, ISnapshotEvent, IMachineEvent, IEvent)
    498500NS_DECL_CLASSINFO(ExtraDataChangeEvent)
    499501NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ExtraDataChangeEvent, IExtraDataChangeEvent, IEvent)
  • trunk/src/VBox/Main/glue/vboxapi.py

    r30381 r30393  
    312312
    313313    def queryInterface(self, obj, klazzName):
    314         from win32com.client import CastTo 
     314        from win32com.client import CastTo
    315315        return CastTo(obj, klazzName)
    316316
     
    459459
    460460    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"
    461466        # 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']
    463469
    464470class SessionManager:
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r30381 r30393  
    124124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI  NS_IMPL_QUERY_INTERFACE2_CI
    125125#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
    126128
    127129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
     
    147149   NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3)              \
    148150   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)
    149159#endif
    150160
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette