VirtualBox

Changeset 94730 in vbox for trunk


Ignore:
Timestamp:
Apr 28, 2022 8:51:13 AM (3 years ago)
Author:
vboxsync
Message:

Main/Update check: Added the agent COM object to the IUpdateAgentEvent base class (abstract), to identify the signalling agent. This is needed because FE/Qt works a bit differently with regards to event handling / proxying, e.g. it does not use global event sources other than IVirtualBox / IVirtualBoxClient. bugref:7983

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r94723 r94730  
    2831628316  <interface
    2831728317    name="IUpdateAgentEvent" extends="IEvent"
    28318     uuid="0e33366a-670e-4e1f-9ddc-41c8a346cafd"
     28318    uuid="ff58a51d-54a1-411c-93e9-3047eb4dcd21"
    2831928319    wsmap="managed">
    2832028320    <desc>
    2832128321      Abstract base interface for update agent events.
    2832228322    </desc>
    28323     <attribute name="midlDoesNotLikeEmptyInterfaces" readonly="yes" type="boolean"/>
     28323    <attribute name="agent" readonly="yes" type="IUpdateAgent">
     28324      <desc>Update agent this event belongs to.</desc>
     28325    </attribute>
    2832428326  </interface>
    2832528327
  • trunk/src/VBox/Main/src-server/UpdateAgentImpl.cpp

    r94729 r94730  
    725725    aLock.release();
    726726
    727     ::FireUpdateAgentSettingsChangedEvent(m_EventSource, "" /** @todo Include attribute hints */);
     727    ::FireUpdateAgentSettingsChangedEvent(m_EventSource, this, "" /** @todo Include attribute hints */);
    728728
    729729    AutoWriteLock vboxLock(m_VirtualBox COMMA_LOCKVAL_SRC_POS);
     
    758758    LogRel(("Update agent (%s): %s\n", mData.m_strName.c_str(), strMsg.c_str()));
    759759
    760     ::FireUpdateAgentErrorEvent(m_EventSource, strMsg.c_str(), vrc);
     760    ::FireUpdateAgentErrorEvent(m_EventSource, this, strMsg.c_str(), vrc);
    761761
    762762    return setErrorBoth(VBOX_E_IPRT_ERROR, vrc, strMsg.c_str());
     
    10451045        alock.release(); /* Release lock before firing off event. */
    10461046
    1047         ::FireUpdateAgentStateChangedEvent(m_EventSource, UpdateState_NotAvailable);
     1047        ::FireUpdateAgentStateChangedEvent(m_EventSource, this, UpdateState_NotAvailable);
    10481048    }
    10491049    else
     
    10721072                alock.release(); /* Release lock before firing off events. */
    10731073
    1074                 ::FireUpdateAgentStateChangedEvent(m_EventSource, UpdateState_Available);
    1075                 ::FireUpdateAgentAvailableEvent(m_EventSource, mData.m_lastResult.strVer, m->enmChannel,
     1074                ::FireUpdateAgentStateChangedEvent(m_EventSource, this, UpdateState_Available);
     1075                ::FireUpdateAgentAvailableEvent(m_EventSource, this, mData.m_lastResult.strVer, m->enmChannel,
    10761076                                                mData.m_lastResult.enmSeverity, mData.m_lastResult.strDownloadUrl,
    10771077                                                mData.m_lastResult.strWebUrl, mData.m_lastResult.strReleaseNotes);
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