VirtualBox

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


Ignore:
Timestamp:
Nov 14, 2007 1:15:00 PM (17 years ago)
Author:
vboxsync
Message:

enclosed some more code in VBOX_WITH_VBOX tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r5741 r5742  
    19261926STDMETHODIMP Console::AttachUSBDevice (INPTR GUIDPARAM aId)
    19271927{
     1928#ifdef VBOX_WITH_USB
    19281929    AutoCaller autoCaller (this);
    19291930    CheckComRCReturnRC (autoCaller.rc());
     
    19741975
    19751976    return rc;
     1977
     1978#else   /* !VBOX_WITH_USB */
     1979    return setError (E_FAIL,
     1980        tr ("The virtual machine does not have a USB controller"));
     1981#endif  /* !VBOX_WITH_USB */
    19761982}
    19771983
    19781984STDMETHODIMP Console::DetachUSBDevice (INPTR GUIDPARAM aId, IUSBDevice **aDevice)
    19791985{
     1986#ifdef VBOX_WITH_USB
    19801987    if (!aDevice)
    19811988        return E_POINTER;
     
    20042011            Guid (aId).raw());
    20052012
    2006 #ifdef RT_OS_DARWIN
     2013# ifdef RT_OS_DARWIN
    20072014    /* Notify the USB Proxy that we're about to detach the device. Since
    20082015     * we don't dare do IPC when holding the console lock, so we'll have
     
    20192026    if (it == mUSBDevices.end())
    20202027        return S_OK;
    2021 #endif
     2028# endif
    20222029
    20232030    /* First, request VMM to detach the device */
     
    20362043
    20372044    return rc;
     2045
     2046
     2047#else   /* !VBOX_WITH_USB */
     2048
     2049    return setError (E_INVALIDARG,
     2050        tr ("USB device with UUID {%Vuuid} is not attached to this machine"),
     2051        Guid (aId).raw());
     2052#endif  /* !VBOX_WITH_USB */
    20382053}
    20392054
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