- Timestamp:
- Aug 29, 2018 7:31:32 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r73926 r73938 2414 2414 } 2415 2415 2416 void VBoxGlobal::startMediumEnumeration( )2416 void VBoxGlobal::startMediumEnumeration(const CMediumVector &mediaList /* = CMediumVector() */) 2417 2417 { 2418 2418 /* Make sure VBoxGlobal is already valid: */ … … 2440 2440 /* Redirect request to medium-enumerator: */ 2441 2441 if (m_pMediumEnumerator) 2442 m_pMediumEnumerator->enumerateMedia( );2442 m_pMediumEnumerator->enumerateMedia(mediaList); 2443 2443 m_meCleanupProtectionToken.unlock(); 2444 2444 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r73926 r73938 34 34 /* COM includes: */ 35 35 #include "VBox/com/Guid.h" 36 #include "CGuestOSType.h" 36 37 #include "CHost.h" 38 #include "CMedium.h" 39 #include "CSession.h" 37 40 #include "CVirtualBoxClient.h" 38 41 #include "CVirtualBox.h" 39 #include "CSession.h"40 #include "CGuestOSType.h"41 42 42 43 /* Other includes: */ … … 53 54 class CHostVideoInputDevice; 54 55 class CMachine; 55 class CMedium;56 56 class CUSBDevice; 57 57 class UIMedium; … … 477 477 * @{ */ 478 478 /** Starts medium enumeration. */ 479 void startMediumEnumeration( );479 void startMediumEnumeration(const CMediumVector &mediaList = CMediumVector()); 480 480 /** Calls refresh for each medium which has been already enumerated. */ 481 481 void refreshMedia(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r73931 r73938 136 136 } 137 137 138 void UIMediumEnumerator::enumerateMedia( )138 void UIMediumEnumerator::enumerateMedia(const CMediumVector &mediaList /* = CMediumVector() */) 139 139 { 140 140 /* Make sure we are not already in progress: */ … … 145 145 UIMediumMap media; 146 146 addNullMediumToMap(media); 147 addMediaToMap(vboxGlobal().virtualBox().GetHardDisks(), media); 148 addMediaToMap(vboxGlobal().host().GetDVDDrives(), media); 149 addMediaToMap(vboxGlobal().virtualBox().GetDVDImages(), media); 150 addMediaToMap(vboxGlobal().host().GetFloppyDrives(), media); 151 addMediaToMap(vboxGlobal().virtualBox().GetFloppyImages(), media); 147 /* If @p mediaList is empty we start the media enumeration with all known media: */ 148 if (mediaList.isEmpty()) 149 { 150 addMediaToMap(vboxGlobal().virtualBox().GetHardDisks(), media); 151 addMediaToMap(vboxGlobal().host().GetDVDDrives(), media); 152 addMediaToMap(vboxGlobal().virtualBox().GetDVDImages(), media); 153 addMediaToMap(vboxGlobal().host().GetFloppyDrives(), media); 154 addMediaToMap(vboxGlobal().virtualBox().GetFloppyImages(), media); 155 } 156 else 157 addMediaToMap(mediaList, media); 152 158 if (VBoxGlobal::isCleaningUp()) 153 159 return; /* VBoxGlobal is cleaning up, abort immediately. */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
r73931 r73938 65 65 /* API: Medium-enumeration stuff: */ 66 66 bool isMediumEnumerationInProgress() const { return m_fMediumEnumerationInProgress; } 67 void enumerateMedia( );67 void enumerateMedia(const CMediumVector &mediaList = CMediumVector()); 68 68 void refreshMedia(); 69 69
Note:
See TracChangeset
for help on using the changeset viewer.