VirtualBox

Ignore:
Timestamp:
May 7, 2008 3:24:57 PM (17 years ago)
Author:
vboxsync
Message:

Removed the duplicate USB device list in Host and moved 4 methods over to USBProxyService.

File:
1 edited

Legend:

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

    r8603 r8666  
    74607460        NOREF (rc);
    74617461
    7462         mParent->host()->detachAllUSBDevices (this, true /* aDone */, true /* aAbnormal */);
     7462        USBProxyService *service = mParent->host()->usbProxyService();
     7463        if (service)
     7464            service->detachAllDevicesFromVM (this, true /* aDone */, true /* aAbnormal */);
    74637465    }
    74647466#endif /* VBOX_WITH_USB */
     
    76627664
    76637665#ifdef VBOX_WITH_USB
    7664     /* if cautureUSBDevice() fails, it must have set extended error info */
    7665     return mParent->host()->captureUSBDevice (this, aId);
     7666    /* if captureDeviceForVM() fails, it must have set extended error info */
     7667    MultiResult rc = mParent->host()->checkUSBProxyService();
     7668    CheckComRCReturnRC (rc);
     7669
     7670    USBProxyService *service = mParent->host()->usbProxyService();
     7671    AssertReturn (service, E_FAIL);
     7672    return service->captureDeviceForVM (this, aId);
    76667673#else
    76677674    return E_FAIL;
     
    76807687
    76817688#ifdef VBOX_WITH_USB
    7682     return mParent->host()->detachUSBDevice (this, aId, aDone);
     7689    USBProxyService *service = mParent->host()->usbProxyService();
     7690    AssertReturn (service, E_FAIL);
     7691    return service->detachDeviceFromVM (this, aId, aDone);
    76837692#else
    76847693    return E_FAIL;
     
    77067715    NOREF (rc);
    77077716
    7708     return mParent->host()->autoCaptureUSBDevices (this);
     7717    USBProxyService *service = mParent->host()->usbProxyService();
     7718    AssertReturn (service, E_FAIL);
     7719    return service->autoCaptureDevicesForVM (this);
    77097720#else
    77107721    return S_OK;
     
    77347745    NOREF (rc);
    77357746
    7736     return mParent->host()->detachAllUSBDevices (this, aDone, false /* aAbnormal */);
     7747    USBProxyService *service = mParent->host()->usbProxyService();
     7748    AssertReturn (service, E_FAIL);
     7749    return service->detachAllDevicesFromVM (this, aDone, false /* aAbnormal */);
    77377750#else
    77387751    return S_OK;
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