Changeset 50403 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Feb 10, 2014 6:53:47 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92164
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r50033 r50403 2938 2938 while (it != mUSBDevices.end()) 2939 2939 { 2940 if ((*it)->i d() == uuid)2940 if ((*it)->i_id() == uuid) 2941 2941 { 2942 2942 pUSBDevice = *it; … … 5211 5211 while (it != mUSBDevices.end()) 5212 5212 { 5213 LogFlowThisFunc(("it={%RTuuid}\n", (*it)->i d().raw()));5214 if ((*it)->i d() == Uuid)5213 LogFlowThisFunc(("it={%RTuuid}\n", (*it)->i_id().raw())); 5214 if ((*it)->i_id() == Uuid) 5215 5215 { 5216 5216 pUSBDevice = *it; … … 8287 8287 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 8288 8288 mUSBDevices.push_back(pUSBDevice); 8289 LogFlowFunc(("Attached device {%RTuuid}\n", pUSBDevice->i d().raw()));8289 LogFlowFunc(("Attached device {%RTuuid}\n", pUSBDevice->i_id().raw())); 8290 8290 8291 8291 /* notify callbacks */ … … 8365 8365 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 8366 8366 LogFlowThisFunc(("Detaching USB proxy device {%RTuuid}...\n", 8367 aHostDevice->i d().raw()));8367 aHostDevice->i_id().raw())); 8368 8368 8369 8369 /* … … 8377 8377 setErrorStatic(hrc2, "GetRemote() failed"); 8378 8378 8379 PCRTUUID pUuid = aHostDevice->i d().raw();8379 PCRTUUID pUuid = aHostDevice->i_id().raw(); 8380 8380 if (fRemote) 8381 8381 { -
trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp
r44528 r50403 68 68 ComAssertComRCRet(hrc, hrc); 69 69 70 hrc = aUSBDevice->COMGETTER(Manufacturer)(unconst(mData.manufacturer).asOutParam()); 71 ComAssertComRCRet(hrc, hrc); 72 73 hrc = aUSBDevice->COMGETTER(Product)(unconst(mData.product).asOutParam()); 74 ComAssertComRCRet(hrc, hrc); 75 76 hrc = aUSBDevice->COMGETTER(SerialNumber)(unconst(mData.serialNumber).asOutParam()); 77 ComAssertComRCRet(hrc, hrc); 78 79 hrc = aUSBDevice->COMGETTER(Address)(unconst(mData.address).asOutParam()); 80 ComAssertComRCRet(hrc, hrc); 70 BSTR tmp; 71 BSTR *bptr = &tmp; 72 73 hrc = aUSBDevice->COMGETTER(Manufacturer)(bptr); 74 ComAssertComRCRet(hrc, hrc); 75 unconst(mData.manufacturer) = Utf8Str(tmp); 76 77 hrc = aUSBDevice->COMGETTER(Product)(bptr); 78 ComAssertComRCRet(hrc, hrc); 79 unconst(mData.product) = Utf8Str(tmp); 80 81 hrc = aUSBDevice->COMGETTER(SerialNumber)(bptr); 82 ComAssertComRCRet(hrc, hrc); 83 unconst(mData.serialNumber) = Utf8Str(tmp); 84 85 hrc = aUSBDevice->COMGETTER(Address)(bptr); 86 ComAssertComRCRet(hrc, hrc); 87 unconst(mData.address) = Utf8Str(tmp); 81 88 82 89 hrc = aUSBDevice->COMGETTER(Port)(&unconst(mData.port)); … … 86 93 ComAssertComRCRet(hrc, hrc); 87 94 88 hrc = aUSBDevice->COMGETTER( Port)(&unconst(mData.portVersion));95 hrc = aUSBDevice->COMGETTER(Version)(&unconst(mData.portVersion)); 89 96 ComAssertComRCRet(hrc, hrc); 90 97 … … 144 151 * @param aId Address of result variable. 145 152 */ 146 STDMETHODIMP OUSBDevice::COMGETTER(Id)(BSTR *aId) 147 { 148 CheckComArgOutPointerValid(aId); 149 150 AutoCaller autoCaller(this); 151 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 152 153 /* this is const, no need to lock */ 154 Guid(mData.id).toUtf16().detachTo(aId); 153 HRESULT OUSBDevice::getId(com::Guid &aId) 154 { 155 /* this is const, no need to lock */ 156 aId = mData.id; 155 157 156 158 return S_OK; … … 164 166 * @param aVendorId Where to store the vendor id. 165 167 */ 166 STDMETHODIMP OUSBDevice::COMGETTER(VendorId)(USHORT *aVendorId) 167 { 168 CheckComArgOutPointerValid(aVendorId); 169 170 AutoCaller autoCaller(this); 171 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 172 168 HRESULT OUSBDevice::getVendorId(USHORT *aVendorId) 169 { 173 170 /* this is const, no need to lock */ 174 171 *aVendorId = mData.vendorId; … … 184 181 * @param aProductId Where to store the product id. 185 182 */ 186 STDMETHODIMP OUSBDevice::COMGETTER(ProductId)(USHORT *aProductId) 187 { 188 CheckComArgOutPointerValid(aProductId); 189 190 AutoCaller autoCaller(this); 191 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 192 183 HRESULT OUSBDevice::getProductId(USHORT *aProductId) 184 { 193 185 /* this is const, no need to lock */ 194 186 *aProductId = mData.productId; … … 204 196 * @param aRevision Where to store the revision BCD. 205 197 */ 206 STDMETHODIMP OUSBDevice::COMGETTER(Revision)(USHORT *aRevision) 207 { 208 CheckComArgOutPointerValid(aRevision); 209 210 AutoCaller autoCaller(this); 211 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 212 198 HRESULT OUSBDevice::getRevision(USHORT *aRevision) 199 { 213 200 /* this is const, no need to lock */ 214 201 *aRevision = mData.revision; … … 223 210 * @param aManufacturer Where to put the return string. 224 211 */ 225 STDMETHODIMP OUSBDevice::COMGETTER(Manufacturer)(BSTR *aManufacturer) 226 { 227 CheckComArgOutPointerValid(aManufacturer); 228 229 AutoCaller autoCaller(this); 230 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 231 232 /* this is const, no need to lock */ 233 mData.manufacturer.cloneTo(aManufacturer); 212 HRESULT OUSBDevice::getManufacturer(com::Utf8Str &aManufacturer) 213 { 214 /* this is const, no need to lock */ 215 aManufacturer = mData.manufacturer; 234 216 235 217 return S_OK; … … 243 225 * @param aProduct Where to put the return string. 244 226 */ 245 STDMETHODIMP OUSBDevice::COMGETTER(Product)(BSTR *aProduct) 246 { 247 CheckComArgOutPointerValid(aProduct); 248 249 AutoCaller autoCaller(this); 250 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 251 252 /* this is const, no need to lock */ 253 mData.product.cloneTo(aProduct); 227 HRESULT OUSBDevice::getProduct(com::Utf8Str &aProduct) 228 { 229 /* this is const, no need to lock */ 230 aProduct = mData.product; 254 231 255 232 return S_OK; … … 263 240 * @param aSerialNumber Where to put the return string. 264 241 */ 265 STDMETHODIMP OUSBDevice::COMGETTER(SerialNumber)(BSTR *aSerialNumber) 266 { 267 CheckComArgOutPointerValid(aSerialNumber); 268 269 AutoCaller autoCaller(this); 270 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 271 272 /* this is const, no need to lock */ 273 mData.serialNumber.cloneTo(aSerialNumber); 242 HRESULT OUSBDevice::getSerialNumber(com::Utf8Str &aSerialNumber) 243 { 244 /* this is const, no need to lock */ 245 aSerialNumber = mData.serialNumber; 274 246 275 247 return S_OK; … … 283 255 * @param aAddress Where to put the return string. 284 256 */ 285 STDMETHODIMP OUSBDevice::COMGETTER(Address)(BSTR *aAddress) 286 { 287 CheckComArgOutPointerValid(aAddress); 288 289 AutoCaller autoCaller(this); 290 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 291 292 /* this is const, no need to lock */ 293 mData.address.cloneTo(aAddress); 294 295 return S_OK; 296 } 297 298 STDMETHODIMP OUSBDevice::COMGETTER(Port)(USHORT *aPort) 299 { 300 CheckComArgOutPointerValid(aPort); 301 302 AutoCaller autoCaller(this); 303 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 304 257 HRESULT OUSBDevice::getAddress(com::Utf8Str &aAddress) 258 { 259 /* this is const, no need to lock */ 260 aAddress = mData.address; 261 262 return S_OK; 263 } 264 265 HRESULT OUSBDevice::getPort(USHORT *aPort) 266 { 305 267 /* this is const, no need to lock */ 306 268 *aPort = mData.port; … … 309 271 } 310 272 311 STDMETHODIMP OUSBDevice::COMGETTER(Version)(USHORT *aVersion) 312 { 313 CheckComArgOutPointerValid(aVersion); 314 315 AutoCaller autoCaller(this); 316 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 317 273 HRESULT OUSBDevice::getVersion(USHORT *aVersion) 274 { 318 275 /* this is const, no need to lock */ 319 276 *aVersion = mData.version; … … 322 279 } 323 280 324 STDMETHODIMP OUSBDevice::COMGETTER(PortVersion)(USHORT *aPortVersion) 325 { 326 CheckComArgOutPointerValid(aPortVersion); 327 328 AutoCaller autoCaller(this); 329 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 330 281 HRESULT OUSBDevice::getPortVersion(USHORT *aPortVersion) 282 { 331 283 /* this is const, no need to lock */ 332 284 *aPortVersion = mData.portVersion; … … 335 287 } 336 288 337 STDMETHODIMP OUSBDevice::COMGETTER(Remote)(BOOL *aRemote) 338 { 339 CheckComArgOutPointerValid(aRemote); 340 341 AutoCaller autoCaller(this); 342 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 343 289 HRESULT OUSBDevice::getRemote(BOOL *aRemote) 290 { 344 291 /* this is const, no need to lock */ 345 292 *aRemote = mData.remote; -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50370 r50403 90 90 NS_DECL_CLASSINFO(Progress) 91 91 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Progress, IProgress) 92 NS_DECL_CLASSINFO(OUSBDevice)93 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(OUSBDevice, IUSBDevice)94 92 NS_DECL_CLASSINFO(RemoteUSBDevice) 95 93 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(RemoteUSBDevice, IHostUSBDevice, IUSBDevice)
Note:
See TracChangeset
for help on using the changeset viewer.