Changeset 82268 in vbox
- Timestamp:
- Nov 28, 2019 4:15:37 PM (5 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r82100 r82268 10747 10747 name="ISystemProperties" 10748 10748 extends="$unknown" 10749 uuid=" 297ea744-607e-4b8b-841f-23a6eb749a67"10749 uuid="027bc463-929c-40e8-bf16-fea557cd8e7e" 10750 10750 wsmap="managed" 10751 10751 reservedMethods="4" reservedAttributes="16" … … 11383 11383 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return"> 11384 11384 <desc>The list of all supported device types for the given storage bus.</desc> 11385 </param> 11386 </method> 11387 11388 <method name="getStorageBusForStorageControllerType"> 11389 <desc>Returns the <link to="StorageBus"/> enum value 11390 for a given storage controller type.</desc> 11391 11392 <param name="storageControllerType" type="StorageControllerType" dir="in"> 11393 <desc>The storage controller type to get the value for.</desc> 11394 </param> 11395 11396 <param name="storageBus" type="StorageBus" dir="return"> 11397 <desc>The storage bus which is applicable.</desc> 11398 </param> 11399 </method> 11400 11401 <method name="getStorageControllerTypesForStorageBus"> 11402 <desc>Returns the possible <link to="StorageControllerType"/> enum values 11403 for a given storage bus.</desc> 11404 11405 <param name="storageBus" type="StorageBus" dir="in"> 11406 <desc>The storage bus type to get the values for.</desc> 11407 </param> 11408 11409 <param name="storageControllerType" type="StorageControllerType" safearray="yes" dir="return"> 11410 <desc>The enum values (sorted by what should be a sensible decreasing 11411 importance of the type) which are valid.</desc> 11385 11412 </param> 11386 11413 </method> -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r81740 r82268 64 64 65 65 // wrapped ISystemProperties properties 66 HRESULT getMinGuestRAM(ULONG *aMinGuestRAM) ;67 HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM) ;68 HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM) ;69 HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM) ;70 HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount) ;71 HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount) ;72 HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors) ;73 HRESULT getInfoVDSize(LONG64 *aInfoVDSize) ;74 HRESULT getSerialPortCount(ULONG *aSerialPortCount) ;75 HRESULT getParallelPortCount(ULONG *aParallelPortCount) ;76 HRESULT getMaxBootPosition(ULONG *aMaxBootPosition) ;77 HRESULT getRawModeSupported(BOOL *aRawModeSupported) ;78 HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt) ;79 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt) ;80 HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder) ;81 HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder) ;82 HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel) ;83 HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel) ;84 HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats) ;85 HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat) ;86 HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat) ;87 HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning) ;88 HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning) ;89 HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning) ;90 HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning) ;91 HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError) ;92 HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError) ;93 HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError) ;94 HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError) ;95 HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary) ;96 HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary) ;97 HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary) ;98 HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary) ;99 HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack) ;100 HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack) ;101 HRESULT getLogHistoryCount(ULONG *aLogHistoryCount) ;102 HRESULT setLogHistoryCount(ULONG aLogHistoryCount) ;103 HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver) ;104 HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath) ;105 HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath) ;106 HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO) ;107 HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO) ;108 HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend) ;109 HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend) ;110 HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats) ;111 HRESULT getProxyMode(ProxyMode_T *pProxyMode) ;112 HRESULT setProxyMode(ProxyMode_T aProxyMode) ;113 HRESULT getProxyURL(com::Utf8Str &aProxyURL) ;114 HRESULT setProxyURL(const com::Utf8Str &aProxyURL) ;115 HRESULT getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders) ;116 HRESULT getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes) ;117 HRESULT getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes) ;118 HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) ;119 HRESULT getSupportedPointingHIDTypes(std::vector<PointingHIDType_T> &aSupportedPointingHIDTypes) ;120 HRESULT getSupportedKeyboardHIDTypes(std::vector<KeyboardHIDType_T> &aSupportedKeyboardHIDTypes) ;121 HRESULT getSupportedVFSTypes(std::vector<VFSType_T> &aSupportedVFSTypes) ;122 HRESULT getSupportedImportOptions(std::vector<ImportOptions_T> &aSupportedImportOptions) ;123 HRESULT getSupportedExportOptions(std::vector<ExportOptions_T> &aSupportedExportOptions) ;124 HRESULT getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs) ;125 HRESULT getSupportedRecordingVideoCodecs(std::vector<RecordingVideoCodec_T> &aSupportedRecordingVideoCodecs) ;126 HRESULT getSupportedRecordingVSMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods) ;127 HRESULT getSupportedRecordingVRCModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes) ;128 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) ;129 HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) ;130 HRESULT getSupportedAutostopTypes(std::vector<AutostopType_T> &aSupportedAutostopTypes) ;131 HRESULT getSupportedVMProcPriorities(std::vector<VMProcPriority_T> &aSupportedVMProcPriorities) ;132 HRESULT getSupportedNetworkAttachmentTypes(std::vector<NetworkAttachmentType_T> &aSupportedNetworkAttachmentTypes) ;133 HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) ;134 HRESULT getSupportedPortModes(std::vector<PortMode_T> &aSupportedPortModes) ;135 HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) ;136 HRESULT getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes) ;137 HRESULT getSupportedAudioDriverTypes(std::vector<AudioDriverType_T> &aSupportedAudioDriverTypes) ;138 HRESULT getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) ;139 HRESULT getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) ;140 HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) ;141 HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) ;66 HRESULT getMinGuestRAM(ULONG *aMinGuestRAM) RT_OVERRIDE; 67 HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM) RT_OVERRIDE; 68 HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM) RT_OVERRIDE; 69 HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM) RT_OVERRIDE; 70 HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount) RT_OVERRIDE; 71 HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount) RT_OVERRIDE; 72 HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors) RT_OVERRIDE; 73 HRESULT getInfoVDSize(LONG64 *aInfoVDSize) RT_OVERRIDE; 74 HRESULT getSerialPortCount(ULONG *aSerialPortCount) RT_OVERRIDE; 75 HRESULT getParallelPortCount(ULONG *aParallelPortCount) RT_OVERRIDE; 76 HRESULT getMaxBootPosition(ULONG *aMaxBootPosition) RT_OVERRIDE; 77 HRESULT getRawModeSupported(BOOL *aRawModeSupported) RT_OVERRIDE; 78 HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt) RT_OVERRIDE; 79 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt) RT_OVERRIDE; 80 HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder) RT_OVERRIDE; 81 HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder) RT_OVERRIDE; 82 HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel) RT_OVERRIDE; 83 HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel) RT_OVERRIDE; 84 HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats) RT_OVERRIDE; 85 HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat) RT_OVERRIDE; 86 HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat) RT_OVERRIDE; 87 HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning) RT_OVERRIDE; 88 HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning) RT_OVERRIDE; 89 HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning) RT_OVERRIDE; 90 HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning) RT_OVERRIDE; 91 HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError) RT_OVERRIDE; 92 HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError) RT_OVERRIDE; 93 HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError) RT_OVERRIDE; 94 HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError) RT_OVERRIDE; 95 HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary) RT_OVERRIDE; 96 HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary) RT_OVERRIDE; 97 HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary) RT_OVERRIDE; 98 HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary) RT_OVERRIDE; 99 HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack) RT_OVERRIDE; 100 HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack) RT_OVERRIDE; 101 HRESULT getLogHistoryCount(ULONG *aLogHistoryCount) RT_OVERRIDE; 102 HRESULT setLogHistoryCount(ULONG aLogHistoryCount) RT_OVERRIDE; 103 HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver) RT_OVERRIDE; 104 HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath) RT_OVERRIDE; 105 HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath) RT_OVERRIDE; 106 HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO) RT_OVERRIDE; 107 HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO) RT_OVERRIDE; 108 HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend) RT_OVERRIDE; 109 HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend) RT_OVERRIDE; 110 HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats) RT_OVERRIDE; 111 HRESULT getProxyMode(ProxyMode_T *pProxyMode) RT_OVERRIDE; 112 HRESULT setProxyMode(ProxyMode_T aProxyMode) RT_OVERRIDE; 113 HRESULT getProxyURL(com::Utf8Str &aProxyURL) RT_OVERRIDE; 114 HRESULT setProxyURL(const com::Utf8Str &aProxyURL) RT_OVERRIDE; 115 HRESULT getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders) RT_OVERRIDE; 116 HRESULT getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes) RT_OVERRIDE; 117 HRESULT getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes) RT_OVERRIDE; 118 HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) RT_OVERRIDE; 119 HRESULT getSupportedPointingHIDTypes(std::vector<PointingHIDType_T> &aSupportedPointingHIDTypes) RT_OVERRIDE; 120 HRESULT getSupportedKeyboardHIDTypes(std::vector<KeyboardHIDType_T> &aSupportedKeyboardHIDTypes) RT_OVERRIDE; 121 HRESULT getSupportedVFSTypes(std::vector<VFSType_T> &aSupportedVFSTypes) RT_OVERRIDE; 122 HRESULT getSupportedImportOptions(std::vector<ImportOptions_T> &aSupportedImportOptions) RT_OVERRIDE; 123 HRESULT getSupportedExportOptions(std::vector<ExportOptions_T> &aSupportedExportOptions) RT_OVERRIDE; 124 HRESULT getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs) RT_OVERRIDE; 125 HRESULT getSupportedRecordingVideoCodecs(std::vector<RecordingVideoCodec_T> &aSupportedRecordingVideoCodecs) RT_OVERRIDE; 126 HRESULT getSupportedRecordingVSMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods) RT_OVERRIDE; 127 HRESULT getSupportedRecordingVRCModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes) RT_OVERRIDE; 128 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE; 129 HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) RT_OVERRIDE; 130 HRESULT getSupportedAutostopTypes(std::vector<AutostopType_T> &aSupportedAutostopTypes) RT_OVERRIDE; 131 HRESULT getSupportedVMProcPriorities(std::vector<VMProcPriority_T> &aSupportedVMProcPriorities) RT_OVERRIDE; 132 HRESULT getSupportedNetworkAttachmentTypes(std::vector<NetworkAttachmentType_T> &aSupportedNetworkAttachmentTypes) RT_OVERRIDE; 133 HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) RT_OVERRIDE; 134 HRESULT getSupportedPortModes(std::vector<PortMode_T> &aSupportedPortModes) RT_OVERRIDE; 135 HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) RT_OVERRIDE; 136 HRESULT getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes) RT_OVERRIDE; 137 HRESULT getSupportedAudioDriverTypes(std::vector<AudioDriverType_T> &aSupportedAudioDriverTypes) RT_OVERRIDE; 138 HRESULT getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) RT_OVERRIDE; 139 HRESULT getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) RT_OVERRIDE; 140 HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) RT_OVERRIDE; 141 HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) RT_OVERRIDE; 142 142 143 143 // wrapped ISystemProperties methods 144 144 HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset, 145 ULONG *aMaxNetworkAdapters) ;145 ULONG *aMaxNetworkAdapters) RT_OVERRIDE; 146 146 HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset, 147 147 NetworkAttachmentType_T aType, 148 ULONG *aMaxNetworkAdapters) ;148 ULONG *aMaxNetworkAdapters) RT_OVERRIDE; 149 149 HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus, 150 ULONG *aMaxDevicesPerPort) ;150 ULONG *aMaxDevicesPerPort) RT_OVERRIDE; 151 151 HRESULT getMinPortCountForStorageBus(StorageBus_T aBus, 152 ULONG *aMinPortCount) ;152 ULONG *aMinPortCount) RT_OVERRIDE; 153 153 HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus, 154 ULONG *aMaxPortCount) ;154 ULONG *aMaxPortCount) RT_OVERRIDE; 155 155 HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset, 156 156 StorageBus_T aBus, 157 ULONG *aMaxInstances) ;157 ULONG *aMaxInstances) RT_OVERRIDE; 158 158 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus, 159 std::vector<DeviceType_T> &aDeviceTypes); 159 std::vector<DeviceType_T> &aDeviceTypes) RT_OVERRIDE; 160 HRESULT getStorageBusForStorageControllerType(StorageControllerType_T aStorageControllerType, 161 StorageBus_T *aStorageBus) RT_OVERRIDE; 162 HRESULT getStorageControllerTypesForStorageBus(StorageBus_T aStorageBus, 163 std::vector<StorageControllerType_T> &aStorageControllerTypes) RT_OVERRIDE; 160 164 HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType, 161 BOOL *aEnabled) ;165 BOOL *aEnabled) RT_OVERRIDE; 162 166 HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType, 163 BOOL *aHotplugCapable) ;167 BOOL *aHotplugCapable) RT_OVERRIDE; 164 168 HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset, 165 169 USBControllerType_T aType, 166 ULONG *aMaxInstances) ;170 ULONG *aMaxInstances) RT_OVERRIDE; 167 171 168 172 HRESULT i_getUserHomeDirectory(Utf8Str &strPath); -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r82251 r82268 536 536 default: 537 537 AssertMsgFailed(("Invalid bus type %d\n", aBus)); 538 } 539 540 return S_OK; 541 } 542 543 HRESULT SystemProperties::getStorageBusForStorageControllerType(StorageControllerType_T aStorageControllerType, 544 StorageBus_T *aStorageBus) 545 { 546 /* no need to lock, this is const */ 547 switch (aStorageControllerType) 548 { 549 case StorageControllerType_LsiLogic: 550 case StorageControllerType_BusLogic: 551 *aStorageBus = StorageBus_SCSI; 552 break; 553 case StorageControllerType_IntelAhci: 554 *aStorageBus = StorageBus_SATA; 555 break; 556 case StorageControllerType_PIIX3: 557 case StorageControllerType_PIIX4: 558 case StorageControllerType_ICH6: 559 *aStorageBus = StorageBus_IDE; 560 break; 561 case StorageControllerType_I82078: 562 *aStorageBus = StorageBus_Floppy; 563 break; 564 case StorageControllerType_LsiLogicSas: 565 *aStorageBus = StorageBus_SAS; 566 break; 567 case StorageControllerType_USB: 568 *aStorageBus = StorageBus_USB; 569 break; 570 case StorageControllerType_NVMe: 571 *aStorageBus = StorageBus_PCIe; 572 break; 573 case StorageControllerType_VirtioSCSI: 574 *aStorageBus = StorageBus_VirtioSCSI; 575 break; 576 default: 577 return setError(E_FAIL, tr("Invalid storage controller type %d\n"), aStorageBus); 578 } 579 580 return S_OK; 581 } 582 583 HRESULT SystemProperties::getStorageControllerTypesForStorageBus(StorageBus_T aStorageBus, 584 std::vector<StorageControllerType_T> &aStorageControllerTypes) 585 { 586 aStorageControllerTypes.resize(0); 587 588 /* no need to lock, this is const */ 589 switch (aStorageBus) 590 { 591 case StorageBus_IDE: 592 aStorageControllerTypes.resize(3); 593 aStorageControllerTypes[0] = StorageControllerType_PIIX4; 594 aStorageControllerTypes[1] = StorageControllerType_PIIX3; 595 aStorageControllerTypes[2] = StorageControllerType_ICH6; 596 break; 597 case StorageBus_SATA: 598 aStorageControllerTypes.resize(1); 599 aStorageControllerTypes[0] = StorageControllerType_IntelAhci; 600 break; 601 case StorageBus_SCSI: 602 aStorageControllerTypes.resize(2); 603 aStorageControllerTypes[0] = StorageControllerType_LsiLogic; 604 aStorageControllerTypes[1] = StorageControllerType_BusLogic; 605 break; 606 case StorageBus_Floppy: 607 aStorageControllerTypes.resize(1); 608 aStorageControllerTypes[0] = StorageControllerType_I82078; 609 break; 610 case StorageBus_SAS: 611 aStorageControllerTypes.resize(1); 612 aStorageControllerTypes[0] = StorageControllerType_LsiLogicSas; 613 break; 614 case StorageBus_USB: 615 aStorageControllerTypes.resize(1); 616 aStorageControllerTypes[0] = StorageControllerType_USB; 617 break; 618 case StorageBus_PCIe: 619 aStorageControllerTypes.resize(1); 620 aStorageControllerTypes[0] = StorageControllerType_NVMe; 621 break; 622 case StorageBus_VirtioSCSI: 623 aStorageControllerTypes.resize(1); 624 aStorageControllerTypes[0] = StorageControllerType_VirtioSCSI; 625 break; 626 default: 627 return setError(E_FAIL, tr("Invalid storage bus %d\n"), aStorageBus); 538 628 } 539 629
Note:
See TracChangeset
for help on using the changeset viewer.