VirtualBox

Changeset 35722 in vbox for trunk/src/VBox/Main/webservice


Ignore:
Timestamp:
Jan 26, 2011 4:37:16 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69665
Message:

Main: reworked listener objects creation, fixes Win problems with events, few cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r35571 r35722  
    501501    {
    502502    }
     503
     504    HRESULT init()
     505    {
     506       return S_OK;
     507    }
     508
     509    void uninit()
     510    {
     511    }
     512
    503513
    504514    STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent *aEvent)
     
    921931
    922932    /* VirtualBoxClient events registration. */
    923     IEventListener *vboxClientListener = NULL;
     933    ComPtr<IEventListener> vboxClientListener;
    924934    {
    925935        ComPtr<IEventSource> pES;
    926936        CHECK_ERROR(g_pVirtualBoxClient, COMGETTER(EventSource)(pES.asOutParam()));
    927         vboxClientListener = new VirtualBoxClientEventListenerImpl();
     937        ComObjPtr<VirtualBoxClientEventListenerImpl> clientListener;
     938        clientListener.createObject();
     939        clientListener->init(new VirtualBoxClientEventListener());
     940        vboxClientListener = clientListener;
    928941        com::SafeArray<VBoxEventType_T> eventTypes;
    929942        eventTypes.push_back(VBoxEventType_OnVBoxSVCAvailabilityChanged);
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