Lines Matching refs:pMedium
3781 Medium *pMedium = pAttachTemp->i_getMedium();
3782 if (pMedium)
3784 AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
3787 pMedium->i_getLocationFull().c_str(),
3944 ComObjPtr<Medium> pMedium = pAttach->i_getMedium();
3945 Assert(!pMedium.isNull() || pAttach->i_getType() != DeviceType_HardDisk);
3946 if (pMedium.isNull())
3949 if (pMedium->i_getBase(&level) == medium)
3954 pMedium))
4057 ComObjPtr<Medium> pMedium = pAttach->i_getMedium();
4058 Assert(!pMedium.isNull() || pAttach->i_getType() != DeviceType_HardDisk);
4059 if (pMedium.isNull())
4063 if (pMedium->i_getBase(&level) == medium)
4723 ComObjPtr<Medium> pMedium = static_cast<Medium*>(iM);
4724 if (aMedium && pMedium.isNull())
4727 AutoCaller mediumCaller(pMedium);
4730 AutoWriteLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
4731 if (pMedium)
4761 if (!pMedium.isNull())
4763 pMedium->i_addBackReference(mData->mUuid);
4767 i_addMediumToRegistry(pMedium);
4773 pAttach->i_updateMedium(pMedium);
4787 if (!pMedium.isNull())
4788 pMedium->i_removeBackReference(mData->mUuid);
5252 ComObjPtr<Medium> pMedium = (Medium*)(IMedium*)(task.m_llMediums.at(i));
5254 AutoCaller mac(pMedium);
5256 Utf8Str strLocation = pMedium->i_getLocationFull();
5261 if (pMedium->i_isMediumFormatFile())
5264 rc = pMedium->DeleteStorage(pProgress2.asOutParam());
5284 pMedium->Close();
5410 ComObjPtr<Medium> pMedium = static_cast<Medium*>(pIMedium);
5411 if (pMedium.isNull())
5414 rc = pMedium->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(ids));
5420 llMediums.append(pMedium);
8366 ComObjPtr<Medium> pMedium = (*it)->i_getMedium();
8367 if (pMedium.isNull())
8369 HRESULT rc = pMedium->i_removeBackReference(mData->mUuid, i_getSnapshotId());
10456 Medium *pMedium = pAttach->i_getMedium();
10463 if (pMedium)
10465 if (pMedium->i_isHostDrive())
10466 dev.strHostDriveSrc = pMedium->i_getLocationFull();
10468 dev.uuid = pMedium->i_getId();
10548 * @param pMedium
10550 void Machine::i_addMediumToRegistry(ComObjPtr<Medium> &pMedium)
10559 pBase = pMedium->i_getBase();
10563 AssertReturnVoid(!pMedium->isWriteLockOnCurrentThread());
10574 if (pMedium->i_addRegistry(uuid))
10579 if (pMedium != pBase)
10665 Medium* pMedium = pAtt->i_getMedium();
10666 Assert(pMedium);
10670 rc = pMedium->i_createMediumLockList(true /* fFailIfInaccessible */,
10717 Medium* pMedium = pAtt->i_getMedium();
10720 || pMedium == NULL
10721 || pMedium->i_getType() != MediumType_Normal)
10730 if (pMedium == NULL)
10735 pMedium->i_getBase()->i_getName().c_str()).raw(),
10745 pMedium->i_getBase()->i_getName().c_str()).raw(),
10757 bool fInRegistry = pMedium->i_getFirstRegistryMachineId(uuidRegistryParent);
10760 pMedium->i_getPreferredDiffFormat(),
10780 rc = pMediumLockList->Update(pMedium, false);
10787 rc = pMedium->i_createDiffStorage(diff, MediumVariant_Standard,
10918 Medium* pMedium = pAtt->i_getMedium();
10919 Assert(pMedium);
10923 rc = pMedium->i_createMediumLockList(true /* fFailIfInaccessible */,
10957 ComObjPtr<Medium> pMedium = pAtt->i_getMedium();
10958 if (pMedium.isNull())
10966 rc = pMedium->i_removeBackReference(mData->mUuid);
10974 if (!i_findAttachment(oldAtts, pMedium))
10978 rc = pMedium->i_removeBackReference(mData->mUuid);
11016 ComObjPtr<Medium> pMedium = pAtt->i_getMedium();
11017 Assert(pMedium);
11019 rc = pMedium->i_deleteStorage(NULL /*aProgress*/, true /*aWait*/);
11022 pMedium->i_getLocationFull().c_str() ));
11105 ComObjPtr<Medium> pMedium)
11111 if (pMediumThis == pMedium)
11247 ComObjPtr<Medium> pMedium = pAttach->i_getMedium();
11249 if (!pMedium.isNull())
11251 AutoCaller mac(pMedium);
11253 AutoReadLock lock(pMedium COMMA_LOCKVAL_SRC_POS);
11254 DeviceType_T devType = pMedium->i_getDeviceType();
11260 llMedia.push_back(pMedium);
11261 ComObjPtr<Medium> pParent = pMedium->i_getParent();
11343 Medium* pMedium = pAttach->i_getMedium();
11347 (pMedium) ? pMedium->i_getName().c_str() : "NULL",
11358 && pMedium
11375 rc = pMediumLockList->Update(pMedium->i_getParent(), false);
11377 rc = pMediumLockList->Append(pMedium, true);
11385 if (pMedium)
11391 if (pOldAttach->i_getMedium() == pMedium)
11393 LogFlowThisFunc(("--> medium '%s' was attached before, will not remove\n", pMedium->i_getName().c_str()));
11408 Medium* pMedium = pAttach->i_getMedium();
11412 if (pAttach->i_getType() == DeviceType_HardDisk && pMedium)
11414 LogFlowThisFunc(("detaching medium '%s' from machine\n", pMedium->i_getName().c_str()));
11417 rc = pMedium->i_removeBackReference(mData->mUuid);
11512 Medium* pMedium = pAttach->i_getMedium();
11513 if (pMedium)
11515 rc = pMedium->i_removeBackReference(mData->mUuid);
11526 Medium* pMedium = pAttach->i_getMedium();
11527 if (pMedium)
11529 rc = pMedium->i_addBackReference(mData->mUuid);
14231 Medium *pMedium = pAtt->i_getMedium();
14238 if (pMedium != NULL)
14240 MediumType_T mediumType = pMedium->i_getType();
14246 mrc = pMedium->i_createMediumLockList(fIsVitalImage /* fFailIfInaccessible */,