VirtualBox

Changeset 81739 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 7, 2019 5:13:01 PM (5 years ago)
Author:
vboxsync
Message:

Main/SystemProperties: added a family of attributes (one per relevant enum) which return if some enum value is well enough supported so that the GUI should offer it

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r81688 r81739  
    12691269      <desc>Shared folder device.</desc>
    12701270    </const>
    1271     <const name="Graphics3D"          value="7">
     1271    <const name="Graphics3D"        value="7">
    12721272      <desc>Graphics device 3D activity.</desc>
    12731273    </const>
     
    34993499    <const name="S3" value="3" />
    35003500    <const name="WebDav" value="4" />
    3501     <const name="OCI" value="5" />
    35023501  </enum>
    35033502
     
    1087210871    name="ISystemProperties"
    1087310872    extends="$unknown"
    10874     uuid="d55176e5-6730-4e9e-fc1f-a59b1f44f78f"
     10873    uuid="297ea744-607e-4b8b-841f-23a6eb749a67"
    1087510874    wsmap="managed"
    1087610875    reservedMethods="4" reservedAttributes="16"
     
    1118911188      <desc> The proxy mode setting: System, NoProxy or Manual.</desc>
    1119011189    </attribute>
     11190
    1119111191    <attribute name="proxyURL" type="wstring" readonly="no">
    1119211192      <desc>
     
    1120811208        For compatibility with libproxy, an URL starting with "direct://" will cause
    1120911209        <link to="ProxyMode_NoProxy" /> behavior.
     11210      </desc>
     11211    </attribute>
     11212
     11213    <attribute name="supportedParavirtProviders" type="ParavirtProvider" safearray="yes" readonly="yes">
     11214      <desc>
     11215        Returns an array of officially supported values for enum <link to="ParavirtProvider"/>,
     11216        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11217      </desc>
     11218    </attribute>
     11219
     11220    <attribute name="supportedClipboardModes" type="ClipboardMode" safearray="yes" readonly="yes">
     11221      <desc>
     11222        Returns an array of officially supported values for enum <link to="ClipboardMode"/>,
     11223        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11224      </desc>
     11225    </attribute>
     11226
     11227    <attribute name="supportedDnDModes" type="DnDMode" safearray="yes" readonly="yes">
     11228      <desc>
     11229        Returns an array of officially supported values for enum <link to="DnDMode"/>,
     11230        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11231      </desc>
     11232    </attribute>
     11233
     11234    <attribute name="supportedFirmwareTypes" type="FirmwareType" safearray="yes" readonly="yes">
     11235      <desc>
     11236        Returns an array of officially supported values for enum <link to="FirmwareType"/>,
     11237        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11238      </desc>
     11239    </attribute>
     11240
     11241    <attribute name="supportedPointingHIDTypes" type="PointingHIDType" safearray="yes" readonly="yes">
     11242      <desc>
     11243        Returns an array of officially supported values for enum <link to="PointingHIDType"/>,
     11244        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11245      </desc>
     11246    </attribute>
     11247
     11248    <attribute name="supportedKeyboardHIDTypes" type="KeyboardHIDType" safearray="yes" readonly="yes">
     11249      <desc>
     11250        Returns an array of officially supported values for enum <link to="KeyboardHIDType"/>,
     11251        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11252      </desc>
     11253    </attribute>
     11254
     11255    <attribute name="supportedVFSTypes" type="VFSType" safearray="yes" readonly="yes">
     11256      <desc>
     11257        Returns an array of officially supported values for enum <link to="VFSType"/>,
     11258        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11259      </desc>
     11260    </attribute>
     11261
     11262    <attribute name="supportedImportOptions" type="ImportOptions" safearray="yes" readonly="yes">
     11263      <desc>
     11264        Returns an array of officially supported values for enum <link to="ImportOptions"/>,
     11265        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11266      </desc>
     11267    </attribute>
     11268
     11269    <attribute name="supportedExportOptions" type="ExportOptions" safearray="yes" readonly="yes">
     11270      <desc>
     11271        Returns an array of officially supported values for enum <link to="ExportOptions"/>,
     11272        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11273      </desc>
     11274    </attribute>
     11275
     11276    <attribute name="supportedRecordingAudioCodecs" type="RecordingAudioCodec" safearray="yes" readonly="yes">
     11277      <desc>
     11278        Returns an array of officially supported values for enum <link to="RecordingAudioCodec"/>,
     11279        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11280      </desc>
     11281    </attribute>
     11282
     11283    <attribute name="supportedRecordingVideoCodecs" type="RecordingVideoCodec" safearray="yes" readonly="yes">
     11284      <desc>
     11285        Returns an array of officially supported values for enum <link to="RecordingVideoCodec"/>,
     11286        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11287      </desc>
     11288    </attribute>
     11289
     11290    <attribute name="supportedRecordingVideoScalingMethods" type="RecordingVideoScalingMethod" safearray="yes" readonly="yes">
     11291      <desc>
     11292        Returns an array of officially supported values for enum <link to="RecordingVideoScalingMethod"/>,
     11293        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11294      </desc>
     11295    </attribute>
     11296
     11297    <attribute name="supportedRecordingVideoRateControlModes" type="RecordingVideoRateControlMode" safearray="yes" readonly="yes">
     11298      <desc>
     11299        Returns an array of officially supported values for enum <link to="RecordingVideoRateControlMode"/>,
     11300        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11301      </desc>
     11302    </attribute>
     11303
     11304    <attribute name="supportedGraphicsControllerTypes" type="GraphicsControllerType" safearray="yes" readonly="yes">
     11305      <desc>
     11306        Returns an array of officially supported values for enum <link to="GraphicsControllerType"/>,
     11307        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11308      </desc>
     11309    </attribute>
     11310
     11311    <attribute name="supportedCloneOptions" type="CloneOptions" safearray="yes" readonly="yes">
     11312      <desc>
     11313        Returns an array of officially supported values for enum <link to="CloneOptions"/>,
     11314        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11315      </desc>
     11316    </attribute>
     11317
     11318    <attribute name="supportedAutostopTypes" type="AutostopType" safearray="yes" readonly="yes">
     11319      <desc>
     11320        Returns an array of officially supported values for enum <link to="AutostopType"/>,
     11321        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11322      </desc>
     11323    </attribute>
     11324
     11325    <attribute name="supportedVMProcPriorities" type="VMProcPriority" safearray="yes" readonly="yes">
     11326      <desc>
     11327        Returns an array of officially supported values for enum <link to="VMProcPriority"/>,
     11328        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11329      </desc>
     11330    </attribute>
     11331
     11332    <attribute name="supportedNetworkAttachmentTypes" type="NetworkAttachmentType" safearray="yes" readonly="yes">
     11333      <desc>
     11334        Returns an array of officially supported values for enum <link to="NetworkAttachmentType"/>,
     11335        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11336      </desc>
     11337    </attribute>
     11338
     11339    <attribute name="supportedNetworkAdapterTypes" type="NetworkAdapterType" safearray="yes" readonly="yes">
     11340      <desc>
     11341        Returns an array of officially supported values for enum <link to="NetworkAdapterType"/>,
     11342        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11343      </desc>
     11344    </attribute>
     11345
     11346    <attribute name="supportedPortModes" type="PortMode" safearray="yes" readonly="yes">
     11347      <desc>
     11348        Returns an array of officially supported values for enum <link to="PortMode"/>,
     11349        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11350      </desc>
     11351    </attribute>
     11352
     11353    <attribute name="supportedUartTypes" type="UartType" safearray="yes" readonly="yes">
     11354      <desc>
     11355        Returns an array of officially supported values for enum <link to="UartType"/>,
     11356        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11357      </desc>
     11358    </attribute>
     11359
     11360    <attribute name="supportedUSBControllerTypes" type="USBControllerType" safearray="yes" readonly="yes">
     11361      <desc>
     11362        Returns an array of officially supported values for enum <link to="USBControllerType"/>,
     11363        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11364      </desc>
     11365    </attribute>
     11366
     11367    <attribute name="supportedAudioDriverTypes" type="AudioDriverType" safearray="yes" readonly="yes">
     11368      <desc>
     11369        Returns an array of officially supported values for enum <link to="AudioDriverType"/>,
     11370        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11371      </desc>
     11372    </attribute>
     11373
     11374    <attribute name="supportedAudioControllerTypes" type="AudioControllerType" safearray="yes" readonly="yes">
     11375      <desc>
     11376        Returns an array of officially supported values for enum <link to="AudioControllerType"/>,
     11377        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11378      </desc>
     11379    </attribute>
     11380
     11381    <attribute name="supportedStorageBuses" type="StorageBus" safearray="yes" readonly="yes">
     11382      <desc>
     11383        Returns an array of officially supported values for enum <link to="StorageBus"/>,
     11384        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11385      </desc>
     11386    </attribute>
     11387
     11388    <attribute name="supportedStorageControllerTypes" type="StorageControllerType" safearray="yes" readonly="yes">
     11389      <desc>
     11390        Returns an array of officially supported values for enum <link to="StorageControllerType"/>,
     11391        in the sense of what is e.g. worth offering in the VirtualBox GUI.
     11392      </desc>
     11393    </attribute>
     11394
     11395    <attribute name="supportedChipsetTypes" type="ChipsetType" safearray="yes" readonly="yes">
     11396      <desc>
     11397        Returns an array of officially supported values for enum <link to="ChipsetType"/>,
     11398        in the sense of what is e.g. worth offering in the VirtualBox GUI.
    1121011399      </desc>
    1121111400    </attribute>
     
    2660826797    <method name="exportVM">
    2660926798      <desc>
    26610         Export local VM into the OCI cloud, creating a custom image.
     26799        Export local VM into the cloud, creating a custom image.
    2661126800      </desc>
    2661226801      <param name="description" type="IVirtualSystemDescription" dir="in">
     
    2665826847      <desc>
    2665926848        Returns a form for editing the virtual system description for
    26660         import from OCI.
     26849        import from cloud.
    2666126850      </desc>
    2666226851      <param name="description" type="IVirtualSystemDescription" dir="in">
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r76562 r81739  
    113113    HRESULT getProxyURL(com::Utf8Str &aProxyURL);
    114114    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 getSupportedRecordingVideoScalingMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods);
     127    HRESULT getSupportedRecordingVideoRateControlModes(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);
    115142
    116143    // wrapped ISystemProperties methods
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r80734 r81739  
    10801080}
    10811081
     1082HRESULT 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
     1098HRESULT 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
     1112HRESULT 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
     1126HRESULT 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
     1141HRESULT 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
     1161HRESULT 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
     1177HRESULT 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
     1193HRESULT 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
     1206HRESULT 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
     1220HRESULT 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
     1234HRESULT 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
     1249HRESULT 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
     1265HRESULT 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
     1279HRESULT 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
     1292HRESULT 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
     1307HRESULT 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
     1321HRESULT 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
     1336HRESULT 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
     1355HRESULT 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
     1372HRESULT 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
     1387HRESULT 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
     1400HRESULT 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
     1430HRESULT 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
     1466HRESULT 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
     1479HRESULT 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
     1499HRESULT 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
     1522HRESULT 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
    10821535// public methods only for internal purposes
    10831536/////////////////////////////////////////////////////////////////////////////
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