VirtualBox

Changeset 34907 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 9, 2010 4:39:41 PM (14 years ago)
Author:
vboxsync
Message:

Main/FE/Qt: don't enable USB 2.0 support for new VMs if the proper ExtPack is not installed

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp

    r34740 r34907  
    742742    {
    743743        usbController.SetEnabled(true);
    744         usbController.SetEnabledEhci(true);
     744
     745        /*
     746         * USB 2.0 is only available if the proper ExtPack is installed.
     747         *
     748         * Note. Configuring EHCI here and providing messages about
     749         * the missing extpack isn't exactly clean, but it is a
     750         * necessary evil to patch over legacy compatability issues
     751         * introduced by the new distribution model.
     752         */
     753        static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack";
     754        CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
     755        if (manager.IsExtPackUsable(s_pszUsbExtPackName))
     756            usbController.SetEnabledEhci(true);
    745757    }
    746758
  • trunk/src/VBox/Main/ExtPackManagerImpl.cpp

    r34897 r34907  
    20082008}
    20092009
     2010STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable)
     2011{
     2012    CheckComArgNotNull(a_bstrExtPack);
     2013    Utf8Str strExtPack(a_bstrExtPack);
     2014    *aUsable = isExtPackUsable(strExtPack.c_str());
     2015    return S_OK;
     2016}
     2017
    20102018
    20112019/**
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r34902 r34907  
    1456314563    </method>
    1456414564
     14565    <method name="IsExtPackUsable">
     14566      <desc>Check if the given extension pack is loaded and usable.</desc>
     14567      <param name="name" type="wstring" dir="in">
     14568        <desc>The name of the extension pack to check for.</desc>
     14569      </param>
     14570      <param name="usable" type="boolean" dir="return"/>
     14571    </method>
     14572
    1456514573  </interface>
    1456614574
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r34897 r34907  
    214214    STDMETHOD(Cleanup)(void);
    215215    STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
     216    STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));
    216217    /** @}  */
    217218
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