- Timestamp:
- Jan 23, 2014 9:22:22 AM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r49760 r50174 109 109 110 110 /** weak VirtualBox parent */ 111 VirtualBox* const 111 VirtualBox* const mVirtualBox; 112 112 113 113 struct ImportStack; -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r49673 r50174 132 132 Data *m; 133 133 /** weak VirtualBox parent */ 134 VirtualBox * const 134 VirtualBox * const mVirtualBox; 135 135 const Bstr mName; 136 136 -
trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h
r49871 r50174 46 46 #endif 47 47 48 HRESULT i_setVirtualBox(VirtualBox *pV Box);48 HRESULT i_setVirtualBox(VirtualBox *pVirtualBox); 49 49 50 50 #ifdef VBOX_WITH_RESOURCE_USAGE_API … … 87 87 HostNetworkInterfaceType_T mIfType; 88 88 89 VirtualBox * const mV Box;89 VirtualBox * const mVirtualBox; 90 90 91 91 struct Data -
trunk/src/VBox/Main/include/NATNetworkImpl.h
r49742 r50174 121 121 122 122 /** weak VirtualBox parent */ 123 VirtualBox * const 123 VirtualBox * const mVirtualBox; 124 124 125 125 const com::Utf8Str mName; -
trunk/src/VBox/Main/include/SharedFolderImpl.h
r46820 r50174 97 97 private: 98 98 99 VirtualBoxBase * const 99 VirtualBoxBase * const mParent; 100 100 101 101 /* weak parents (only one of them is not null) */ 102 102 #if !defined(VBOX_COM_INPROC) 103 Machine * constmMachine;104 VirtualBox * constmVirtualBox;103 Machine * const mMachine; 104 VirtualBox * const mVirtualBox; 105 105 #else 106 Console * constmConsole;106 Console * const mConsole; 107 107 #endif 108 108 -
trunk/src/VBox/Main/include/VFSExplorerImpl.h
r49871 r50174 64 64 65 65 /* Private member vars */ 66 VirtualBox * const 66 VirtualBox * const mVirtualBox; 67 67 68 68 //////////////////////////////////////////////////////////////////////////////// -
trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
r44970 r50174 282 282 * restart attempts in some wedged config can cause high CPU 283 283 * and disk load. */ 284 ComPtr<IVirtualBox> pV Box;285 rc = pV Box.createLocalObject(CLSID_VirtualBox);284 ComPtr<IVirtualBox> pVirtualBox; 285 rc = pVirtualBox.createLocalObject(CLSID_VirtualBox); 286 286 if (FAILED(rc)) 287 287 cMillies = 3 * VBOXCLIENT_DEFAULT_INTERVAL; … … 293 293 /* Update the VirtualBox reference, there's a working 294 294 * VBoxSVC again from now on. */ 295 pThis->mData.m_pVirtualBox = pV Box;295 pThis->mData.m_pVirtualBox = pVirtualBox; 296 296 } 297 297 fireVBoxSVCAvailabilityChangedEvent(pThis->mData.m_pEventSource, TRUE); -
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r49872 r50174 7 7 8 8 /* 9 * Copyright (C) 2006-201 3Oracle Corporation9 * Copyright (C) 2006-2014 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 38 38 39 39 HostNetworkInterface::HostNetworkInterface() 40 : mV Box(NULL)40 : mVirtualBox(NULL) 41 41 { 42 42 } … … 108 108 109 109 /* Create and register base metrics */ 110 pm::BaseMetric *networkSpeed = new pm::HostNetworkSpeed(hal, objptr, strName + "/LinkSpeed", Utf8Str(mShortName), Utf8Str(mInterfaceName), m.speedMbits, networkLinkSpeed); 110 pm::BaseMetric *networkSpeed = new pm::HostNetworkSpeed(hal, objptr, strName + "/LinkSpeed", 111 Utf8Str(mShortName), Utf8Str(mInterfaceName), 112 m.speedMbits, networkLinkSpeed); 111 113 aCollector->registerBaseMetric(networkSpeed); 112 pm::BaseMetric *networkLoad = new pm::HostNetworkLoadRaw(hal, objptr, strName + "/Load", Utf8Str(mShortName), Utf8Str(mInterfaceName), m.speedMbits, networkLoadRx, networkLoadTx); 114 pm::BaseMetric *networkLoad = new pm::HostNetworkLoadRaw(hal, objptr, strName + "/Load", 115 Utf8Str(mShortName), Utf8Str(mInterfaceName), 116 m.speedMbits, networkLoadRx, networkLoadTx); 113 117 aCollector->registerBaseMetric(networkLoad); 114 118 … … 440 444 if (m.IPAddress) 441 445 { 442 int rc = NetIfEnableStaticIpConfig(mV Box, this, m.IPAddress, 0, 0);446 int rc = NetIfEnableStaticIpConfig(mVirtualBox, this, m.IPAddress, 0, 0); 443 447 if (RT_SUCCESS(rc)) 444 448 { 445 449 m.realIPAddress = 0; 446 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), NULL))) 450 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", 451 mInterfaceName.raw()).raw(), NULL))) 447 452 return E_FAIL; 448 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), NULL))) 453 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", 454 mInterfaceName.raw()).raw(), NULL))) 449 455 return E_FAIL; 450 456 return S_OK; … … 467 473 if (m.realIPAddress == ip && m.realNetworkMask == mask) 468 474 return S_OK; 469 int rc = NetIfEnableStaticIpConfig(mV Box, this, m.IPAddress, ip, mask);475 int rc = NetIfEnableStaticIpConfig(mVirtualBox, this, m.IPAddress, ip, mask); 470 476 if (RT_SUCCESS(rc)) 471 477 { 472 478 m.realIPAddress = ip; 473 479 m.realNetworkMask = mask; 474 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), 475 Bstr(aIPAddress).raw()))) 480 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", 481 mInterfaceName.raw()).raw(), 482 Bstr(aIPAddress).raw()))) 476 483 return E_FAIL; 477 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), 478 Bstr(aNetworkMask).raw()))) 484 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", 485 mInterfaceName.raw()).raw(), 486 Bstr(aNetworkMask).raw()))) 479 487 return E_FAIL; 480 488 return S_OK; … … 502 510 503 511 int rc = S_OK; 504 if (m.realIPV6Address != aIPV6Address || m.realIPV6PrefixLength != aIPV6NetworkMaskPrefixLength) 512 if ( m.realIPV6Address != aIPV6Address 513 || m.realIPV6PrefixLength != aIPV6NetworkMaskPrefixLength) 505 514 { 506 515 BSTR bstr; … … 508 517 if (aIPV6NetworkMaskPrefixLength == 0) 509 518 aIPV6NetworkMaskPrefixLength = 64; 510 rc = NetIfEnableStaticIpConfigV6(mVBox, this, m.IPV6Address.raw(), bstr, aIPV6NetworkMaskPrefixLength); 519 rc = NetIfEnableStaticIpConfigV6(mVirtualBox, this, m.IPV6Address.raw(), 520 bstr, aIPV6NetworkMaskPrefixLength); 511 521 if (RT_FAILURE(rc)) 512 522 { … … 518 528 m.realIPV6Address = aIPV6Address; 519 529 m.realIPV6PrefixLength = aIPV6NetworkMaskPrefixLength; 520 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), 521 Bstr(aIPV6Address).raw()))) 530 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", 531 mInterfaceName.raw()).raw(), 532 Bstr(aIPV6Address).raw()))) 522 533 return E_FAIL; 523 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6NetMask", mInterfaceName.raw()).raw(), 524 BstrFmt("%u", aIPV6NetworkMaskPrefixLength).raw()))) 534 if (FAILED(mVirtualBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6NetMask", 535 mInterfaceName.raw()).raw(), 536 BstrFmt("%u", aIPV6NetworkMaskPrefixLength).raw()))) 525 537 return E_FAIL; 526 538 } … … 536 548 return E_NOTIMPL; 537 549 #else 538 int rc = NetIfEnableDynamicIpConfig(mV Box, this);550 int rc = NetIfEnableDynamicIpConfig(mVirtualBox, this); 539 551 if (RT_FAILURE(rc)) 540 552 { … … 551 563 return E_NOTIMPL; 552 564 #else 553 int rc = NetIfDhcpRediscover(mV Box, this);565 int rc = NetIfDhcpRediscover(mVirtualBox, this); 554 566 if (RT_FAILURE(rc)) 555 567 { … … 561 573 } 562 574 563 HRESULT HostNetworkInterface::i_setVirtualBox(VirtualBox *pV Box)575 HRESULT HostNetworkInterface::i_setVirtualBox(VirtualBox *pVirtualBox) 564 576 { 565 577 AutoCaller autoCaller(this); 566 578 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 567 579 568 AssertReturn(mV Box != pVBox, S_OK);569 570 unconst(mV Box) = pVBox;580 AssertReturn(mVirtualBox != pVirtualBox, S_OK); 581 582 unconst(mVirtualBox) = pVirtualBox; 571 583 572 584 #if !defined(RT_OS_WINDOWS) … … 575 587 { 576 588 Bstr tmpAddr, tmpMask; 577 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), 578 tmpAddr.asOutParam()); 589 HRESULT hrc = mVirtualBox->GetExtraData(BstrFmt("HostOnly/%ls/IPAddress", 590 mInterfaceName.raw()).raw(), 591 tmpAddr.asOutParam()); 579 592 if (FAILED(hrc) || tmpAddr.isEmpty()) 580 593 tmpAddr = getDefaultIPv4Address(mInterfaceName); 581 594 582 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), 583 tmpMask.asOutParam()); 595 hrc = mVirtualBox->GetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", 596 mInterfaceName.raw()).raw(), 597 tmpMask.asOutParam()); 584 598 if (FAILED(hrc) || tmpMask.isEmpty()) 585 599 tmpMask = Bstr(VBOXNET_IPV4MASK_DEFAULT); … … 592 606 { 593 607 Bstr tmpPrefixLen; 594 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), 595 m.IPV6Address.asOutParam()); 608 HRESULT hrc = mVirtualBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", 609 mInterfaceName.raw()).raw(), 610 m.IPV6Address.asOutParam()); 596 611 if (SUCCEEDED(hrc) && !m.IPV6Address.isEmpty()) 597 612 { 598 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6PrefixLen", mInterfaceName.raw()).raw(), 599 tmpPrefixLen.asOutParam()); 613 hrc = mVirtualBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6PrefixLen", 614 mInterfaceName.raw()).raw(), 615 tmpPrefixLen.asOutParam()); 600 616 if (SUCCEEDED(hrc) && !tmpPrefixLen.isEmpty()) 601 617 m.IPV6NetworkMaskPrefixLength = Utf8Str(tmpPrefixLen).toUInt32(); -
trunk/src/VBox/Main/src-server/HostPower.cpp
r46775 r50174 30 30 31 31 #include <iprt/mem.h> 32 #include <iprt/cpp/utils.h> 32 33 33 34 HostPowerService::HostPowerService(VirtualBox *aVirtualBox) 34 35 { 35 Assert (aVirtualBox != NULL);36 AssertPtr(aVirtualBox); 36 37 mVirtualBox = aVirtualBox; 37 38 } -
trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp
r49871 r50174 180 180 181 181 182 int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pV Box,182 int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVirtualBox, 183 183 IHostNetworkInterface **aHostNetworkInterface, 184 184 IProgress **aProgress, … … 191 191 192 192 ComPtr<IHost> host; 193 HRESULT hrc = pV Box->COMGETTER(Host)(host.asOutParam());193 HRESULT hrc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 194 194 if (SUCCEEDED(hrc)) 195 195 { 196 hrc = progress->init(pV Box, host,196 hrc = progress->init(pVirtualBox, host, 197 197 Bstr("Creating host only network interface").raw(), 198 198 FALSE /* aCancelable */); … … 266 266 iface.createObject(); 267 267 iface->init(IfName, HostNetworkInterfaceType_HostOnly, pInfo); 268 iface->i_setVirtualBox(pV Box);268 iface->i_setVirtualBox(pVirtualBox); 269 269 iface.queryInterfaceTo(aHostNetworkInterface); 270 270 } … … 301 301 302 302 #else 303 NOREF(pV Box);303 NOREF(pVirtualBox); 304 304 NOREF(aHostNetworkInterface); 305 305 NOREF(aProgress); … … 309 309 } 310 310 311 int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pV Box, IN_GUID aId,311 int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IN_GUID aId, 312 312 IProgress **aProgress) 313 313 { … … 318 318 ComPtr<IHost> host; 319 319 int rc = VINF_SUCCESS; 320 HRESULT hr = pV Box->COMGETTER(Host)(host.asOutParam());320 HRESULT hr = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 321 321 if (SUCCEEDED(hr)) 322 322 { … … 329 329 return VERR_INTERNAL_ERROR; 330 330 331 rc = progress->init(pV Box, host,331 rc = progress->init(pVirtualBox, host, 332 332 Bstr("Removing host network interface").raw(), 333 333 FALSE /* aCancelable */); … … 352 352 return rc; 353 353 #else 354 NOREF(pV Box);354 NOREF(pVirtualBox); 355 355 NOREF(aId); 356 356 NOREF(aProgress); -
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r49873 r50174 1110 1110 } 1111 1111 1112 int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pV Box,1112 int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVirtualBox, 1113 1113 IHostNetworkInterface **aHostNetworkInterface, 1114 1114 IProgress **aProgress, … … 1123 1123 1124 1124 ComPtr<IHost> host; 1125 HRESULT rc = pV Box->COMGETTER(Host)(host.asOutParam());1125 HRESULT rc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1126 1126 if (SUCCEEDED(rc)) 1127 1127 { 1128 rc = progress->init(pV Box, host,1128 rc = progress->init(pVirtualBox, host, 1129 1129 Bstr(_T("Creating host only network interface")).raw(), 1130 1130 FALSE /* aCancelable */); … … 1147 1147 // d->name = aName; 1148 1148 d->iface = iface; 1149 d->vBox = pVBox; 1150 1151 rc = pVBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1152 netIfNetworkInterfaceHelperClient, 1153 static_cast<void *>(d.get()), 1154 progress); 1155 1149 d->vBox = pVirtualBox; 1150 1151 rc = pVirtualBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1152 netIfNetworkInterfaceHelperClient, 1153 static_cast<void *>(d.get()), 1154 progress); 1156 1155 if (SUCCEEDED(rc)) 1157 1156 { … … 1166 1165 } 1167 1166 1168 int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pV Box, IN_GUID aId,1167 int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IN_GUID aId, 1169 1168 IProgress **aProgress) 1170 1169 { … … 1176 1175 progress.createObject(); 1177 1176 ComPtr<IHost> host; 1178 HRESULT rc = pV Box->COMGETTER(Host)(host.asOutParam());1177 HRESULT rc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1179 1178 if (SUCCEEDED(rc)) 1180 1179 { 1181 rc = progress->init(pV Box, host,1180 rc = progress->init(pVirtualBox, host, 1182 1181 Bstr(_T("Removing host network interface")).raw(), 1183 1182 FALSE /* aCancelable */); … … 1195 1194 d->guid = aId; 1196 1195 1197 rc = pV Box->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1198 netIfNetworkInterfaceHelperClient,1199 static_cast<void *>(d.get()),1200 progress);1196 rc = pVirtualBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1197 netIfNetworkInterfaceHelperClient, 1198 static_cast<void *>(d.get()), 1199 progress); 1201 1200 1202 1201 if (SUCCEEDED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.