third_party/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
/**
 *  Removes all machine filters from the USB proxy service and then calls
 *  Host::detachAllUSBDevices().
 *
 *  Called by Console from the VM process upon normal VM termination or by
 *  SessionMachine::uninit() upon abnormal VM termination (from under the
 *  Machine/SessionMachine lock).
 *
 *  @note Locks what called methods lock.
 */
Removes all machine filters from the USB proxy service and then calls
Host::detachAllUSBDevices().

Called by Console from the VM process upon normal VM termination or by
SessionMachine::uninit() upon abnormal VM termination (from under the
Machine/SessionMachine lock).

@note Locks what called methods lock.
Removes all machine filters from the USB proxy service and then calls Host :: detachAllUSBDevices () . Called by Console from the VM process upon normal VM termination or by SessionMachine :: uninit () upon abnormal VM termination ( from under the Machine / SessionMachine lock ) . @note Locks what called methods lock .
HRESULT SessionMachine::detachAllUSBDevices(BOOL aDone)
{
    LogFlowThisFunc(("\n"));
#ifdef VBOX_WITH_USB
    HRESULT rc = mUSBDeviceFilters->i_notifyProxy(false );
    AssertComRC(rc);
    NOREF(rc);
    USBProxyService *service = mParent->i_host()->i_usbProxyService();
    AssertReturn(service, E_FAIL);
    return service->detachAllDevicesFromVM(this, !!aDone, false );
#else
    NOREF(aDone);
    return S_OK;
#endif
}
HRESULT SessionMachine :: detachAllUSBDevices ( BOOL aDone ) { LogFlowThisFunc ( ( " \n " ) ) ; #ifdef VBOX_WITH_USB HRESULT rc = mUSBDeviceFilters -> i_notifyProxy ( false ) ; AssertComRC ( rc ) ; NOREF ( rc ) ; USBProxyService * service = mParent -> i_host ( ) -> i_usbProxyService ( ) ; AssertReturn ( service , E_FAIL ) ; return service -> detachAllDevicesFromVM ( this , ! ! aDone , false ) ; #else NOREF ( aDone ) ; return S_OK ; #endif }
Removes all machine filters from the USB proxy service and then calls
  Host::detachAllUSBDevices().
Removes all machine filters from the USB proxy service and then calls Host :: detachAllUSBDevices () .
/* aInsertFilters */ /* aAbnormal */