Changeset 81739 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Nov 7, 2019 5:13:01 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134511
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r80734 r81739 1080 1080 } 1081 1081 1082 HRESULT SystemProperties::getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders) 1083 { 1084 static const ParavirtProvider_T aParavirtProviders[] = 1085 { 1086 ParavirtProvider_None, 1087 ParavirtProvider_Default, 1088 ParavirtProvider_Legacy, 1089 ParavirtProvider_Minimal, 1090 ParavirtProvider_HyperV, 1091 ParavirtProvider_KVM, 1092 }; 1093 aSupportedParavirtProviders.assign(aParavirtProviders, 1094 aParavirtProviders + RT_ELEMENTS(aParavirtProviders)); 1095 return S_OK; 1096 } 1097 1098 HRESULT SystemProperties::getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes) 1099 { 1100 static const ClipboardMode_T aClipboardModes[] = 1101 { 1102 ClipboardMode_Disabled, 1103 ClipboardMode_HostToGuest, 1104 ClipboardMode_GuestToHost, 1105 ClipboardMode_Bidirectional, 1106 }; 1107 aSupportedClipboardModes.assign(aClipboardModes, 1108 aClipboardModes + RT_ELEMENTS(aClipboardModes)); 1109 return S_OK; 1110 } 1111 1112 HRESULT SystemProperties::getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes) 1113 { 1114 static const DnDMode_T aDnDModes[] = 1115 { 1116 DnDMode_Disabled, 1117 DnDMode_HostToGuest, 1118 DnDMode_GuestToHost, 1119 DnDMode_Bidirectional, 1120 }; 1121 aSupportedDnDModes.assign(aDnDModes, 1122 aDnDModes + RT_ELEMENTS(aDnDModes)); 1123 return S_OK; 1124 } 1125 1126 HRESULT SystemProperties::getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) 1127 { 1128 static const FirmwareType_T aFirmwareTypes[] = 1129 { 1130 FirmwareType_BIOS, 1131 FirmwareType_EFI, 1132 FirmwareType_EFI32, 1133 FirmwareType_EFI64, 1134 FirmwareType_EFIDUAL, 1135 }; 1136 aSupportedFirmwareTypes.assign(aFirmwareTypes, 1137 aFirmwareTypes + RT_ELEMENTS(aFirmwareTypes)); 1138 return S_OK; 1139 } 1140 1141 HRESULT SystemProperties::getSupportedPointingHIDTypes(std::vector<PointingHIDType_T> &aSupportedPointingHIDTypes) 1142 { 1143 static const PointingHIDType_T aPointingHIDTypes[] = 1144 { 1145 PointingHIDType_None, 1146 PointingHIDType_PS2Mouse, 1147 #ifdef DEBUG 1148 PointingHIDType_USBMouse, 1149 #endif 1150 PointingHIDType_USBTablet, 1151 #ifdef DEBUG 1152 PointingHIDType_ComboMouse, 1153 #endif 1154 PointingHIDType_USBMultiTouch, 1155 }; 1156 aSupportedPointingHIDTypes.assign(aPointingHIDTypes, 1157 aPointingHIDTypes + RT_ELEMENTS(aPointingHIDTypes)); 1158 return S_OK; 1159 } 1160 1161 HRESULT SystemProperties::getSupportedKeyboardHIDTypes(std::vector<KeyboardHIDType_T> &aSupportedKeyboardHIDTypes) 1162 { 1163 static const KeyboardHIDType_T aKeyboardHIDTypes[] = 1164 { 1165 KeyboardHIDType_None, 1166 KeyboardHIDType_PS2Keyboard, 1167 KeyboardHIDType_USBKeyboard, 1168 #ifdef DEBUG 1169 KeyboardHIDType_ComboKeyboard, 1170 #endif 1171 }; 1172 aSupportedKeyboardHIDTypes.assign(aKeyboardHIDTypes, 1173 aKeyboardHIDTypes + RT_ELEMENTS(aKeyboardHIDTypes)); 1174 return S_OK; 1175 } 1176 1177 HRESULT SystemProperties::getSupportedVFSTypes(std::vector<VFSType_T> &aSupportedVFSTypes) 1178 { 1179 static const VFSType_T aVFSTypes[] = 1180 { 1181 VFSType_File, 1182 VFSType_Cloud, 1183 VFSType_S3, 1184 #ifdef DEBUG 1185 VFSType_WebDav, 1186 #endif 1187 }; 1188 aSupportedVFSTypes.assign(aVFSTypes, 1189 aVFSTypes + RT_ELEMENTS(aVFSTypes)); 1190 return S_OK; 1191 } 1192 1193 HRESULT SystemProperties::getSupportedImportOptions(std::vector<ImportOptions_T> &aSupportedImportOptions) 1194 { 1195 static const ImportOptions_T aImportOptions[] = 1196 { 1197 ImportOptions_KeepAllMACs, 1198 ImportOptions_KeepNATMACs, 1199 ImportOptions_ImportToVDI, 1200 }; 1201 aSupportedImportOptions.assign(aImportOptions, 1202 aImportOptions + RT_ELEMENTS(aImportOptions)); 1203 return S_OK; 1204 } 1205 1206 HRESULT SystemProperties::getSupportedExportOptions(std::vector<ExportOptions_T> &aSupportedExportOptions) 1207 { 1208 static const ExportOptions_T aExportOptions[] = 1209 { 1210 ExportOptions_CreateManifest, 1211 ExportOptions_ExportDVDImages, 1212 ExportOptions_StripAllMACs, 1213 ExportOptions_StripAllNonNATMACs, 1214 }; 1215 aSupportedExportOptions.assign(aExportOptions, 1216 aExportOptions + RT_ELEMENTS(aExportOptions)); 1217 return S_OK; 1218 } 1219 1220 HRESULT SystemProperties::getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs) 1221 { 1222 static const RecordingAudioCodec_T aRecordingAudioCodecs[] = 1223 { 1224 #ifdef DEBUG 1225 RecordingAudioCodec_WavPCM, 1226 #endif 1227 RecordingAudioCodec_Opus, 1228 }; 1229 aSupportedRecordingAudioCodecs.assign(aRecordingAudioCodecs, 1230 aRecordingAudioCodecs + RT_ELEMENTS(aRecordingAudioCodecs)); 1231 return S_OK; 1232 } 1233 1234 HRESULT SystemProperties::getSupportedRecordingVideoCodecs(std::vector<RecordingVideoCodec_T> &aSupportedRecordingVideoCodecs) 1235 { 1236 static const RecordingVideoCodec_T aRecordingVideoCodecs[] = 1237 { 1238 RecordingVideoCodec_VP8, 1239 #ifdef DEBUG 1240 RecordingVideoCodec_VP9, 1241 RecordingVideoCodec_AV1, 1242 #endif 1243 }; 1244 aSupportedRecordingVideoCodecs.assign(aRecordingVideoCodecs, 1245 aRecordingVideoCodecs + RT_ELEMENTS(aRecordingVideoCodecs)); 1246 return S_OK; 1247 } 1248 1249 HRESULT SystemProperties::getSupportedRecordingVideoScalingMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods) 1250 { 1251 static const RecordingVideoScalingMethod_T aRecordingVideoScalingMethods[] = 1252 { 1253 RecordingVideoScalingMethod_None, 1254 #ifdef DEBUG 1255 RecordingVideoScalingMethod_NearestNeighbor, 1256 RecordingVideoScalingMethod_Bilinear, 1257 RecordingVideoScalingMethod_Bicubic, 1258 #endif 1259 }; 1260 aSupportedRecordingVideoScalingMethods.assign(aRecordingVideoScalingMethods, 1261 aRecordingVideoScalingMethods + RT_ELEMENTS(aRecordingVideoScalingMethods)); 1262 return S_OK; 1263 } 1264 1265 HRESULT SystemProperties::getSupportedRecordingVideoRateControlModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes) 1266 { 1267 static const RecordingVideoRateControlMode_T aRecordingVideoRateControlModes[] = 1268 { 1269 RecordingVideoRateControlMode_CBR, 1270 #ifdef DEBUG 1271 RecordingVideoRateControlMode_VBR, 1272 #endif 1273 }; 1274 aSupportedRecordingVideoRateControlModes.assign(aRecordingVideoRateControlModes, 1275 aRecordingVideoRateControlModes + RT_ELEMENTS(aRecordingVideoRateControlModes)); 1276 return S_OK; 1277 } 1278 1279 HRESULT SystemProperties::getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) 1280 { 1281 static const GraphicsControllerType_T aGraphicsControllerTypes[] = 1282 { 1283 GraphicsControllerType_VBoxVGA, 1284 GraphicsControllerType_VMSVGA, 1285 GraphicsControllerType_VBoxSVGA, 1286 }; 1287 aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes, 1288 aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes)); 1289 return S_OK; 1290 } 1291 1292 HRESULT SystemProperties::getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) 1293 { 1294 static const CloneOptions_T aCloneOptions[] = 1295 { 1296 CloneOptions_Link, 1297 CloneOptions_KeepAllMACs, 1298 CloneOptions_KeepNATMACs, 1299 CloneOptions_KeepDiskNames, 1300 CloneOptions_KeepHwUUIDs, 1301 }; 1302 aSupportedCloneOptions.assign(aCloneOptions, 1303 aCloneOptions + RT_ELEMENTS(aCloneOptions)); 1304 return S_OK; 1305 } 1306 1307 HRESULT SystemProperties::getSupportedAutostopTypes(std::vector<AutostopType_T> &aSupportedAutostopTypes) 1308 { 1309 static const AutostopType_T aAutostopTypes[] = 1310 { 1311 AutostopType_Disabled, 1312 AutostopType_SaveState, 1313 AutostopType_PowerOff, 1314 AutostopType_AcpiShutdown, 1315 }; 1316 aSupportedAutostopTypes.assign(aAutostopTypes, 1317 aAutostopTypes + RT_ELEMENTS(aAutostopTypes)); 1318 return S_OK; 1319 } 1320 1321 HRESULT SystemProperties::getSupportedVMProcPriorities(std::vector<VMProcPriority_T> &aSupportedVMProcPriorities) 1322 { 1323 static const VMProcPriority_T aVMProcPriorities[] = 1324 { 1325 VMProcPriority_Default, 1326 VMProcPriority_Flat, 1327 VMProcPriority_Low, 1328 VMProcPriority_Normal, 1329 VMProcPriority_High, 1330 }; 1331 aSupportedVMProcPriorities.assign(aVMProcPriorities, 1332 aVMProcPriorities + RT_ELEMENTS(aVMProcPriorities)); 1333 return S_OK; 1334 } 1335 1336 HRESULT SystemProperties::getSupportedNetworkAttachmentTypes(std::vector<NetworkAttachmentType_T> &aSupportedNetworkAttachmentTypes) 1337 { 1338 static const NetworkAttachmentType_T aNetworkAttachmentTypes[] = 1339 { 1340 NetworkAttachmentType_NAT, 1341 NetworkAttachmentType_Bridged, 1342 NetworkAttachmentType_Internal, 1343 NetworkAttachmentType_HostOnly, 1344 NetworkAttachmentType_Generic, 1345 NetworkAttachmentType_NATNetwork, 1346 #ifdef DEBUG 1347 NetworkAttachmentType_Cloud, 1348 #endif 1349 }; 1350 aSupportedNetworkAttachmentTypes.assign(aNetworkAttachmentTypes, 1351 aNetworkAttachmentTypes + RT_ELEMENTS(aNetworkAttachmentTypes)); 1352 return S_OK; 1353 } 1354 1355 HRESULT SystemProperties::getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) 1356 { 1357 static const NetworkAdapterType_T aNetworkAdapterTypes[] = 1358 { 1359 NetworkAdapterType_Am79C970A, 1360 NetworkAdapterType_Am79C973, 1361 NetworkAdapterType_I82540EM, 1362 NetworkAdapterType_I82543GC, 1363 NetworkAdapterType_I82545EM, 1364 NetworkAdapterType_Virtio, 1365 NetworkAdapterType_Am79C960, 1366 }; 1367 aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes, 1368 aNetworkAdapterTypes + RT_ELEMENTS(aNetworkAdapterTypes)); 1369 return S_OK; 1370 } 1371 1372 HRESULT SystemProperties::getSupportedPortModes(std::vector<PortMode_T> &aSupportedPortModes) 1373 { 1374 static const PortMode_T aPortModes[] = 1375 { 1376 PortMode_Disconnected, 1377 PortMode_HostPipe, 1378 PortMode_HostDevice, 1379 PortMode_RawFile, 1380 PortMode_TCP, 1381 }; 1382 aSupportedPortModes.assign(aPortModes, 1383 aPortModes + RT_ELEMENTS(aPortModes)); 1384 return S_OK; 1385 } 1386 1387 HRESULT SystemProperties::getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) 1388 { 1389 static const UartType_T aUartTypes[] = 1390 { 1391 UartType_U16450, 1392 UartType_U16550A, 1393 UartType_U16750, 1394 }; 1395 aSupportedUartTypes.assign(aUartTypes, 1396 aUartTypes + RT_ELEMENTS(aUartTypes)); 1397 return S_OK; 1398 } 1399 1400 HRESULT SystemProperties::getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes) 1401 { 1402 static const USBControllerType_T aUSBControllerTypesWithoutExtPack[] = 1403 { 1404 USBControllerType_OHCI, 1405 }; 1406 static const USBControllerType_T aUSBControllerTypesWithExtPack[] = 1407 { 1408 USBControllerType_OHCI, 1409 USBControllerType_EHCI, 1410 USBControllerType_XHCI, 1411 }; 1412 bool fExtPack = false; 1413 # ifdef VBOX_WITH_EXTPACK 1414 static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack"; 1415 if (mParent->i_getExtPackManager()->i_isExtPackUsable(s_pszUsbExtPackName)) 1416 # endif 1417 { 1418 fExtPack = true; 1419 } 1420 1421 if (fExtPack) 1422 aSupportedUSBControllerTypes.assign(aUSBControllerTypesWithExtPack, 1423 aUSBControllerTypesWithExtPack + RT_ELEMENTS(aUSBControllerTypesWithExtPack)); 1424 else 1425 aSupportedUSBControllerTypes.assign(aUSBControllerTypesWithoutExtPack, 1426 aUSBControllerTypesWithoutExtPack + RT_ELEMENTS(aUSBControllerTypesWithoutExtPack)); 1427 return S_OK; 1428 } 1429 1430 HRESULT SystemProperties::getSupportedAudioDriverTypes(std::vector<AudioDriverType_T> &aSupportedAudioDriverTypes) 1431 { 1432 static const AudioDriverType_T aAudioDriverTypes[] = 1433 { 1434 #ifdef RT_OS_WINDOWS 1435 # if 0 /* deprecated for many years now */ 1436 AudioDriverType_WinMM, 1437 # endif 1438 AudioDriverType_DirectSound, 1439 #endif 1440 #ifdef RT_OS_DARWIN 1441 AudioDriverType_CoreAudio, 1442 #endif 1443 #ifdef RT_OS_OS2 1444 AudioDriverType_MMPM, 1445 #endif 1446 #ifdef RT_OS_SOLARIS 1447 # if 0 /* deprecated for many years now */ 1448 AudioDriverType_SolAudio, 1449 # endif 1450 #endif 1451 #ifdef VBOX_WITH_AUDIO_ALSA 1452 AudioDriverType_ALSA, 1453 #endif 1454 #ifdef VBOX_WITH_AUDIO_OSS 1455 AudioDriverType_OSS, 1456 #endif 1457 #ifdef VBOX_WITH_AUDIO_PULSE 1458 AudioDriverType_Pulse, 1459 #endif 1460 }; 1461 aSupportedAudioDriverTypes.assign(aAudioDriverTypes, 1462 aAudioDriverTypes + RT_ELEMENTS(aAudioDriverTypes)); 1463 return S_OK; 1464 } 1465 1466 HRESULT SystemProperties::getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) 1467 { 1468 static const AudioControllerType_T aAudioControllerTypes[] = 1469 { 1470 AudioControllerType_AC97, 1471 AudioControllerType_SB16, 1472 AudioControllerType_HDA, 1473 }; 1474 aSupportedAudioControllerTypes.assign(aAudioControllerTypes, 1475 aAudioControllerTypes + RT_ELEMENTS(aAudioControllerTypes)); 1476 return S_OK; 1477 } 1478 1479 HRESULT SystemProperties::getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) 1480 { 1481 static const StorageBus_T aStorageBuses[] = 1482 { 1483 StorageBus_IDE, 1484 StorageBus_SATA, 1485 StorageBus_SCSI, 1486 StorageBus_Floppy, 1487 StorageBus_SAS, 1488 StorageBus_USB, 1489 StorageBus_PCIe, 1490 #ifdef DEBUG 1491 StorageBus_VirtioSCSI, 1492 #endif 1493 }; 1494 aSupportedStorageBuses.assign(aStorageBuses, 1495 aStorageBuses + RT_ELEMENTS(aStorageBuses)); 1496 return S_OK; 1497 } 1498 1499 HRESULT SystemProperties::getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) 1500 { 1501 static const StorageControllerType_T aStorageControllerTypes[] = 1502 { 1503 StorageControllerType_LsiLogic, 1504 StorageControllerType_BusLogic, 1505 StorageControllerType_IntelAhci, 1506 StorageControllerType_PIIX3, 1507 StorageControllerType_PIIX4, 1508 StorageControllerType_ICH6, 1509 StorageControllerType_I82078, 1510 StorageControllerType_LsiLogicSas, 1511 StorageControllerType_USB, 1512 StorageControllerType_NVMe, 1513 #ifdef DEBUG 1514 StorageControllerType_VirtioSCSI, 1515 #endif 1516 }; 1517 aSupportedStorageControllerTypes.assign(aStorageControllerTypes, 1518 aStorageControllerTypes + RT_ELEMENTS(aStorageControllerTypes)); 1519 return S_OK; 1520 } 1521 1522 HRESULT SystemProperties::getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) 1523 { 1524 static const ChipsetType_T aChipsetTypes[] = 1525 { 1526 ChipsetType_PIIX3, 1527 ChipsetType_ICH9, 1528 }; 1529 aSupportedChipsetTypes.assign(aChipsetTypes, 1530 aChipsetTypes + RT_ELEMENTS(aChipsetTypes)); 1531 return S_OK; 1532 } 1533 1534 1082 1535 // public methods only for internal purposes 1083 1536 /////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.