USBProxyService.cpp revision 8fb7401164a3b87c2464c9e38d199f9fd9f5cfad
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * VirtualBox USB Proxy Service (base) class.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * Copyright (C) 2006-2007 innotek GmbH
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * available from http://www.virtualbox.org. This file is free software;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * General Public License as published by the Free Software Foundation,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * If you received this file as part of a commercial VirtualBox
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * distribution, then only the terms of your commercial VirtualBox
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * license agreement apply instead of the previous paragraph.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync/** @todo add the required locking. */
mTerminate = true;
return mLastError;
wait (0);
processChanges ();
mTerminate = false;
return rc;
mTerminate = false;
return rc;
while (pDevices)
if (pDevices)
while ( pCur
if (pCur)
if (pHead)
return pHead;
if (pDevices)
|| pDevices)
int iDiff;
if (!pDevices)
if (!iDiff)
Log (("USBProxyService::processChanges: state change %p:{.idVendor=%#06x, .idProduct=%#06x, .pszProduct=\"%s\", .pszManufacturer=\"%s\"} state=%d%s\n",
(HostUSBDevice *)DevPtr, pCur->idVendor, pCur->idProduct, pCur->pszProduct, pCur->pszManufacturer, DevPtr->state(), DevPtr->isStatePending() ? " (pending async op)" : ""));
It++;
if (iDiff > 0)
Log (("USBProxyService::processChanges: attached %p/%p:{.idVendor=%#06x, .idProduct=%#06x, .pszProduct=\"%s\", .pszManufacturer=\"%s\"}\n",
(HostUSBDevice *)NewObj, pNew, pNew->idVendor, pNew->idProduct, pNew->pszProduct, pNew->pszManufacturer));
It++;
return VINF_SUCCESS;
while (cCfgs-- > 0)
while (cIfs-- > 0)
pIf++;
pCfg++;
if (!aSerial)
if (!u8)
pu8++;
return u64;
case USBDeviceState_USBDeviceUnavailable: aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST; break;
case USBDeviceState_USBDeviceBusy: aUSBDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; break;
return VERR_NOT_IMPLEMENTED;
return NULL;
return VERR_NOT_IMPLEMENTED;
return VERR_NOT_IMPLEMENTED;
return VERR_NOT_IMPLEMENTED;