- Timestamp:
- Dec 14, 2015 2:28:25 PM (9 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 6 edited
-
HostUSBDeviceImpl.cpp (modified) (1 diff)
-
darwin/USBProxyBackendDarwin.cpp (modified) (17 diffs)
-
freebsd/USBProxyBackendFreeBSD.cpp (modified) (11 diffs)
-
os2/USBProxyBackendOs2.cpp (modified) (2 diffs)
-
solaris/USBProxyBackendSolaris.cpp (modified) (14 diffs)
-
win/USBProxyBackendWindows.cpp (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
r59117 r59119 989 989 int HostUSBDevice::i_compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach /*= false */) 990 990 { 991 if (strcmp(aDev1->pszBackend, aDev2->pszBackend)) 992 { 993 return 1; 994 } 991 /* Comparing devices from different backends doesn't make any sense and should not happen. */ 992 AssertReturn(!strcmp(aDev1->pszBackend, aDev2->pszBackend), -1); 995 993 996 994 /* -
trunk/src/VBox/Main/src-server/darwin/USBProxyBackendDarwin.cpp
r59117 r59119 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #include "USBProxy Service.h"22 #include "USBProxyBackend.h" 23 23 #include "Logging.h" 24 24 #include "iokit.h" … … 39 39 * Initialize data members. 40 40 */ 41 USBProxy ServiceDarwin::USBProxyServiceDarwin(Host *aHost)42 : USBProxy Service(aHost), mServiceRunLoopRef(NULL), mNotifyOpaque(NULL), mWaitABitNextTime(false), mUSBLibInitialized(false)43 { 44 LogFlowThisFunc(("a Host=%p\n", aHost));41 USBProxyBackendDarwin::USBProxyBackendDarwin(USBProxyService *aUsbProxyService) 42 : USBProxyBackend(aUsbProxyService), mServiceRunLoopRef(NULL), mNotifyOpaque(NULL), mWaitABitNextTime(false), mUSBLibInitialized(false) 43 { 44 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 45 45 } 46 46 … … 51 51 * @returns VBox status code. 52 52 */ 53 int USBProxy ServiceDarwin::init(void)53 int USBProxyBackendDarwin::init(void) 54 54 { 55 55 /* … … 73 73 * Stop all service threads and free the device chain. 74 74 */ 75 USBProxy ServiceDarwin::~USBProxyServiceDarwin()75 USBProxyBackendDarwin::~USBProxyBackendDarwin() 76 76 { 77 77 LogFlowThisFunc(("\n")); … … 94 94 95 95 96 void *USBProxy ServiceDarwin::insertFilter(PCUSBFILTER aFilter)96 void *USBProxyBackendDarwin::insertFilter(PCUSBFILTER aFilter) 97 97 { 98 98 return USBLibAddFilter(aFilter); … … 100 100 101 101 102 void USBProxy ServiceDarwin::removeFilter(void *aId)102 void USBProxyBackendDarwin::removeFilter(void *aId) 103 103 { 104 104 USBLibRemoveFilter(aId); … … 106 106 107 107 108 int USBProxy ServiceDarwin::captureDevice(HostUSBDevice *aDevice)108 int USBProxyBackendDarwin::captureDevice(HostUSBDevice *aDevice) 109 109 { 110 110 /* … … 144 144 145 145 146 void USBProxy ServiceDarwin::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)146 void USBProxyBackendDarwin::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess) 147 147 { 148 148 AssertReturnVoid(aDevice->isWriteLockOnCurrentThread()); … … 158 158 159 159 160 int USBProxy ServiceDarwin::releaseDevice(HostUSBDevice *aDevice)160 int USBProxyBackendDarwin::releaseDevice(HostUSBDevice *aDevice) 161 161 { 162 162 /* … … 198 198 199 199 200 void USBProxy ServiceDarwin::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)200 void USBProxyBackendDarwin::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess) 201 201 { 202 202 AssertReturnVoid(aDevice->isWriteLockOnCurrentThread()); … … 213 213 214 214 /** @todo unused */ 215 void USBProxy ServiceDarwin::detachingDevice(HostUSBDevice *aDevice)215 void USBProxyBackendDarwin::detachingDevice(HostUSBDevice *aDevice) 216 216 { 217 217 NOREF(aDevice); … … 219 219 220 220 221 bool USBProxy ServiceDarwin::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine)221 bool USBProxyBackendDarwin::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, SessionMachine **aIgnoreMachine) 222 222 { 223 223 AssertReturn(aDevice, false); … … 228 228 229 229 230 int USBProxy ServiceDarwin::wait(RTMSINTERVAL aMillies)230 int USBProxyBackendDarwin::wait(RTMSINTERVAL aMillies) 231 231 { 232 232 SInt32 rc = CFRunLoopRunInMode(CFSTR(VBOX_IOKIT_MODE_STRING), … … 243 243 244 244 245 int USBProxy ServiceDarwin::interruptWait(void)245 int USBProxyBackendDarwin::interruptWait(void) 246 246 { 247 247 if (mServiceRunLoopRef) … … 251 251 252 252 253 PUSBDEVICE USBProxy ServiceDarwin::getDevices(void)253 PUSBDEVICE USBProxyBackendDarwin::getDevices(void) 254 254 { 255 255 /* call iokit.cpp */ … … 258 258 259 259 260 void USBProxy ServiceDarwin::serviceThreadInit(void)260 void USBProxyBackendDarwin::serviceThreadInit(void) 261 261 { 262 262 mServiceRunLoopRef = CFRunLoopGetCurrent(); … … 265 265 266 266 267 void USBProxy ServiceDarwin::serviceThreadTerm(void)267 void USBProxyBackendDarwin::serviceThreadTerm(void) 268 268 { 269 269 DarwinUnsubscribeUSBNotifications(mNotifyOpaque); -
trunk/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
r59117 r59119 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #include "USBProxy Service.h"22 #include "USBProxyBackend.h" 23 23 #include "Logging.h" 24 24 … … 60 60 * Initialize data members. 61 61 */ 62 USBProxy ServiceFreeBSD::USBProxyServiceFreeBSD(Host *aHost)63 : USBProxy Service(aHost)64 { 65 LogFlowThisFunc(("a Host=%p\n", aHost));62 USBProxyBackendFreeBSD::USBProxyBackendFreeBSD(USBProxyService *aUsbProxyService) 63 : USBProxyBackend(aHost) 64 { 65 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 66 66 } 67 67 … … 72 72 * @returns S_OK on success and non-fatal failures, some COM error otherwise. 73 73 */ 74 int USBProxy ServiceFreeBSD::init(void)74 int USBProxyBackendFreeBSD::init(void) 75 75 { 76 76 /* … … 92 92 * Stop all service threads and free the device chain. 93 93 */ 94 USBProxy ServiceFreeBSD::~USBProxyServiceFreeBSD()94 USBProxyBackendFreeBSD::~USBProxyBackendFreeBSD() 95 95 { 96 96 LogFlowThisFunc(("\n")); … … 107 107 108 108 109 int USBProxy ServiceFreeBSD::captureDevice(HostUSBDevice *aDevice)109 int USBProxyBackendFreeBSD::captureDevice(HostUSBDevice *aDevice) 110 110 { 111 111 AssertReturn(aDevice, VERR_GENERAL_FAILURE); … … 126 126 127 127 128 int USBProxy ServiceFreeBSD::releaseDevice(HostUSBDevice *aDevice)128 int USBProxyBackendFreeBSD::releaseDevice(HostUSBDevice *aDevice) 129 129 { 130 130 AssertReturn(aDevice, VERR_GENERAL_FAILURE); … … 145 145 146 146 147 bool USBProxy ServiceFreeBSD::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,147 bool USBProxyBackendFreeBSD::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, 148 148 SessionMachine **aIgnoreMachine) 149 149 { … … 160 160 * See USBProxyService::deviceAdded for details. 161 161 */ 162 void USBProxy ServiceFreeBSD::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines,162 void USBProxyBackendFreeBSD::deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, 163 163 PUSBDEVICE aUSBDevice) 164 164 { … … 166 166 } 167 167 168 int USBProxy ServiceFreeBSD::wait(RTMSINTERVAL aMillies)168 int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies) 169 169 { 170 170 return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000); … … 172 172 173 173 174 int USBProxy ServiceFreeBSD::interruptWait(void)174 int USBProxyBackendFreeBSD::interruptWait(void) 175 175 { 176 176 return RTSemEventSignal(mNotifyEventSem); … … 218 218 } 219 219 220 PUSBDEVICE USBProxy ServiceFreeBSD::getDevices(void)220 PUSBDEVICE USBProxyBackendFreeBSD::getDevices(void) 221 221 { 222 222 PUSBDEVICE pDevices = NULL; -
trunk/src/VBox/Main/src-server/os2/USBProxyBackendOs2.cpp
r59117 r59119 22 22 #define INCL_BASE 23 23 #define INCL_ERRORS 24 #include "USBProxy Service.h"24 #include "USBProxyBackend.h" 25 25 #include "Logging.h" 26 26 … … 38 38 * Initialize data members. 39 39 */ 40 USBProxy ServiceOs2::USBProxyServiceOs2(Host *aHost)41 : USBProxy Service(aHost), mhev(NULLHANDLE), mhmod(NULLHANDLE),40 USBProxyBackendOs2::USBProxyBackendOs2(USBProxyService *aUsbProxyService) 41 : USBProxyBackend(aUsbProxyService), mhev(NULLHANDLE), mhmod(NULLHANDLE), 42 42 mpfnUsbRegisterChangeNotification(NULL), mpfnUsbDeregisterNotification(NULL), 43 43 mpfnUsbQueryNumberDevices(NULL), mpfnUsbQueryDeviceReport(NULL) 44 44 { 45 LogFlowThisFunc(("a Host=%p\n", aHost));45 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 46 46 47 47 /* -
trunk/src/VBox/Main/src-server/solaris/USBProxyBackendSolaris.cpp
r59117 r59119 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #include "USBProxy Service.h"22 #include "USBProxyBackend.h" 23 23 #include "Logging.h" 24 24 … … 55 55 * Initialize data members. 56 56 */ 57 USBProxy ServiceSolaris::USBProxyServiceSolaris(Host *aHost)58 : USBProxy Service(aHost), mUSBLibInitialized(false)59 { 60 LogFlowThisFunc(("a Host=%p\n", aHost));57 USBProxyBackendSolaris::USBProxyBackendSolaris(USBProxyService *aUsbProxyService) 58 : USBProxyBackend(aUsbProxyService), mUSBLibInitialized(false) 59 { 60 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 61 61 } 62 62 … … 67 67 * @returns VBox status code. 68 68 */ 69 int USBProxy ServiceSolaris::init(void)69 int USBProxyBackendSolaris::init(void) 70 70 { 71 71 /* … … 99 99 * Stop all service threads and free the device chain. 100 100 */ 101 USBProxy ServiceSolaris::~USBProxyServiceSolaris()101 USBProxyBackendSolaris::~USBProxyBackendSolaris() 102 102 { 103 103 LogFlowThisFunc(("destruct\n")); … … 123 123 124 124 125 void *USBProxy ServiceSolaris::insertFilter(PCUSBFILTER aFilter)125 void *USBProxyBackendSolaris::insertFilter(PCUSBFILTER aFilter) 126 126 { 127 127 return USBLibAddFilter(aFilter); … … 129 129 130 130 131 void USBProxyServiceSolaris::removeFilter(void *pvID)131 voidUSBProxyBackendSolaris::removeFilter(void *pvID) 132 132 { 133 133 USBLibRemoveFilter(pvID); … … 135 135 136 136 137 int USBProxy ServiceSolaris::wait(RTMSINTERVAL aMillies)137 int USBProxyBackendSolaris::wait(RTMSINTERVAL aMillies) 138 138 { 139 139 return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : RT_MIN(aMillies, 5000)); … … 141 141 142 142 143 int USBProxy ServiceSolaris::interruptWait(void)143 int USBProxyBackendSolaris::interruptWait(void) 144 144 { 145 145 return RTSemEventSignal(mNotifyEventSem); … … 147 147 148 148 149 PUSBDEVICE USBProxy ServiceSolaris::getDevices(void)149 PUSBDEVICE USBProxyBackendSolaris::getDevices(void) 150 150 { 151 151 USBDEVICELIST DevList; … … 328 328 329 329 330 int USBProxy ServiceSolaris::captureDevice(HostUSBDevice *aDevice)330 int USBProxyBackendSolaris::captureDevice(HostUSBDevice *aDevice) 331 331 { 332 332 /* … … 370 370 371 371 372 void USBProxy ServiceSolaris::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)372 void USBProxyBackendSolaris::captureDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess) 373 373 { 374 374 AssertReturnVoid(aDevice->isWriteLockOnCurrentThread()); … … 383 383 384 384 385 int USBProxy ServiceSolaris::releaseDevice(HostUSBDevice *aDevice)385 int USBProxyBackendSolaris::releaseDevice(HostUSBDevice *aDevice) 386 386 { 387 387 /* … … 425 425 426 426 427 void USBProxy ServiceSolaris::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess)427 void USBProxyBackendSolaris::releaseDeviceCompleted(HostUSBDevice *aDevice, bool aSuccess) 428 428 { 429 429 AssertReturnVoid(aDevice->isWriteLockOnCurrentThread()); … … 438 438 439 439 440 bool USBProxy ServiceSolaris::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,440 bool USBProxyBackendSolaris::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, 441 441 SessionMachine **aIgnoreMachine) 442 442 { -
trunk/src/VBox/Main/src-server/win/USBProxyBackendWindows.cpp
r59117 r59119 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #include "USBProxy Service.h"22 #include "USBProxyBackend.h" 23 23 #include "Logging.h" 24 24 … … 38 38 * Initialize data members. 39 39 */ 40 USBProxy ServiceWindows::USBProxyServiceWindows(Host *aHost)41 : USBProxy Service(aHost), mhEventInterrupt(INVALID_HANDLE_VALUE)42 { 43 LogFlowThisFunc(("a Host=%p\n", aHost));40 USBProxyBackendWindows::USBProxyBackendWindows(USBProxyService *aUsbProxyService) 41 : USBProxyBackend(aHost), mhEventInterrupt(INVALID_HANDLE_VALUE) 42 { 43 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 44 44 } 45 45 … … 50 50 * @returns S_OK on success and non-fatal failures, some COM error otherwise. 51 51 */ 52 int USBProxy ServiceWindows::init(void)52 int USBProxyBackendWindows::init(void) 53 53 { 54 54 /* … … 88 88 * Stop all service threads and free the device chain. 89 89 */ 90 USBProxy ServiceWindows::~USBProxyServiceWindows()90 USBProxyBackendWindows::~USBProxyBackendWindows() 91 91 { 92 92 LogFlowThisFunc(("\n")); … … 110 110 111 111 112 void *USBProxy ServiceWindows::insertFilter(PCUSBFILTER aFilter)112 void *USBProxyBackendWindows::insertFilter(PCUSBFILTER aFilter) 113 113 { 114 114 AssertReturn(aFilter, NULL); … … 124 124 125 125 126 void USBProxy ServiceWindows::removeFilter(void *aID)126 void USBProxyBackendWindows::removeFilter(void *aID) 127 127 { 128 128 LogFlow(("USBProxyServiceWindows::removeFilter(): id=%p\n", aID)); … … 134 134 135 135 136 int USBProxy ServiceWindows::captureDevice(HostUSBDevice *aDevice)136 int USBProxyBackendWindows::captureDevice(HostUSBDevice *aDevice) 137 137 { 138 138 /* … … 176 176 177 177 178 int USBProxy ServiceWindows::releaseDevice(HostUSBDevice *aDevice)178 int USBProxyBackendWindows::releaseDevice(HostUSBDevice *aDevice) 179 179 { 180 180 /* … … 219 219 220 220 221 bool USBProxy ServiceWindows::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters,221 bool USBProxyBackendWindows::updateDeviceState(HostUSBDevice *aDevice, PUSBDEVICE aUSBDevice, bool *aRunFilters, 222 222 SessionMachine **aIgnoreMachine) 223 223 { … … 229 229 230 230 231 int USBProxy ServiceWindows::wait(unsigned aMillies)231 int USBProxyBackendWindows::wait(unsigned aMillies) 232 232 { 233 233 return USBLibWaitChange(aMillies); … … 235 235 236 236 237 int USBProxy ServiceWindows::interruptWait(void)237 int USBProxyBackendWindows::interruptWait(void) 238 238 { 239 239 return USBLibInterruptWaitChange(); … … 243 243 * Gets a list of all devices the VM can grab 244 244 */ 245 PUSBDEVICE USBProxy ServiceWindows::getDevices(void)245 PUSBDEVICE USBProxyBackendWindows::getDevices(void) 246 246 { 247 247 PUSBDEVICE pDevices = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.

