Changeset 38911 in vbox
- Timestamp:
- Sep 30, 2011 9:52:40 AM (13 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r38873 r38911 228 228 void VRDPInterceptClipboard(uint32_t u32ClientId); 229 229 230 void processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList );230 void processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt); 231 231 232 232 // callback callers (partly; for some events console callbacks are notified -
trunk/src/VBox/Main/include/RemoteUSBBackend.h
r33004 r38911 131 131 /* VRDP_USB_VERSION_2: the client version. */ 132 132 uint32_t mClientVersion; 133 134 /* VRDP_USB_VERSION_3: the client sends VRDE_USB_REQ_DEVICE_LIST_EXT_RET. */ 135 bool mfDescExt; 133 136 }; 134 137 -
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r35638 r38911 50 50 51 51 // public initializer/uninitializer for internal purposes only 52 HRESULT init(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc );52 HRESULT init(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc, bool fDescExt); 53 53 void uninit(); 54 54 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r38495 r38911 8261 8261 * @note Locks this object for writing. 8262 8262 */ 8263 void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList )8263 void Console::processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt) 8264 8264 { 8265 8265 LogFlowThisFuncEnter(); 8266 LogFlowThisFunc(("u32ClientId = %d, pDevList=%p, cbDevList = %d \n", u32ClientId, pDevList, cbDevList));8266 LogFlowThisFunc(("u32ClientId = %d, pDevList=%p, cbDevList = %d, fDescExt = %d\n", u32ClientId, pDevList, cbDevList, fDescExt)); 8267 8267 8268 8268 AutoCaller autoCaller(this); … … 8335 8335 ComObjPtr<RemoteUSBDevice> pUSBDevice; 8336 8336 pUSBDevice.createObject(); 8337 pUSBDevice->init(u32ClientId, e );8337 pUSBDevice->init(u32ClientId, e, fDescExt); 8338 8338 8339 8339 mRemoteUSBDevices.push_back(pUSBDevice); -
trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp
r35368 r38911 805 805 { 806 806 /* Unmount all remote USB devices. */ 807 mConsole->processRemoteUSBDevices (mu32ClientId, NULL, 0 );807 mConsole->processRemoteUSBDevices (mu32ClientId, NULL, 0, false); 808 808 809 809 menmPollRemoteDevicesStatus = PollRemoteDevicesStatus_Dereferenced; … … 822 822 parm.code = VRDE_USB_REQ_NEGOTIATE; 823 823 parm.version = VRDE_USB_VERSION; 824 parm.flags = 0; 824 /* VRDE_USB_VERSION_3: support VRDE_USB_REQ_DEVICE_LIST_EXT_RET. */ 825 parm.flags = VRDE_USB_SERVER_CAPS_PORT_VERSION; 825 826 826 827 mServer->SendUSBRequest (mu32ClientId, &parm, sizeof (parm)); … … 864 865 if (mfHasDeviceList) 865 866 { 866 mConsole->processRemoteUSBDevices (mu32ClientId, (VRDEUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList );867 mConsole->processRemoteUSBDevices (mu32ClientId, (VRDEUSBDEVICEDESC *)mpvDeviceList, mcbDeviceList, mfDescExt); 867 868 LogFlow(("USB::PollRemoteDevices: WaitResponse after process\n")); 868 869 … … 950 951 mpDevices (NULL), 951 952 mfWillBeDeleted (false), 952 mClientVersion (0) /* VRDE_USB_VERSION_2: the client version. */ 953 mClientVersion (0), /* VRDE_USB_VERSION_2: the client version. */ 954 mfDescExt (false) /* VRDE_USB_VERSION_3: VRDE_USB_REQ_DEVICE_LIST_EXT_RET. */ 953 955 { 954 956 Assert(console); … … 1045 1047 LogRel(("VRDP: remote USB protocol version %d.\n", mClientVersion)); 1046 1048 1049 /* VRDE_USB_VERSION_3: check the client capabilities: VRDE_USB_CLIENT_CAPS_*. */ 1050 if (mClientVersion == VRDE_USB_VERSION_3) 1051 { 1052 if (cbRet >= sizeof (VRDEUSBREQNEGOTIATERET_3)) 1053 { 1054 VRDEUSBREQNEGOTIATERET_3 *pret3 = (VRDEUSBREQNEGOTIATERET_3 *)pret; 1055 1056 mfDescExt = (pret3->u32Flags & VRDE_USB_CLIENT_CAPS_PORT_VERSION) != 0; 1057 } 1058 else 1059 { 1060 LogRel(("VRDP: ERROR: invalid remote USB negotiate request packet size %d.\n", cbRet)); 1061 rc = VERR_NOT_SUPPORTED; 1062 } 1063 } 1064 1047 1065 menmPollRemoteDevicesStatus = PollRemoteDevicesStatus_SendRequest; 1048 1066 } -
trunk/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
r35638 r38911 55 55 * Initializes the remote USB device object. 56 56 */ 57 HRESULT RemoteUSBDevice::init (uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc )57 HRESULT RemoteUSBDevice::init (uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevDesc, bool fDescExt) 58 58 { 59 59 LogFlowThisFunc(("u32ClientId=%d,pDevDesc=%p\n", u32ClientId, pDevDesc)); … … 79 79 unconst(mData.port) = pDevDesc->idPort; 80 80 unconst(mData.version) = pDevDesc->bcdUSB >> 8; 81 unconst(mData.portVersion) = mData.version; /** @todo fix this */ 81 if (fDescExt) 82 { 83 VRDEUSBDEVICEDESCEXT *pDevDescExt = (VRDEUSBDEVICEDESCEXT *)pDevDesc; 84 switch (pDevDescExt->u16DeviceSpeed) 85 { 86 default: 87 case VRDE_USBDEVICESPEED_UNKNOWN: 88 case VRDE_USBDEVICESPEED_LOW: 89 case VRDE_USBDEVICESPEED_FULL: 90 unconst(mData.portVersion) = 1; 91 break; 92 93 case VRDE_USBDEVICESPEED_HIGH: 94 case VRDE_USBDEVICESPEED_VARIABLE: 95 case VRDE_USBDEVICESPEED_SUPERSPEED: 96 unconst(mData.portVersion) = 2; 97 break; 98 } 99 } 100 else 101 { 102 unconst(mData.portVersion) = mData.version; 103 } 82 104 83 105 mData.state = USBDeviceState_Available;
Note:
See TracChangeset
for help on using the changeset viewer.