- Timestamp:
- Apr 29, 2016 11:18:03 AM (9 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/USBProxyBackend.h
r60744 r60758 56 56 virtual const com::Utf8Str &i_getBackend(); 57 57 uint32_t i_getRefCount(); 58 59 virtual bool i_isDevReEnumerationRequired(); 58 60 59 61 /** @name Interface for the USBController and the Host object. … … 156 158 virtual void releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); 157 159 160 virtual bool i_isDevReEnumerationRequired(); 161 158 162 protected: 159 163 virtual int wait(RTMSINTERVAL aMillies); … … 294 298 virtual void releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess); 295 299 300 virtual bool i_isDevReEnumerationRequired(); 301 296 302 protected: 297 303 virtual int wait(RTMSINTERVAL aMillies); … … 324 330 virtual int captureDevice (HostUSBDevice *aDevice); 325 331 virtual int releaseDevice (HostUSBDevice *aDevice); 332 333 virtual bool i_isDevReEnumerationRequired(); 326 334 327 335 protected: -
trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
r60712 r60758 469 469 */ 470 470 LogFlowThisFunc(("{%s} capturing the device.\n", mName)); 471 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) /* PORTME */ 472 i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM, kHostUSBDeviceSubState_AwaitingDetach);473 #else474 i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM);475 #endif 471 if (mUSBProxyBackend->i_isDevReEnumerationRequired()) 472 i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM, kHostUSBDeviceSubState_AwaitingDetach); 473 else 474 i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM); 475 476 476 mMachine = aMachine; 477 477 mMaskedIfs = aMaskedIfs; … … 731 731 * Try release it. 732 732 */ 733 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) /* PORTME */ 734 i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused, kHostUSBDeviceSubState_AwaitingDetach);735 #else736 i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused);737 #endif 733 if (mUSBProxyBackend->i_isDevReEnumerationRequired()) 734 i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused, kHostUSBDeviceSubState_AwaitingDetach); 735 else 736 i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused); 737 738 738 alock.release(); 739 739 int rc = mUSBProxyBackend->releaseDevice(this); … … 784 784 * Do the job. 785 785 */ 786 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) /* PORTME */ 787 i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy, kHostUSBDeviceSubState_AwaitingDetach);788 #else789 i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy);790 #endif 786 if (mUSBProxyBackend->i_isDevReEnumerationRequired()) 787 i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy, kHostUSBDeviceSubState_AwaitingDetach); 788 else 789 i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy); 790 791 791 alock.release(); 792 792 int rc = mUSBProxyBackend->captureDevice(this); -
trunk/src/VBox/Main/src-server/USBProxyBackend.cpp
r60744 r60758 234 234 235 235 bool USBProxyBackend::isFakeUpdateRequired() 236 { 237 return false; 238 } 239 240 /** 241 * Returns whether devices reported by this backend go through a de/re-attach 242 * and device re-enumeration cycle when they are captured or released. 243 */ 244 bool USBProxyBackend::i_isDevReEnumerationRequired() 236 245 { 237 246 return false; -
trunk/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp
r60742 r60758 222 222 223 223 224 /** 225 * Returns whether devices reported by this backend go through a de/re-attach 226 * and device re-enumeration cycle when they are captured or released. 227 */ 228 bool USBProxyBackendDarwin::i_isDevReEnumerationRequired() 229 { 230 return true; 231 } 232 233 224 234 int USBProxyBackendDarwin::wait(RTMSINTERVAL aMillies) 225 235 { -
trunk/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp
r60742 r60758 461 461 462 462 /** 463 * Returns whether devices reported by this backend go through a de/re-attach 464 * and device re-enumeration cycle when they are captured or released. 465 */ 466 bool USBProxyBackendSolaris::i_isDevReEnumerationRequired() 467 { 468 return true; 469 } 470 471 472 /** 463 473 * Wrapper called by walkDeviceNode. 464 474 * -
trunk/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp
r60742 r60758 227 227 228 228 229 /** 230 * Returns whether devices reported by this backend go through a de/re-attach 231 * and device re-enumeration cycle when they are captured or released. 232 */ 233 bool USBProxyBackendWindows::i_isDevReEnumerationRequired() 234 { 235 return true; 236 } 237 238 229 239 int USBProxyBackendWindows::wait(unsigned aMillies) 230 240 {
Note:
See TracChangeset
for help on using the changeset viewer.