Lines Matching refs:pMedium
1064 ComObjPtr<Medium> pMedium;
1086 rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
1087 Assert(this == pMedium || FAILED(rc));
1424 ComObjPtr<Medium> pMedium;
1425 pMedium.createObject();
1426 rc = pMedium->init(aVirtualBox,
1435 rc = m->pVirtualBox->i_registerMedium(pMedium, &pMedium, mediaTreeLock);
3155 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
3156 AutoReadLock mediumReadLock(pMedium COMMA_LOCKVAL_SRC_POS);
3158 Assert(pMedium->m->state == MediumState_LockedWrite);
3160 if (pMedium->m->backRefs.size() > 1)
3164 pMedium->m->strLocationFull.c_str(), pMedium->m->backRefs.size());
3167 else if (pMedium->i_getChildren().size() > 1)
3171 pMedium->m->strLocationFull.c_str(), pMedium->i_getChildren().size());
4076 ComObjPtr<Medium> pMedium(this);
4077 while (!pMedium.isNull())
4082 pMedium = pMedium->m->pParent;
4297 ComObjPtr<Medium> pMedium = this;
4298 while (!pMedium.isNull())
4300 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
4305 MediumState_T mediumState = pMedium->i_getState();
4309 rc = pMedium->i_queryInfo(false /* fSetImageId */, false /* fSetParentId */,
4314 mediumState = pMedium->i_getState();
4324 rc = pMedium->COMGETTER(LastAccessError)(error.asOutParam());
4339 if (pMedium == this)
4340 mediumLockList.Prepend(pMedium, fMediumLockWrite);
4342 mediumLockList.Prepend(pMedium, fMediumLockWriteAll);
4344 pMedium = pMedium->i_getParent();
4345 if (pMedium.isNull() && pToBeParent)
4347 pMedium = pToBeParent;
4907 ComObjPtr<Medium> pMedium = i_getParent();
4908 while (!pMedium.isNull() && pMedium != pOther)
4909 pMedium = pMedium->i_getParent();
4910 if (pMedium == pOther)
4914 pMedium = pOther->i_getParent();
4915 while (!pMedium.isNull() && pMedium != this)
4916 pMedium = pMedium->i_getParent();
4917 if (pMedium == this)
5037 ComObjPtr<Medium> pMedium = i_getParent();
5038 while (!pMedium.isNull() && pMedium != pTarget)
5039 pMedium = pMedium->i_getParent();
5040 if (pMedium == pTarget)
5044 pMedium = pTarget->i_getParent();
5045 while (!pMedium.isNull() && pMedium != this)
5046 pMedium = pMedium->i_getParent();
5047 if (pMedium == this)
5217 pMedium = *it;
5218 aChildrenToReparent->Append(pMedium, true /* fLockWrite */);
5487 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
5488 AutoWriteLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
5490 if (pMedium->m->state == MediumState_Deleting)
5492 rc = pMedium->i_unmarkForDeletion();
5539 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
5540 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
5544 pMedium->m->strFormat.c_str(),
5545 pMedium->m->strLocationFull.c_str(),
5547 pMedium->m->vdImageIfaces);
5558 Medium *pMedium = it->GetMedium();
5561 pMedium->m->strFormat.c_str(),
5562 pMedium->m->strLocationFull.c_str(),
5564 pMedium->m->vdImageIfaces);
7449 ComObjPtr<Medium> pMedium;
7450 rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
7451 Assert(this == pMedium);
7563 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
7565 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
7568 if (pMedium->m->state == MediumState_Creating)
7572 Assert(pMedium->m->state == MediumState_LockedRead);
7576 pMedium->m->strFormat.c_str(),
7577 pMedium->m->strLocationFull.c_str(),
7579 pMedium->m->vdImageIfaces);
7583 pMedium->m->strLocationFull.c_str(),
7657 ComObjPtr<Medium> pMedium;
7658 mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, treeLock);
7659 Assert(pTarget == pMedium);
7758 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
7760 if (pMedium == this)
7762 else if (pMedium == pTarget)
7765 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
7774 Assert( ( pMedium != pTarget
7775 && ( pMedium->m->state == MediumState_Deleting
7776 || pMedium->m->state == MediumState_LockedRead))
7777 || ( pMedium == pTarget
7778 && pMedium->m->state == MediumState_LockedWrite));
7785 Assert( pMedium == pTarget
7786 || pMedium->m->state == MediumState_LockedRead
7787 || ( pMedium->m->backRefs.size() == 0
7788 && pMedium->m->state == MediumState_Deleting));
7790 Assert( pMedium != this
7791 || pMedium->m->state == MediumState_Deleting);
7795 if ( pMedium->m->state == MediumState_LockedRead
7796 || pMedium->m->state == MediumState_Deleting)
7798 if (pMedium->m->type == MediumType_Shareable)
7803 pMedium->m->strFormat.c_str(),
7804 pMedium->m->strLocationFull.c_str(),
7806 pMedium->m->vdImageIfaces);
7835 Medium *pMedium = it->GetMedium();
7838 pMedium->m->strFormat.c_str(),
7839 pMedium->m->strLocationFull.c_str(),
7841 pMedium->m->vdImageIfaces);
7897 ComObjPtr<Medium> pMedium;
7898 rc2 = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
7923 Medium *pMedium = it->GetMedium();
7924 AutoWriteLock childLock(pMedium COMMA_LOCKVAL_SRC_POS);
7926 pMedium->i_deparent(); // removes pMedium from source
7928 pMedium->i_setParent(pTarget);
7945 const ComObjPtr<Medium> pMedium = mediumLock.GetMedium();
7948 if ( pMedium == pTarget
7949 || pMedium->m->state == MediumState_LockedRead)
7955 rc2 = pMedium->m->pVirtualBox->i_unregisterMedium(pMedium);
7970 if (pMedium == this)
7983 if (task.isAsync() || pMedium != this)
7986 pMedium->uninit();
8088 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8089 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8092 Assert(pMedium->m->state == MediumState_LockedRead);
8096 pMedium->m->strFormat.c_str(),
8097 pMedium->m->strLocationFull.c_str(),
8099 pMedium->m->vdImageIfaces);
8103 pMedium->m->strLocationFull.c_str(),
8145 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8149 if (pMedium == pTarget && fCreatingTarget)
8152 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8155 Assert( pMedium->m->state == MediumState_LockedRead
8156 || pMedium->m->state == MediumState_LockedWrite);
8159 if (pMedium->m->state != MediumState_LockedWrite)
8161 if (pMedium->m->type == MediumType_Shareable)
8166 pMedium->m->strFormat.c_str(),
8167 pMedium->m->strLocationFull.c_str(),
8169 pMedium->m->vdImageIfaces);
8173 pMedium->m->strLocationFull.c_str(),
8255 ComObjPtr<Medium> pMedium;
8256 mrc = pParent->m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
8259 || pTarget == pMedium);
8270 ComObjPtr<Medium> pMedium;
8271 mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
8274 || pTarget == pMedium);
8447 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8449 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8452 Assert( pMedium == this
8453 || pMedium->m->state == MediumState_LockedRead);
8457 pMedium->m->strFormat.c_str(),
8458 pMedium->m->strLocationFull.c_str(),
8460 pMedium->m->vdImageIfaces);
8464 pMedium->m->strLocationFull.c_str(),
8468 if (pMedium == this)
8574 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8575 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8579 Assert(pMedium->m->state == MediumState_LockedWrite);
8581 Assert(pMedium->m->state == MediumState_LockedRead);
8587 pMedium->m->strFormat.c_str(),
8588 pMedium->m->strLocationFull.c_str(),
8590 pMedium->m->vdImageIfaces);
8594 pMedium->m->strLocationFull.c_str(),
8672 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8673 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8677 Assert(pMedium->m->state == MediumState_LockedWrite);
8679 Assert(pMedium->m->state == MediumState_LockedRead);
8685 pMedium->m->strFormat.c_str(),
8686 pMedium->m->strLocationFull.c_str(),
8688 pMedium->m->vdImageIfaces);
8692 pMedium->m->strLocationFull.c_str(),
8856 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
8857 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
8860 Assert(pMedium->m->state == MediumState_LockedRead);
8864 pMedium->m->strFormat.c_str(),
8865 pMedium->m->strLocationFull.c_str(),
8867 pMedium->m->vdImageIfaces);
8871 pMedium->m->strLocationFull.c_str(),
9045 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
9049 if (pMedium == this && fCreatingTarget)
9052 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
9055 Assert( pMedium->m->state == MediumState_LockedRead
9056 || pMedium->m->state == MediumState_LockedWrite);
9059 if (pMedium->m->state != MediumState_LockedWrite)
9061 if (pMedium->m->type == MediumType_Shareable)
9066 pMedium->m->strFormat.c_str(),
9067 pMedium->m->strLocationFull.c_str(),
9069 pMedium->m->vdImageIfaces);
9073 pMedium->m->strLocationFull.c_str(),
9133 ComObjPtr<Medium> pMedium;
9134 mrc = pParent->m->pVirtualBox->i_registerMedium(this, &pMedium,
9136 Assert(this == pMedium);
9147 ComObjPtr<Medium> pMedium;
9148 mrc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);
9149 Assert(this == pMedium);
9367 const ComObjPtr<Medium> &pMedium = mediumLock.GetMedium();
9368 AutoReadLock alock(pMedium COMMA_LOCKVAL_SRC_POS);
9370 Assert(pMedium->m->state == MediumState_LockedWrite);
9376 pMedium->m->strFormat.c_str(),
9377 pMedium->m->strLocationFull.c_str(),
9379 pMedium->m->vdImageIfaces);
9383 pMedium->m->strLocationFull.c_str(),