- Timestamp:
- Apr 28, 2022 12:42:09 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r94731 r94734 68 68 #include "CStorageControllerChangedEvent.h" 69 69 #include "CStorageDeviceChangedEvent.h" 70 #include "CUpdateAgent.h"71 #include "CUpdateAgentAvailableEvent.h"72 #include "CUpdateAgentErrorEvent.h"73 #include "CUpdateAgentStateChangedEvent.h"74 #include "CUpdateAgentSettingsChangedEvent.h"75 70 #include "CUSBDevice.h" 76 71 #include "CUSBDeviceStateChangedEvent.h" … … 220 215 qRegisterMetaType<KGuestMonitorChangedEventType>("KGuestMonitorChangedEventType"); 221 216 qRegisterMetaType<CGuestSession>("CGuestSession"); 222 qRegisterMetaType<CUpdateAgent>("CUpdateAgent");223 qRegisterMetaType<KUpdateChannel>("KUpdateChannel");224 qRegisterMetaType<KUpdateSeverity>("KUpdateSeverity");225 qRegisterMetaType<KUpdateState>("KUpdateState");226 217 } 227 218 … … 610 601 break; 611 602 } 612 case KVBoxEventType_OnUpdateAgentAvailable:613 {614 CUpdateAgentAvailableEvent comEventSpecific(pEvent);615 emit sigUpdateAgentAvailable(comEventSpecific.GetAgent(),616 comEventSpecific.GetVersion(), comEventSpecific.GetChannel(),617 comEventSpecific.GetSeverity(), comEventSpecific.GetDownloadURL(),618 comEventSpecific.GetWebURL(), comEventSpecific.GetReleaseNotes());619 break;620 }621 case KVBoxEventType_OnUpdateAgentError:622 {623 CUpdateAgentErrorEvent comEventSpecific(pEvent);624 emit sigUpdateAgentError(comEventSpecific.GetAgent(), comEventSpecific.GetMsg(), comEventSpecific.GetRcError());625 break;626 }627 case KVBoxEventType_OnUpdateAgentStateChanged:628 {629 CUpdateAgentStateChangedEvent comEventSpecific(pEvent);630 emit sigUpdateAgentStateChanged(comEventSpecific.GetAgent(), comEventSpecific.GetState());631 break;632 }633 case KVBoxEventType_OnUpdateAgentSettingsChanged:634 {635 CUpdateAgentSettingsChangedEvent comEventSpecific(pEvent);636 emit sigUpdateAgentSettingsChanged(comEventSpecific.GetAgent(), comEventSpecific.GetAttributeHint());637 break;638 }639 603 default: break; 640 604 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r94731 r94734 39 39 #include "CNetworkAdapter.h" 40 40 #include "CUSBDevice.h" 41 #include "CUpdateAgent.h"42 41 #include "CVirtualBoxErrorInfo.h" 43 42 … … 190 189 /** @} */ 191 190 192 /** @name Update agent signals193 * @{ */194 /** Notifies about an available update of an update agent. */195 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);196 /** Notifies about an error of an update agent. */197 void sigUpdateAgentError(CUpdateAgent, QString, long);198 /** Notifies about a state change of an update agent. */199 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);200 /** Notifies about update agent @a comAgent settings change. */201 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);202 /** @} */203 204 191 /** @name Progress related signals 205 192 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp
r94731 r94734 78 78 * @param fRegistered Brings whether medium is registered or unregistered. */ 79 79 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 80 /** Notifies about an available update of an update agent. */81 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);82 /** Notifies about an error of an update agent. */83 void sigUpdateAgentError(CUpdateAgent, QString, long);84 /** Notifies about a state change of an update agent. */85 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);86 /** Notifies about update agent @a comAgent settings change. */87 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);88 80 89 81 public: … … 190 182 /* Register event sources in their listeners as well: */ 191 183 m_pQtListener->getWrapped()->registerSource(m_comEventSource, m_comEventListener); 192 193 /* Update agent event handling: */194 const CUpdateAgent comUpdateAgentHost = uiCommon().host().GetUpdateHost();195 AssertWrapperOk(comUpdateAgentHost);196 CEventSource comUpdateAgentHostEventSource = comUpdateAgentHost.GetEventSource();197 AssertWrapperOk(comUpdateAgentHostEventSource);198 199 eventTypes.clear();200 eventTypes201 << KVBoxEventType_OnUpdateAgentAvailable202 << KVBoxEventType_OnUpdateAgentStateChanged203 << KVBoxEventType_OnUpdateAgentError204 << KVBoxEventType_OnUpdateAgentSettingsChanged;205 206 /* Register event listener for event source aggregator: */207 comUpdateAgentHostEventSource.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);208 AssertWrapperOk(m_comEventSource);209 210 /* Register event sources in their listeners as well: */211 m_pQtListener->getWrapped()->registerSource(comUpdateAgentHostEventSource, m_comEventListener);212 184 } 213 185 … … 266 238 connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 267 239 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 268 Qt::DirectConnection);269 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,270 QString, QString, QString)),271 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,272 QString, QString, QString)),273 Qt::DirectConnection);274 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),275 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),276 Qt::DirectConnection);277 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),278 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),279 Qt::DirectConnection);280 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),281 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),282 240 Qt::DirectConnection); 283 241 } … … 399 357 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 400 358 Qt::QueuedConnection); 401 connect(m_pProxy, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,402 QString, QString, QString)),403 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,404 QString, QString, QString)),405 Qt::DirectConnection);406 connect(m_pProxy, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),407 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),408 Qt::DirectConnection);409 connect(m_pProxy, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),410 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),411 Qt::DirectConnection);412 connect(m_pProxy, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),413 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),414 Qt::QueuedConnection);415 359 } 416 360 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h
r94731 r94734 32 32 #include "CMedium.h" 33 33 #include "CMediumAttachment.h" 34 #include "CUpdateAgent.h"35 34 36 35 /* Forward declarations: */ … … 87 86 * @param fRegistered Brings whether medium is registered or unregistered. */ 88 87 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 89 /** Notifies about an available update of an update agent. */90 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);91 /** Notifies about an error of an update agent. */92 void sigUpdateAgentError(CUpdateAgent, QString, long);93 /** Notifies about a state change of an update agent. */94 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);95 /** Notifies about update agent @a comAgent settings change. */96 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);97 88 98 89 public: -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r94731 r94734 38 38 #include "UINotificationObjectItem.h" 39 39 #include "UINotificationModel.h" 40 #include "UIVirtualBoxEventHandler.h" /** @todo EXAMPLE -- REMOVE THIS */41 #include "CUpdateAgent.h" /** @todo EXAMPLE -- REMOVE THIS */42 40 43 41 /* Other VBox includes: */ … … 406 404 } 407 405 408 /** @todo EXAMPLE -- REMOVE THIS */409 void UINotificationCenter::sltUpdateAgentAvailable(CUpdateAgent comAgent, QString strVer, KUpdateChannel, KUpdateSeverity, QString, QString, QString)410 {411 RT_NOREF(comAgent, strVer);412 }413 414 406 void UINotificationCenter::sltHandleOpenButtonToggled(bool fToggled) 415 407 { … … 530 522 connect(gEDataManager, &UIExtraDataManager::sigNotificationCenterOrderChange, 531 523 this, &UINotificationCenter::sltHandleOrderChange); 532 533 /** @todo EXAMPLE -- REMOVE THIS */534 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigUpdateAgentAvailable,535 this, &UINotificationCenter::sltUpdateAgentAvailable);536 524 537 525 /* Prepare the rest of stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r94731 r94734 111 111 /** Issues request to make open button @a fToggled. */ 112 112 void sltHandleOpenButtonToggled(bool fToggled); 113 /** @todo EXAMPLE -- REMOVE THIS */114 void sltUpdateAgentAvailable(CUpdateAgent comAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);115 113 /** Toggles notification-progresses keep approach. */ 116 114 void sltHandleKeepButtonToggled(bool fToggled);
Note:
See TracChangeset
for help on using the changeset viewer.