VirtualBox

Changeset 77986 in vbox


Ignore:
Timestamp:
Apr 2, 2019 4:53:28 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: Extend UIMainEventListener with all medium related events, working or not.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r76606 r77986  
    4444#include "CMachineRegisteredEvent.h"
    4545#include "CMediumChangedEvent.h"
     46#include "CMediumConfigChangedEvent.h"
     47#include "CMediumRegisteredEvent.h"
    4648#include "CMouseCapabilityChangedEvent.h"
    4749#include "CMousePointerShapeChangedEvent.h"
     
    5759#include "CSnapshotTakenEvent.h"
    5860#include "CStateChangedEvent.h"
     61#include "CStorageControllerChangedEvent.h"
    5962#include "CStorageDeviceChangedEvent.h"
    6063#include "CUSBDevice.h"
     
    279282            break;
    280283        }
    281 //        case KVBoxEventType_OnMediumRegistered:
    282 //        case KVBoxEventType_OnGuestPropertyChange:
    283284
    284285        case KVBoxEventType_OnExtraDataCanChange:
     
    301302        }
    302303
     304        case KVBoxEventType_OnStorageControllerChanged:
     305        {
     306            CStorageControllerChangedEvent comEventSpecific(pEvent);
     307            emit sigStorageControllerChange();
     308            break;
     309        }
     310        case KVBoxEventType_OnStorageDeviceChanged:
     311        {
     312            CStorageDeviceChangedEvent comEventSpecific(pEvent);
     313            emit sigStorageDeviceChange(comEventSpecific.GetStorageDevice(),
     314                                        comEventSpecific.GetRemoved(),
     315                                        comEventSpecific.GetSilent());
     316            break;
     317        }
     318        case KVBoxEventType_OnMediumChanged:
     319        {
     320            CMediumChangedEvent comEventSpecific(pEvent);
     321            emit sigMediumChange(comEventSpecific.GetMediumAttachment());
     322            break;
     323        }
     324        case KVBoxEventType_OnMediumConfigChanged:
     325        {
     326            CMediumConfigChangedEvent comEventSpecific(pEvent);
     327            emit sigMediumConfigChange(comEventSpecific.GetMedium());
     328            break;
     329        }
     330        case KVBoxEventType_OnMediumRegistered:
     331        {
     332            CMediumRegisteredEvent comEventSpecific(pEvent);
     333            emit sigMediumRegistered(comEventSpecific.GetMediumId(),
     334                                     comEventSpecific.GetMediumType(),
     335                                     comEventSpecific.GetRegistered());
     336            break;
     337        }
     338
    303339        case KVBoxEventType_OnMousePointerShapeChanged:
    304340        {
     
    347383            CNetworkAdapterChangedEvent comEventSpecific(pEvent);
    348384            emit sigNetworkAdapterChange(comEventSpecific.GetNetworkAdapter());
    349             break;
    350         }
    351         case KVBoxEventType_OnStorageDeviceChanged:
    352         {
    353             CStorageDeviceChangedEvent comEventSpecific(pEvent);
    354             emit sigStorageDeviceChange(comEventSpecific.GetStorageDevice(),
    355                                         comEventSpecific.GetRemoved(),
    356                                         comEventSpecific.GetSilent());
    357             break;
    358         }
    359         case KVBoxEventType_OnMediumChanged:
    360         {
    361             CMediumChangedEvent comEventSpecific(pEvent);
    362             emit sigMediumChange(comEventSpecific.GetMediumAttachment());
    363385            break;
    364386        }
     
    440462            break;
    441463        }
     464
    442465        case KVBoxEventType_OnProgressPercentageChanged:
    443466        {
     
    452475            break;
    453476        }
     477
    454478        case KVBoxEventType_OnGuestSessionRegistered:
    455479        {
    456 
    457480            CGuestSessionRegisteredEvent comEventSpecific(pEvent);
    458481            if (comEventSpecific.GetRegistered())
     
    489512            break;
    490513        }
    491 
    492514        case KVBoxEventType_OnGuestFileRegistered:
    493515        case KVBoxEventType_OnGuestFileStateChanged:
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r76581 r77986  
    104104    /** @} */
    105105
     106    /** @name VirtualBox Medium related signals
     107      * @{ */
     108        /** Notifies about storage controller change. */
     109        void sigStorageControllerChange();
     110        /** Notifies about storage device change.
     111          * @param  comAttachment  Brings corresponding attachment.
     112          * @param  fRemoved       Brings whether medium is removed or added.
     113          * @param  fSilent        Brings whether this change has gone silent for guest. */
     114        void sigStorageDeviceChange(CMediumAttachment comAttachment, bool fRemoved, bool fSilent);
     115
     116        /** Notifies about storage medium @a comAttachment state change. */
     117        void sigMediumChange(CMediumAttachment comAttachment);
     118        /** Notifies about storage @a comMedium config change. */
     119        void sigMediumConfigChange(const CMedium &comMedium);
     120        /** Notifies about storage medium is (un)registered.
     121          * @param  uMediumId      Brings corresponding medium ID.
     122          * @param  enmMediumType  Brings corresponding medium type.
     123          * @param  fRegistered    Brings whether medium is registered or unregistered. */
     124        void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered);
     125    /** @} */
     126
    106127    /** @name Console related signals
    107128      * @{ */
     
    121142        /** Notifies about network @a adapter state change. */
    122143        void sigNetworkAdapterChange(CNetworkAdapter comAdapter);
    123         /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
    124         void sigStorageDeviceChange(CMediumAttachment comAttachment, bool fRemoved, bool fSilent);
    125         /** Notifies about storage medium @a attachment state change. */
    126         void sigMediumChange(CMediumAttachment comAttachment);
    127144        /** Notifies about VRDE device state change. */
    128145        void sigVRDEChange();
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