VirtualBox

Changeset 101117 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 13, 2023 4:34:30 PM (17 months ago)
Author:
vboxsync
Message:

Main: Added ISystemProperties::getSupportedPlatformArchitectures(), for letting the clients know which platforms are supported (as guests). bugref:10384

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

Legend:

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

    r101077 r101117  
    1295212952    name="ISystemProperties"
    1295312953    extends="$unknown"
    12954     uuid="584dad7d-120f-40fa-91c2-fc520f60fdf2"
     12954    uuid="bed5b0ec-e866-401b-ac32-fd63aa67954b"
    1295512955    wsmap="managed"
    1295612956    rest="managed"
     
    1326213262        For compatibility with libproxy, an URL starting with "direct://" will cause
    1326313263        <link to="ProxyMode_NoProxy" /> behavior.
     13264      </desc>
     13265    </attribute>
     13266
     13267    <attribute name="supportedPlatformArchitectures" type="PlatformArchitecture" safearray="yes" readonly="yes">
     13268      <desc>
     13269        Returns an array of officially supported values for enum <link to="PlatformArchitecture"/>,
     13270        in the sense of what is e.g. worth offering in the VirtualBox GUI.
    1326413271      </desc>
    1326513272    </attribute>
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r101035 r101117  
    123123    HRESULT getProxyURL(com::Utf8Str &aProxyURL) RT_OVERRIDE;
    124124    HRESULT setProxyURL(const com::Utf8Str &aProxyURL) RT_OVERRIDE;
     125    HRESULT getSupportedPlatformArchitectures(std::vector<PlatformArchitecture_T> &aSupportedPlatformArchitectures);
    125126    HRESULT getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes) RT_OVERRIDE;
    126127    HRESULT getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes) RT_OVERRIDE;
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r101035 r101117  
    10211021}
    10221022
     1023HRESULT SystemProperties::getSupportedPlatformArchitectures(std::vector<PlatformArchitecture_T> &aSupportedPlatformArchitectures)
     1024{
     1025    static const PlatformArchitecture_T aPlatformArchitectures[] =
     1026    {
     1027        /* Currently we only support same-same architectures (host == guest). */
     1028#if   defined(RT_ARCH_X86)   || defined(RT_ARCH_AMD64)
     1029        PlatformArchitecture_x86
     1030#elif defined(RT_ARCH_ARM32) || defined(RT_ARCH_ARM64)
     1031        PlatformArchitecture_ARM
     1032#else
     1033# error "Port me!"
     1034        PlatformArchitecture_None
     1035#endif
     1036    };
     1037    aSupportedPlatformArchitectures.assign(aPlatformArchitectures,
     1038                                           aPlatformArchitectures + RT_ELEMENTS(aPlatformArchitectures));
     1039    return S_OK;
     1040}
     1041
    10231042HRESULT SystemProperties::getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes)
    10241043{
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