Changeset 5528 in vbox
- Timestamp:
- Oct 26, 2007 6:28:10 PM (17 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostUSBDeviceImpl.cpp
r4071 r5528 273 273 ///@todo implement 274 274 aPort = 0; 275 276 return S_OK; 277 } 278 279 STDMETHODIMP HostUSBDevice::COMGETTER(Version)(USHORT *aVersion) 280 { 281 if (!aVersion) 282 return E_INVALIDARG; 283 284 AutoCaller autoCaller (this); 285 CheckComRCReturnRC (autoCaller.rc()); 286 287 AutoReaderLock alock (this); 288 289 *aVersion = mUsb->bcdUSB >> 8; 290 291 return S_OK; 292 } 293 294 STDMETHODIMP HostUSBDevice::COMGETTER(PortVersion)(USHORT *aPortVersion) 295 { 296 if (!aPortVersion) 297 return E_INVALIDARG; 298 299 AutoCaller autoCaller (this); 300 CheckComRCReturnRC (autoCaller.rc()); 301 302 AutoReaderLock alock (this); 303 304 /** @todo implement this correctly or things just won't work right, see the vista defect. */ 305 *aPortVersion = mUsb->bcdUSB >> 8; 275 306 276 307 return S_OK; -
trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp
r4071 r5528 70 70 71 71 mPort = pDevDesc->idPort; 72 mVersion = pDevDesc->bcdUSB >> 8; 73 mPortVersion = mVersion; /** @todo fix this */ 72 74 73 75 mState = USBDeviceState_USBDeviceAvailable; … … 208 210 } 209 211 212 STDMETHODIMP RemoteUSBDevice::COMGETTER(Version) (USHORT *aVersion) 213 { 214 if (!aVersion) 215 return E_INVALIDARG; 216 217 AutoLock alock (this); 218 CHECK_READY(); 219 220 *aVersion = mVersion; 221 return S_OK; 222 } 223 224 STDMETHODIMP RemoteUSBDevice::COMGETTER(PortVersion) (USHORT *aPortVersion) 225 { 226 if (!aPortVersion) 227 return E_INVALIDARG; 228 229 AutoLock alock (this); 230 CHECK_READY(); 231 232 *aPortVersion = mPortVersion; 233 return S_OK; 234 } 235 210 236 STDMETHODIMP RemoteUSBDevice::COMGETTER(Remote) (BOOL *aRemote) 211 237 { -
trunk/src/VBox/Main/USBDeviceImpl.cpp
r4071 r5528 29 29 30 30 mPort = 0; 31 mVersion = mPortVersion = 1; 31 32 mRemote = FALSE; 32 33 } … … 77 78 ComAssertComRCRet (hrc, hrc); 78 79 80 hrc = aUSBDevice->COMGETTER(Port)(&mVersion); 81 ComAssertComRCRet (hrc, hrc); 82 83 hrc = aUSBDevice->COMGETTER(Port)(&mPortVersion); 84 ComAssertComRCRet (hrc, hrc); 85 79 86 hrc = aUSBDevice->COMGETTER(Remote)(&mRemote); 80 87 ComAssertComRCRet (hrc, hrc); … … 253 260 } 254 261 262 STDMETHODIMP OUSBDevice::COMGETTER(Version)(USHORT *aVersion) 263 { 264 if (!aVersion) 265 return E_POINTER; 266 267 AutoLock lock(this); 268 CHECK_READY(); 269 270 *aVersion = mVersion; 271 return S_OK; 272 } 273 274 STDMETHODIMP OUSBDevice::COMGETTER(PortVersion)(USHORT *aPortVersion) 275 { 276 if (!aPortVersion) 277 return E_POINTER; 278 279 AutoLock lock(this); 280 CHECK_READY(); 281 282 *aPortVersion = mPortVersion; 283 return S_OK; 284 } 285 255 286 STDMETHODIMP OUSBDevice::COMGETTER(Remote)(BOOL *aRemote) 256 287 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r5390 r5528 7886 7886 <interface 7887 7887 name="IUSBDevice" extends="$unknown" 7888 uuid=" c5ab8d05-1999-4e48-ae34-cdeb235aacf0"7888 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3" 7889 7889 wsmap="managed" 7890 7890 > … … 7938 7938 Host USB port number the device is physically 7939 7939 coonected to. 7940 </desc> 7941 </attribute> 7942 7943 <attribute name="version" type="unsigned short" readonly="yes"> 7944 <desc> 7945 The major USB version of the device - 1 or 2. 7946 </desc> 7947 </attribute> 7948 7949 <attribute name="portVersion" type="unsigned short" readonly="yes"> 7950 <desc> 7951 The major USB version of the host USB port the device is 7952 physically coonected to - 1 or 2. For devices not connected to 7953 anything this will have the same value as the version attribute. 7940 7954 </desc> 7941 7955 </attribute> -
trunk/src/VBox/Main/include/HostUSBDeviceImpl.h
r4071 r5528 74 74 STDMETHOD(COMGETTER(Address))(BSTR *aAddress); 75 75 STDMETHOD(COMGETTER(Port))(USHORT *aPort); 76 STDMETHOD(COMGETTER(Version))(USHORT *aVersion); 77 STDMETHOD(COMGETTER(PortVersion))(USHORT *aPortVersion); 76 78 STDMETHOD(COMGETTER(Remote))(BOOL *aRemote); 77 79 -
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r4071 r5528 63 63 STDMETHOD(COMGETTER(Address)) (BSTR *aAddress); 64 64 STDMETHOD(COMGETTER(Port)) (USHORT *aPort); 65 STDMETHOD(COMGETTER(Version)) (USHORT *aVersion); 66 STDMETHOD(COMGETTER(PortVersion)) (USHORT *aPortVersion); 65 67 STDMETHOD(COMGETTER(Remote)) (BOOL *aRemote); 66 68 … … 108 110 109 111 uint16_t mPort; 112 uint16_t mVersion; 113 uint16_t mPortVersion; 110 114 111 115 USBDeviceState_T mState; -
trunk/src/VBox/Main/include/USBDeviceImpl.h
r4071 r5528 62 62 STDMETHOD(COMGETTER(Address))(BSTR *aAddress); 63 63 STDMETHOD(COMGETTER(Port))(USHORT *aPort); 64 STDMETHOD(COMGETTER(Version))(USHORT *aVersion); 65 STDMETHOD(COMGETTER(PortVersion))(USHORT *aPortVersion); 64 66 STDMETHOD(COMGETTER(Remote))(BOOL *aRemote); 65 67 … … 89 91 /** The host specific address of the device. */ 90 92 Bstr mAddress; 91 93 /** The host port number. */ 92 94 USHORT mPort; 95 /** The major USB version number of the device. */ 96 USHORT mVersion; 97 /** The major USB version number of the port the device is attached to. */ 98 USHORT mPortVersion; 99 /** Remote (VRDP) or local device. */ 93 100 BOOL mRemote; 94 101 };
Note:
See TracChangeset
for help on using the changeset viewer.