Lines Matching refs:pMedium

1808     ComObjPtr<Medium> pMedium;
1821 rc = i_findHardDiskById(id, false /* setError */, &pMedium);
1825 &pMedium);
1832 false /* setError */, &pMedium);
1835 false /* setError */, &pMedium);
1846 if (pMedium.isNull())
1848 pMedium.createObject();
1850 rc = pMedium->init(this,
1859 rc = i_registerMedium(pMedium, &pMedium, treeLock);
1869 pMedium->uninit();
1881 pMedium.queryInterfaceTo(aMedium.asOutParam());
2048 int VirtualBox::i_decryptMediumSettings(Medium *pMedium)
2051 HRESULT hrc = pMedium->GetProperty(Bstr("InitiatorSecretEncrypted").raw(),
2058 pMedium->i_setPropertyDirect("InitiatorSecret", strPlaintext);
2081 ComObjPtr<Medium> pMedium = *mt;
2082 AutoCaller medCaller(pMedium);
2085 AutoWriteLock mlock(pMedium COMMA_LOCKVAL_SRC_POS);
2086 int vrc = i_decryptMediumSettings(pMedium);
2264 ComObjPtr<Medium> pMedium = *mt;
2265 pMedium->i_dumpBackRefs();
2274 ComObjPtr<Medium> pMedium = *mt;
2275 pMedium->i_dumpBackRefs();
3451 Medium *pMedium = *it;
3452 AutoReadLock imageLock(pMedium COMMA_LOCKVAL_SRC_POS);
3453 const Utf8Str &strLocationFull = pMedium->i_getLocationFull();
3456 && pMedium->i_getId() == *aId)
3462 if (pMedium->i_getDeviceType() != mediumType)
3473 *aImage = pMedium;
3500 * If the UUID is empty (indicating an empty drive), this sets pMedium
3504 * sets pMedium to the object from the list in IHost and returns S_OK.
3506 * If the UUID is an image file, this sets pMedium to the object that
3514 * @param pMedium out: IMedium object found.
3521 ComObjPtr<Medium> &pMedium)
3526 pMedium.setNull();
3541 pMedium);
3544 rc = i_findDVDOrFloppyImage(mediumType, &uuid, Utf8Str::Empty, aSetError, &pMedium);
3881 Medium *pMedium = *it;
3882 pMedium->i_markRegistriesModified();
3950 Medium *pMedium = *it;
3956 HRESULT rc = pMedium->i_updatePath(pmr.strConfigDirOld,
3962 pDesc->llMedia.push_back(pMedium);
4023 Medium *pMedium = *it;
4024 AutoCaller autoCaller(pMedium);
4026 AutoReadLock mlock(pMedium COMMA_LOCKVAL_SRC_POS);
4028 if (pMedium->i_isInRegistry(uuidRegistry))
4031 rc = pMedium->i_saveSettings(llTarget.back(), strMachineFolder); // this recurses into child hard disks
4207 * locks @a pMedium for reading
4209 * @param pMedium Medium object to remember.
4217 HRESULT VirtualBox::i_registerMedium(const ComObjPtr<Medium> &pMedium,
4221 AssertReturn(pMedium != NULL, E_INVALIDARG);
4230 AutoCaller mediumCaller(pMedium);
4237 AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
4238 devType = pMedium->i_getDeviceType();
4262 AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
4263 id = pMedium->i_getId();
4264 strLocationFull = pMedium->i_getLocationFull();
4265 pParent = pMedium->i_getParent();
4291 pall->getList().push_back(pMedium);
4295 m->mapHardDisks[id] = pMedium;
4299 *ppMedium = pMedium;
4303 // pMedium may be the last reference to the Medium object, and the
4325 * @param pMedium Hard disk object to remove.
4327 * @note Caller must hold the media tree lock for writing; in addition, this locks @a pMedium for reading
4329 HRESULT VirtualBox::i_unregisterMedium(Medium *pMedium)
4331 AssertReturn(pMedium != NULL, E_INVALIDARG);
4336 AutoCaller mediumCaller(pMedium);
4346 AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
4347 id = pMedium->i_getId();
4348 pParent = pMedium->i_getParent();
4349 devType = pMedium->i_getDeviceType();
4370 pall->getList().remove(pMedium);
4387 * @param pMedium
4389 void VirtualBox::i_pushMediumToListWithChildren(MediaList &llMedia, Medium *pMedium)
4394 const MediaList &llChildren = pMedium->i_getChildren();
4403 Log(("Pushing medium %RTuuid\n", pMedium->i_getId().raw()));
4404 llMedia.push_back(pMedium);
4435 ComObjPtr<Medium> pMedium = *it;
4436 AutoCaller medCaller(pMedium);
4438 AutoReadLock medlock(pMedium COMMA_LOCKVAL_SRC_POS);
4440 if (pMedium->i_isInRegistry(uuidMachine))
4442 i_pushMediumToListWithChildren(llMedia2Close, pMedium);
4450 ComObjPtr<Medium> pMedium = *it;
4451 Log(("Closing medium %RTuuid\n", pMedium->i_getId().raw()));
4452 AutoCaller mac(pMedium);
4453 pMedium->i_close(mac);
4496 ComObjPtr<Medium> &pMedium = *it;
4497 AutoCaller medCaller(pMedium);
4499 AutoWriteLock mlock(pMedium COMMA_LOCKVAL_SRC_POS);
4501 if (pMedium->i_removeRegistryRecursive(id))
4506 const Guid *puuidBetter = pMedium->i_getAnyMachineBackref();
4510 pMedium->i_addRegistryRecursive(*puuidBetter);