Changeset 81667 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Nov 5, 2019 11:08:21 AM (5 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
r76553 r81667 78 78 unconst(mData.backend) = "vrdp"; 79 79 80 char port[16]; 81 RTStrPrintf(port, sizeof(port), "%u", pDevDesc->idPort); 82 unconst(mData.portPath) = port; 83 80 84 unconst(mData.port) = pDevDesc->idPort; 81 85 unconst(mData.version) = (uint16_t)(pDevDesc->bcdUSB >> 8); … … 89 93 case VRDE_USBDEVICESPEED_LOW: 90 94 case VRDE_USBDEVICESPEED_FULL: 91 unconst(mData.portVersion) = 1;92 95 unconst(mData.speed) = USBConnectionSpeed_Full; 93 96 break; … … 95 98 case VRDE_USBDEVICESPEED_HIGH: 96 99 case VRDE_USBDEVICESPEED_VARIABLE: 97 unconst(mData.portVersion) = 2;98 100 unconst(mData.speed) = USBConnectionSpeed_High; 99 101 break; 100 102 101 103 case VRDE_USBDEVICESPEED_SUPERSPEED: 102 unconst(mData.portVersion) = 3;103 104 unconst(mData.speed) = USBConnectionSpeed_Super; 104 105 break; … … 107 108 else 108 109 { 109 unconst(mData.portVersion) = mData.version;110 110 unconst(mData.speed) = mData.version == 3 ? USBConnectionSpeed_Super 111 111 : mData.version == 2 ? USBConnectionSpeed_High … … 154 154 155 155 unconst(mData.port) = 0; 156 unconst(mData.portPath).setNull(); 156 157 unconst(mData.version) = 1; 157 unconst(mData.portVersion) = 1;158 158 159 159 unconst(mData.dirty) = FALSE; … … 237 237 } 238 238 239 HRESULT RemoteUSBDevice::getPortPath(com::Utf8Str &aPortPath) 240 { 241 /* this is const, no need to lock */ 242 aPortPath = mData.portPath; 243 244 return S_OK; 245 } 246 239 247 HRESULT RemoteUSBDevice::getVersion(USHORT *aVersion) 240 248 { 241 249 /* this is const, no need to lock */ 242 250 *aVersion = mData.version; 243 244 return S_OK;245 }246 247 HRESULT RemoteUSBDevice::getPortVersion(USHORT *aPortVersion)248 {249 /* this is const, no need to lock */250 *aPortVersion = mData.portVersion;251 251 252 252 return S_OK; -
trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp
r81644 r81667 96 96 ComAssertComRCRet(hrc, hrc); 97 97 98 hrc = aUSBDevice->COMGETTER(PortPath)(bstr.asOutParam()); 99 ComAssertComRCRet(hrc, hrc); 100 98 101 hrc = aUSBDevice->COMGETTER(Version)(&unconst(mData.version)); 99 102 ComAssertComRCRet(hrc, hrc); … … 143 146 144 147 unconst(mData.port) = 0; 148 unconst(mData.portPath).setNull(); 145 149 unconst(mData.version) = 1; 146 150 … … 273 277 /* this is const, no need to lock */ 274 278 *aPort = mData.port; 279 280 return S_OK; 281 } 282 283 HRESULT OUSBDevice::getPortPath(com::Utf8Str &aPortPath) 284 { 285 /* this is const, no need to lock */ 286 aPortPath = mData.portPath; 275 287 276 288 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.