VirtualBox

Changeset 30627 in vbox


Ignore:
Timestamp:
Jul 5, 2010 5:08:55 PM (15 years ago)
Author:
vboxsync
Message:

Main, some frontends: removing callbacks

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/array.h

    r30564 r30627  
    950950    }
    951951
     952    void cloneTo (SafeArray<T>& aOther) const
     953    {
     954        aOther.reset(size());
     955        aOther.initFrom(*this);
     956    }
     957
    952958
    953959    /**
     
    10051011    }
    10061012
    1007     inline void initFrom(com::SafeArray<T> & aRef);
     1013    inline void initFrom(const com::SafeArray<T> & aRef);
    10081014
    10091015    // Public methods for internal purposes only.
     
    12061212};
    12071213
    1208 /* Few fast specializations for primitive array types */ 
     1214/* Few fast specializations for primitive array types */
    12091215template<>
    1210 inline void com::SafeArray<BYTE>::initFrom(com::SafeArray<BYTE> & aRef)
     1216inline void com::SafeArray<BYTE>::initFrom(const com::SafeArray<BYTE> & aRef)
    12111217{
    12121218    size_t sSize = aRef.size();
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r30606 r30627  
    995995            consoleListener = new ConsoleEventListener();
    996996            consoleListener->AddRef();
    997             com::SafeArray <VBoxEventType_T> eventTypes(5);
     997            com::SafeArray <VBoxEventType_T> eventTypes;
    998998            eventTypes.push_back(VBoxEventType_OnMouseCapabilityChange);
    999999            eventTypes.push_back(VBoxEventType_OnStateChange);
     
    10901090            vboxListener = new VirtualBoxEventListener();
    10911091            vboxListener->AddRef();
    1092             com::SafeArray <VBoxEventType_T> eventTypes(1);
     1092            com::SafeArray <VBoxEventType_T> eventTypes;
    10931093            eventTypes.push_back(VBoxEventType_OnGuestPropertyChange);
    10941094            CHECK_ERROR(es, RegisterListener(vboxListener, ComSafeArrayAsInParam(eventTypes), true));
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r30619 r30627  
    18411841        vboxListener = new VBoxSDLEventListener();
    18421842        vboxListener->AddRef();
    1843         com::SafeArray <VBoxEventType_T> eventTypes(1);
     1843        com::SafeArray <VBoxEventType_T> eventTypes;
    18441844        eventTypes.push_back(VBoxEventType_OnExtraDataChange);
    18451845        CHECK_ERROR(es, RegisterListener(vboxListener, ComSafeArrayAsInParam(eventTypes), true));
     
    18521852        consoleListener = new VBoxSDLConsoleEventListener();
    18531853        consoleListener->AddRef();
    1854         com::SafeArray <VBoxEventType_T> eventTypes(7);
     1854        com::SafeArray <VBoxEventType_T> eventTypes;
    18551855        eventTypes.push_back(VBoxEventType_OnMousePointerShapeChange);
    18561856        eventTypes.push_back(VBoxEventType_OnMouseCapabilityChange);
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r30620 r30627  
    310310             psev = ctx['global'].queryInterface(ev, 'IMousePointerShapeChangeEvent')
    311311             if psev:
     312                 print "pointer shape event: w=%d h=%d" %(psev.width, psev.height)
    312313                 shape = ctx['global'].getArray(psev, 'shape')
    313                  print "pointer shape event: w=%d h=%d shape len=%d" %(psev.width, psev.height, len(shape))
     314                 if shape is None:
     315                     print "pointer shape event - empty shape"
     316                 else:
     317                     print "pointer shape event: w=%d h=%d shape len=%d" %(psev.width, psev.height, len(shape))
    314318
    315319    class EventListener:
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r30591 r30627  
    559559    /* Create associated child COM objects */
    560560
     561    // Event source may be needed by other children
     562    unconst(mEventSource).createObject();
     563    rc = mEventSource->init(static_cast<IConsole*>(this));
     564    AssertComRCReturnRC(rc);
     565
    561566    unconst(mGuest).createObject();
    562567    rc = mGuest->init(this);
     
    600605    unconst(mAudioSniffer) = new AudioSniffer(this);
    601606    AssertReturn(mAudioSniffer, E_FAIL);
    602 
    603     unconst(mEventSource).createObject();
    604     rc = mEventSource->init(static_cast<IConsole*>(this));
    605     AssertComRCReturnRC(rc);
    606607
    607608#ifdef RT_OS_WINDOWS
     
    48044805    com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape));
    48054806    if (aShape.size() != 0)
    4806     {
    4807         mCallbackData.mpsc.shape.resize(aShape.size());
    4808         ::memcpy( mCallbackData.mpsc.shape.raw(), aShape.raw(), aShape.size());
    4809     }
     4807        mCallbackData.mpsc.shape.initFrom(aShape);
    48104808    else
    48114809        mCallbackData.mpsc.shape.resize(0);
     
    48184816     */
    48194817#ifdef RT_OS_WINDOWS
    4820     CONSOLE_DO_CALLBACKS7(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, pShape);
     4818    CONSOLE_DO_CALLBACKS7(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, mCallbackData.mpsc.shape.raw());
    48214819#else
    4822     CONSOLE_DO_CALLBACKS8(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, pShapeSize, pShape);
     4820    CONSOLE_DO_CALLBACKS8(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, mCallbackData.mpsc.shape.size(), mCallbackData.mpsc.shape.raw());
    48234821#endif
    48244822
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r30335 r30627  
    3636#endif /* VBOX_WITH_VRDP */
    3737
    38 class VRDPConsoleCallback :
    39     VBOX_SCRIPTABLE_IMPL(IConsoleCallback)
     38class VRDPConsoleListener :
     39    VBOX_SCRIPTABLE_IMPL(IEventListener)
    4040{
    4141public:
    42     VRDPConsoleCallback(ConsoleVRDPServer *server)
     42    VRDPConsoleListener(ConsoleVRDPServer *server)
    4343        : m_server(server)
    4444    {
     
    4848    }
    4949
    50     virtual ~VRDPConsoleCallback() {}
     50    virtual ~VRDPConsoleListener() {}
    5151
    5252    NS_DECL_ISUPPORTS
     
    6666    {
    6767        if (riid == IID_IUnknown) {
    68             *ppObj = this;
     68            *ppObj = (IUnknown*)this;
    6969            AddRef();
    7070            return S_OK;
    7171        }
    72         if (riid == IID_IConsoleCallback) {
    73             *ppObj = this;
     72        if (riid == IID_IEventListener) {
     73            *ppObj = (IEventListener*)this;
    7474            AddRef();
    7575            return S_OK;
     
    8181
    8282
     83    STDMETHOD(HandleEvent)(IEvent * aEvent)
     84    {
     85        VBoxEventType_T aType = VBoxEventType_Invalid;
     86
     87        aEvent->COMGETTER(Type)(&aType);
     88        switch (aType)
     89        {
     90            case VBoxEventType_OnMousePointerShapeChange:
     91            {
     92                ComPtr<IMousePointerShapeChangeEvent> mpscev = aEvent;
     93                Assert(mpscev);
     94                BOOL    visible,  alpha;
     95                ULONG   xHot, yHot, width, height;
     96                com::SafeArray <BYTE> shape;
     97
     98                mpscev->COMGETTER(Visible)(&visible);
     99                mpscev->COMGETTER(Alpha)(&alpha);
     100                mpscev->COMGETTER(Xhot)(&xHot);
     101                mpscev->COMGETTER(Yhot)(&yHot);
     102                mpscev->COMGETTER(Width)(&width);
     103                mpscev->COMGETTER(Height)(&height);
     104                mpscev->COMGETTER(Shape)(ComSafeArrayAsOutParam(shape));
     105
     106                OnMousePointerShapeChange(visible, alpha, xHot, yHot, width, height, ComSafeArrayAsInParam(shape));
     107                break;
     108            }
     109            case VBoxEventType_OnMouseCapabilityChange:
     110            {
     111                ComPtr<IMouseCapabilityChangeEvent> mccev = aEvent;
     112                Assert(mccev);
     113                if (m_server)
     114                {
     115                    BOOL fAbsoluteMouse;
     116                    mccev->COMGETTER(SupportsAbsolute)(&fAbsoluteMouse);
     117                    m_server->NotifyAbsoluteMouse(!!fAbsoluteMouse);
     118                }
     119                break;
     120            }
     121            case VBoxEventType_OnKeyboardLedsChange:
     122            {
     123                ComPtr<IKeyboardLedsChangeEvent> klcev = aEvent;
     124                Assert(klcev);
     125
     126                if (m_server)
     127                {
     128                    BOOL fNumLock, fCapsLock, fScrollLock;
     129                    klcev->COMGETTER(NumLock)(&fNumLock);
     130                    klcev->COMGETTER(CapsLock)(&fCapsLock);
     131                    klcev->COMGETTER(ScrollLock)(&fScrollLock);
     132                    m_server->NotifyKeyboardLedsChange(fNumLock, fCapsLock, fScrollLock);
     133                }
     134                 break;
     135            }
     136
     137            default:
     138                AssertFailed();
     139        }
     140
     141        return S_OK;
     142    }
     143
     144private:
    83145    STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
    84146                                         ULONG width, ULONG height, ComSafeArrayIn(BYTE,shape));
    85 
    86     STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor)
    87     {
    88         if (m_server)
    89         {
    90             m_server->NotifyAbsoluteMouse(!!supportsAbsolute);
    91         }
    92         return S_OK;
    93     }
    94 
    95     STDMETHOD(OnKeyboardLedsChange)(BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock)
    96     {
    97         if (m_server)
    98         {
    99             m_server->NotifyKeyboardLedsChange(fNumLock, fCapsLock, fScrollLock);
    100         }
    101         return S_OK;
    102     }
    103 
    104     STDMETHOD(OnStateChange)(MachineState_T machineState)
    105     {
    106         return S_OK;
    107     }
    108 
    109     STDMETHOD(OnAdditionsStateChange)()
    110     {
    111         return S_OK;
    112     }
    113 
    114     STDMETHOD(OnMediumChange)(IMediumAttachment *aAttachment)
    115     {
    116         return S_OK;
    117     }
    118 
    119     STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove)
    120     {
    121         return S_OK;
    122     }
    123 
    124     STDMETHOD(OnNetworkAdapterChange)(INetworkAdapter *aNetworkAdapter)
    125     {
    126         return S_OK;
    127     }
    128 
    129     STDMETHOD(OnSerialPortChange)(ISerialPort *aSerialPort)
    130     {
    131         return S_OK;
    132     }
    133 
    134     STDMETHOD(OnParallelPortChange)(IParallelPort *aParallelPort)
    135     {
    136         return S_OK;
    137     }
    138 
    139     STDMETHOD(OnStorageControllerChange)()
    140     {
    141         return S_OK;
    142     }
    143 
    144     STDMETHOD(OnVRDPServerChange)()
    145     {
    146         return S_OK;
    147     }
    148 
    149     STDMETHOD(OnRemoteDisplayInfoChange)()
    150     {
    151         return S_OK;
    152     }
    153 
    154     STDMETHOD(OnUSBControllerChange)()
    155     {
    156         return S_OK;
    157     }
    158 
    159     STDMETHOD(OnUSBDeviceStateChange)(IUSBDevice *aDevice, BOOL aAttached,
    160                                       IVirtualBoxErrorInfo *aError)
    161     {
    162         return S_OK;
    163     }
    164 
    165     STDMETHOD(OnSharedFolderChange)(Scope_T aScope)
    166     {
    167         return S_OK;
    168     }
    169 
    170     STDMETHOD(OnRuntimeError)(BOOL fatal, IN_BSTR id, IN_BSTR message)
    171     {
    172         return S_OK;
    173     }
    174 
    175     STDMETHOD(OnCanShowWindow)(BOOL *canShow)
    176     {
    177         if (!canShow)
    178             return E_POINTER;
    179         /* we don't manage window activation here: always agree */
    180         *canShow = TRUE;
    181         return S_OK;
    182     }
    183 
    184     STDMETHOD(OnShowWindow)(ULONG64 *winId)
    185     {
    186         if (!winId)
    187             return E_POINTER;
    188         /* we don't manage window activation here */
    189         *winId = 0;
    190         return S_OK;
    191     }
    192 
    193 private:
    194147    ConsoleVRDPServer *m_server;
    195148#ifndef VBOX_WITH_XPCOM
     
    200153#ifdef VBOX_WITH_XPCOM
    201154#include <nsMemory.h>
    202 NS_DECL_CLASSINFO(VRDPConsoleCallback)
    203 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDPConsoleCallback, IConsoleCallback)
     155NS_DECL_CLASSINFO(VRDPConsoleListener)
     156NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDPConsoleListener, IEventListener)
    204157#endif /* VBOX_WITH_XPCOM */
    205158
     
    425378}
    426379
    427 STDMETHODIMP VRDPConsoleCallback::OnMousePointerShapeChange(BOOL visible,
     380STDMETHODIMP VRDPConsoleListener::OnMousePointerShapeChange(BOOL visible,
    428381                                                            BOOL alpha,
    429382                                                            ULONG xHot,
     
    433386                                                            ComSafeArrayIn(BYTE,inShape))
    434387{
    435     LogSunlover(("VRDPConsoleCallback::OnMousePointerShapeChange: %d, %d, %lux%lu, @%lu,%lu\n", visible, alpha, width, height, xHot, yHot));
     388    LogSunlover(("VRDPConsoleListener::OnMousePointerShapeChange: %d, %d, %lux%lu, @%lu,%lu\n", visible, alpha, width, height, xHot, yHot));
    436389
    437390    if (m_server)
     
    12011154    memset (maFramebuffers, 0, sizeof (maFramebuffers));
    12021155
    1203     mConsoleCallback = new VRDPConsoleCallback(this);
    1204     mConsoleCallback->AddRef();
    1205     console->RegisterCallback(mConsoleCallback);
     1156    {
     1157        ComPtr<IEventSource> es;
     1158        console->COMGETTER(EventSource)(es.asOutParam());
     1159        mConsoleListener = new VRDPConsoleListener(this);
     1160        mConsoleListener->AddRef();
     1161        com::SafeArray <VBoxEventType_T> eventTypes(3);
     1162        eventTypes.push_back(VBoxEventType_OnMousePointerShapeChange);
     1163        eventTypes.push_back(VBoxEventType_OnMouseCapabilityChange);
     1164        eventTypes.push_back(VBoxEventType_OnKeyboardLedsChange);
     1165        es->RegisterListener(mConsoleListener, ComSafeArrayAsInParam(eventTypes), true);
     1166    }
    12061167
    12071168    mVRDPBindPort = -1;
     
    12161177
    12171178#ifdef VBOX_WITH_VRDP
    1218     if (mConsoleCallback)
    1219     {
    1220         mConsole->UnregisterCallback(mConsoleCallback);
    1221         mConsoleCallback->Release();
    1222         mConsoleCallback = NULL;
     1179    if (mConsoleListener)
     1180    {
     1181        ComPtr<IEventSource> es;
     1182        mConsole->COMGETTER(EventSource)(es.asOutParam());
     1183        es->UnregisterListener(mConsoleListener);
     1184        mConsoleListener->Release();
     1185        mConsoleListener = NULL;
    12231186    }
    12241187
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r30032 r30627  
    647647    }
    648648
    649     mParent->RegisterCallback (this);
     649    {
     650        // register listener for state change events
     651        ComPtr<IEventSource> es;
     652        mParent->COMGETTER(EventSource)(es.asOutParam());
     653        com::SafeArray <VBoxEventType_T> eventTypes;
     654        eventTypes.push_back(VBoxEventType_OnStateChange);
     655        es->RegisterListener(this, ComSafeArrayAsInParam(eventTypes), true);
     656    }
    650657
    651658    /* Confirm a successful initialization */
     
    673680
    674681    if (mParent)
    675         mParent->UnregisterCallback (this);
     682    {
     683        ComPtr<IEventSource> es;
     684        mParent->COMGETTER(EventSource)(es.asOutParam());
     685        es->UnregisterListener(this);
     686    }
    676687
    677688    unconst(mParent) = NULL;
     
    725736}
    726737
    727 // IConsoleCallback method
    728 STDMETHODIMP Display::OnStateChange(MachineState_T machineState)
    729 {
    730     if (   machineState == MachineState_Running
    731         || machineState == MachineState_Teleporting
    732         || machineState == MachineState_LiveSnapshotting
    733        )
    734     {
    735         LogFlowFunc(("Machine is running.\n"));
    736 
    737         mfMachineRunning = true;
    738     }
    739     else
    740         mfMachineRunning = false;
     738// IEventListener method
     739STDMETHODIMP Display::HandleEvent(IEvent * aEvent)
     740{
     741    VBoxEventType_T aType = VBoxEventType_Invalid;
     742
     743    aEvent->COMGETTER(Type)(&aType);
     744    switch (aType)
     745    {
     746        case VBoxEventType_OnStateChange:
     747        {
     748            ComPtr<IStateChangeEvent> scev = aEvent;
     749            Assert(scev);
     750            MachineState_T machineState;
     751            scev->COMGETTER(State)(&machineState);
     752            if (   machineState == MachineState_Running
     753                   || machineState == MachineState_Teleporting
     754                   || machineState == MachineState_LiveSnapshotting
     755                   )
     756            {
     757                LogFlowFunc(("Machine is running.\n"));
     758
     759                mfMachineRunning = true;
     760            }
     761            else
     762                mfMachineRunning = false;
     763            break;
     764        }
     765        default:
     766            AssertFailed();
     767    }
    741768
    742769    return S_OK;
  • trunk/src/VBox/Main/idl/comimpl.xsl

    r30564 r30627  
    105105        </xsl:when>
    106106        <xsl:when test="$param and ($dir='out')">
    107           <xsl:value-of select="concat('ComSafeArrayOut(',$elemtype,',', $param,')')"/>
     107          <xsl:value-of select="concat('ComSafeArrayOut(',$elemtype,', ', $param, ')')"/>
    108108        </xsl:when>
    109109        <xsl:otherwise>
     
    200200  <xsl:choose>
    201201    <xsl:when test="$safearray='yes'">
    202       <xsl:value-of select="concat('         ', $member, '.detachTo(ComSafeArrayOutArg (', $param, '));&#10;')"/>
     202      <xsl:variable name="elemtype">
     203        <xsl:call-template name="typeIdl2Back">
     204             <xsl:with-param name="type" select="@type" />
     205             <xsl:with-param name="safearray" select="''" />
     206             <xsl:with-param name="dir" select="'in'" />
     207        </xsl:call-template>
     208      </xsl:variable>
     209      <xsl:value-of select="concat('         SafeArray&lt;', $elemtype,'&gt; result;&#10;')"/>
     210      <xsl:value-of select="concat('         ', $member, '.cloneTo(result);&#10;')"/>
     211      <xsl:value-of select="concat('         result.detachTo(ComSafeArrayOutArg(', $param, '));&#10;')"/>
    203212    </xsl:when>
    204213    <xsl:otherwise>
     
    476485]]></xsl:text>
    477486  <xsl:choose>
    478     <xsl:when test="$isVeto">
     487    <xsl:when test="$isVeto='yes'">
    479488<xsl:text><![CDATA[
    480489    HRESULT init (IEventSource* aSource, VBoxEventType_T aType, BOOL aWaitable = TRUE)
     
    496505    }
    497506private:
     507    ComObjPtr<VBoxVetoEvent>      mEvent;
    498508]]></xsl:text>
    499       <xsl:value-of select="       '    ComObjPtr&lt;VBoxVetoEvent&gt;      mEvent;&#10;'" />
    500509    </xsl:when>
    501510    <xsl:otherwise>
     
    506515    }
    507516private:
     517    ComObjPtr<VBoxEvent>      mEvent;
    508518]]></xsl:text>
    509       <xsl:value-of select="       '    ComObjPtr&lt;VBoxEvent&gt;      mEvent;&#10;'" />
    510519    </xsl:otherwise>
    511520  </xsl:choose>
     
    607616      <xsl:when test="$G_kind='VBoxEvent'">
    608617        <xsl:variable name="isVeto">
    609           <xsl:value-of select="@extends='IVetoEvent'" />
     618          <xsl:if test="@extends='IVetoEvent'">
     619            <xsl:value-of select="'yes'" />
     620          </xsl:if>
    610621        </xsl:variable>
    611622        <xsl:call-template name="genEventImpl">
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r28800 r30627  
    178178    IFramebuffer *maFramebuffers[SchemaDefs::MaxGuestMonitors];
    179179
    180     IConsoleCallback *mConsoleCallback;
     180    IEventListener *mConsoleListener;
    181181
    182182    VRDPInputSynch m_InputSynch;
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r29518 r30627  
    9393class ATL_NO_VTABLE Display :
    9494    public VirtualBoxBase,
    95     VBOX_SCRIPTABLE_IMPL(IConsoleCallback),
     95    VBOX_SCRIPTABLE_IMPL(IEventListener),
    9696    public VirtualBoxSupportErrorInfoImpl<Display, IDisplay>,
    9797    public VirtualBoxSupportTranslation<Display>,
     
    111111        COM_INTERFACE_ENTRY(IDisplay)
    112112        COM_INTERFACE_ENTRY2(IDispatch,IDisplay)
    113         COM_INTERFACE_ENTRY(IConsoleCallback)
     113        COM_INTERFACE_ENTRY(IEventListener)
    114114    END_COM_MAP()
    115115
     
    148148#endif /* VBOX_WITH_VRDP */
    149149
    150     // IConsoleCallback methods
    151     STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
    152                                          ULONG width, ULONG height, ComSafeArrayIn(BYTE,shape))
    153     {
    154         return S_OK;
    155     }
    156 
    157     STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor)
    158     {
    159         return S_OK;
    160     }
    161 
    162     STDMETHOD(OnKeyboardLedsChange)(BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock)
    163     {
    164         return S_OK;
    165     }
    166 
    167     STDMETHOD(OnStateChange)(MachineState_T machineState);
    168 
    169     STDMETHOD(OnAdditionsStateChange)()
    170     {
    171         return S_OK;
    172     }
    173 
    174     STDMETHOD(OnNetworkAdapterChange) (INetworkAdapter *aNetworkAdapter)
    175     {
    176         return S_OK;
    177     }
    178 
    179     STDMETHOD(OnSerialPortChange) (ISerialPort *aSerialPort)
    180     {
    181         return S_OK;
    182     }
    183 
    184     STDMETHOD(OnParallelPortChange) (IParallelPort *aParallelPort)
    185     {
    186         return S_OK;
    187     }
    188 
    189     STDMETHOD(OnStorageControllerChange) ()
    190     {
    191         return S_OK;
    192     }
    193 
    194     STDMETHOD(OnMediumChange)(IMediumAttachment *aMediumAttachment)
    195     {
    196         return S_OK;
    197     }
    198 
    199     STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove)
    200     {
    201         return S_OK;
    202     }
    203 
    204     STDMETHOD(OnVRDPServerChange)()
    205     {
    206         return S_OK;
    207     }
    208 
    209     STDMETHOD(OnRemoteDisplayInfoChange)()
    210     {
    211         return S_OK;
    212     }
    213 
    214     STDMETHOD(OnUSBControllerChange)()
    215     {
    216         return S_OK;
    217     }
    218 
    219     STDMETHOD(OnUSBDeviceStateChange)(IUSBDevice *device, BOOL attached,
    220                                       IVirtualBoxErrorInfo *message)
    221     {
    222         return S_OK;
    223     }
    224 
    225     STDMETHOD(OnSharedFolderChange) (Scope_T aScope)
    226     {
    227         return S_OK;
    228     }
    229 
    230     STDMETHOD(OnRuntimeError)(BOOL fatal, IN_BSTR id, IN_BSTR message)
    231     {
    232         return S_OK;
    233     }
    234 
    235     STDMETHOD(OnCanShowWindow)(BOOL *canShow)
    236     {
    237         if (canShow)
    238             *canShow = TRUE;
    239         return S_OK;
    240     }
    241 
    242     STDMETHOD(OnShowWindow)(ULONG64 *winId)
    243     {
    244         if (winId)
    245             *winId = 0;
    246         return S_OK;
    247     }
     150    // IEventListener methods
     151    STDMETHOD(HandleEvent)(IEvent * aEvent);
    248152
    249153    // IDisplay methods
  • trunk/src/VBox/Main/xpcom/module.cpp

    r30559 r30627  
    5858NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Mouse, IMouse)
    5959NS_DECL_CLASSINFO(Display)
    60 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(Display, IDisplay, IConsoleCallback)
     60NS_IMPL_THREADSAFE_ISUPPORTS2_CI(Display, IDisplay, IEventListener)
    6161NS_DECL_CLASSINFO(MachineDebugger)
    6262NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MachineDebugger, IMachineDebugger)
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