- Timestamp:
- Sep 27, 2023 8:21:09 AM (16 months ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r101200 r101282 2871 2871 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"> 2872 2872 <desc> 2873 Array of guest OS type objects known to this VirtualBox installation.2873 Array of all guest OS type objects known to this VirtualBox installation. 2874 2874 </desc> 2875 2875 </attribute> … … 12691 12691 name="IPlatformProperties" 12692 12692 extends="$unknown" 12693 uuid=" 1ec98a25-d94c-4cfb-a012-5e21481c154c"12693 uuid="6bf432a7-b9e6-4317-ba51-52373dac02de" 12694 12694 wsmap="managed" 12695 12695 rest="managed" … … 12759 12759 <desc> 12760 12760 Returns an array of officially supported values for enum <link to="FirmwareType"/>, 12761 in the sense of what is e.g. worth offering in the VirtualBox GUI. 12762 </desc> 12763 </attribute> 12764 12765 <attribute name="supportedGuestOSTypes" type="IGuestOSType" safearray="yes" readonly="yes"> 12766 <desc> 12767 Returns an array of officially supported values for enum <link to="IGuestOSType"/>, 12761 12768 in the sense of what is e.g. worth offering in the VirtualBox GUI. 12762 12769 </desc> -
trunk/src/VBox/Main/include/PlatformPropertiesImpl.h
r101057 r101282 80 80 HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) RT_OVERRIDE; 81 81 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE; 82 HRESULT getSupportedGuestOSTypes(std::vector<ComPtr<IGuestOSType>> &aSupportedGuestOSTypes); 82 83 HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) RT_OVERRIDE; 83 84 HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) RT_OVERRIDE; -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r101180 r101282 322 322 HRESULT i_releaseCryptoIf(PCVBOXCRYPTOIF pCryptoIf); 323 323 HRESULT i_unloadCryptoIfModule(void); 324 325 324 HRESULT i_getSupportedGuestOSTypes(std::vector<PlatformArchitecture_T> aArchitectures, std::vector<ComPtr<IGuestOSType>> &aGuestOSTypes); 326 325 327 326 private: -
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r101200 r101282 718 718 } 719 719 720 HRESULT PlatformProperties::getSupportedGuestOSTypes(std::vector<ComPtr<IGuestOSType>> &aSupportedGuestOSTypes) 721 { 722 std::vector<PlatformArchitecture_T> vecArchitectures(mPlatformArchitecture); 723 return mParent->i_getSupportedGuestOSTypes(vecArchitectures, aSupportedGuestOSTypes); 724 } 725 720 726 HRESULT PlatformProperties::getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) 721 727 { -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r101180 r101282 1374 1374 } 1375 1375 1376 HRESULT VirtualBox::getGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aGuestOSTypes) 1376 1377 /** 1378 * Returns all supported guest OS types for one ore more platform architecture(s). 1379 * 1380 * @returns HRESULT 1381 * @param aArchitectures Platform architectures to return supported guest OS types for. 1382 * If empty, all supported guest OS for all platform architectures will be returned. 1383 * @param aGuestOSTypes Where to return the supported guest OS types. 1384 * Will be empty if none supported. 1385 */ 1386 HRESULT VirtualBox::i_getSupportedGuestOSTypes(std::vector<PlatformArchitecture_T> aArchitectures, std::vector<ComPtr<IGuestOSType>> &aGuestOSTypes) 1377 1387 { 1378 1388 AutoReadLock al(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS); 1379 1389 1380 com::SafeArray<PlatformArchitecture_T> supportedPlatformArchitectures;1381 HRESULT hrc = m->pSystemProperties->COMGETTER(SupportedPlatformArchitectures)(ComSafeArrayAsOutParam(supportedPlatformArchitectures));1382 ComAssertComRCRetRC(hrc);1383 1384 1390 aGuestOSTypes.clear(); 1385 1391 … … 1389 1395 { 1390 1396 bool fFound = false; 1391 if ( supportedPlatformArchitectures.size() == 0) /* If empty, we add all types we have. */1397 if (aArchitectures.size() == 0) /* If empty, we add all types we have. */ 1392 1398 fFound = true; 1393 1399 else 1394 1400 { 1395 for (size_t i = 0; i < supportedPlatformArchitectures.size(); i++)1401 for (size_t i = 0; i < aArchitectures.size(); i++) 1396 1402 { 1397 if ( supportedPlatformArchitectures[i] == (*it)->i_platformArchitecture())1403 if (aArchitectures[i] == (*it)->i_platformArchitecture()) 1398 1404 { 1399 1405 fFound = true; … … 1412 1418 1413 1419 return S_OK; 1420 } 1421 1422 HRESULT VirtualBox::getGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aGuestOSTypes) 1423 { 1424 std::vector<PlatformArchitecture_T> vecArchitectures; /* Stays empty to return all guest OS types. */ 1425 return VirtualBox::i_getSupportedGuestOSTypes(vecArchitectures, aGuestOSTypes); 1414 1426 } 1415 1427
Note:
See TracChangeset
for help on using the changeset viewer.