Changeset 60089 in vbox for trunk/src/VBox/Main/src-server/generic
- Timestamp:
- Mar 18, 2016 10:51:02 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106086
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/generic/USBProxyBackendUsbIp.cpp
r60068 r60089 265 265 * Initialize data members. 266 266 */ 267 USBProxyBackendUsbIp::USBProxyBackendUsbIp(USBProxyService *aUsbProxyService) 268 : USBProxyBackend(aUsbProxyService) 269 { 270 LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService)); 267 USBProxyBackendUsbIp::USBProxyBackendUsbIp() 268 : USBProxyBackend() 269 { 270 } 271 272 USBProxyBackendUsbIp::~USBProxyBackendUsbIp() 273 { 274 271 275 } 272 276 … … 276 280 * @returns S_OK on success and non-fatal failures, some COM error otherwise. 277 281 */ 278 int USBProxyBackendUsbIp::init( void)282 int USBProxyBackendUsbIp::init(USBProxyService *aUsbProxyService, const com::Utf8Str &strId, const com::Utf8Str &strAddress) 279 283 { 280 284 int rc = VINF_SUCCESS; 281 285 286 USBProxyBackend::init(aUsbProxyService, strId, strAddress); 287 282 288 m = new Data; 283 289 284 /** @todo: Pass in some config like host and port to connect to. */ 290 /* Split address into hostname and port. */ 291 RTCList<RTCString> lstAddress = strAddress.split(":"); 292 if (lstAddress.size() < 1) 293 return VERR_INVALID_PARAMETER; 294 m->pszHost = RTStrDup(lstAddress[0].c_str()); 295 if (!m->pszHost) 296 return VERR_NO_STR_MEMORY; 297 if (lstAddress.size() == 2) 298 { 299 m->uPort = lstAddress[1].toUInt32(); 300 if (!m->uPort) 301 return VERR_INVALID_PARAMETER; 302 } 285 303 286 304 /* Setup wakeup pipe and poll set first. */ … … 330 348 * Stop all service threads and free the device chain. 331 349 */ 332 USBProxyBackendUsbIp::~USBProxyBackendUsbIp()350 void USBProxyBackendUsbIp::uninit() 333 351 { 334 352 LogFlowThisFunc(("\n")); … … 363 381 364 382 delete m; 383 USBProxyBackend::uninit(); 365 384 } 366 385
Note:
See TracChangeset
for help on using the changeset viewer.