Lines Matching defs:it

11  * you can redistribute it and/or modify it under the terms of the GNU
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
139 /* Confirm a successful initialization when it's the case */
147 * Called either from FinalRelease(), by the parent when it gets destroyed,
148 * or by a third party when it decides this object is no more valid.
165 SnapshotsList::iterator it;
166 for (it = m->llChildren.begin();
167 it != m->llChildren.end();
168 ++it)
170 Snapshot *pChild = *it;
200 * Delete the current snapshot by removing it from the tree of snapshots
205 * the number of callers to become 0 (it is 1 because of the AutoCaller in here).
207 * NOTE: this does NOT lock the snapshot, it is assumed that the machine state
239 /* we've changed the base of the current state so mark it as
240 * modified as it no longer guaranteed to be its copy */
256 for (SnapshotsList::const_iterator it = m->llChildren.begin();
257 it != m->llChildren.end();
258 ++it)
260 ComObjPtr<Snapshot> child = *it;
282 for (SnapshotsList::iterator it = llParent.begin();
283 it != llParent.end();
284 ++it)
286 Snapshot *pParentsChild = *it;
289 llParent.erase(it);
327 // prohibit setting a UUID only as the machine name, or else it can
407 for (SnapshotsList::const_iterator it = m->llChildren.begin();
408 it != m->llChildren.end();
409 ++it)
410 aChildren.push_back(*it);
508 for (SnapshotsList::const_iterator it = m->llChildren.begin();
509 it != m->llChildren.end();
510 ++it)
512 count += (*it)->i_getAllChildrenCountImpl();
592 for (SnapshotsList::const_iterator it = m->llChildren.begin();
593 it != m->llChildren.end();
594 ++it)
596 if ((child = (*it)->i_findChildOrSelf(aId)))
626 for (SnapshotsList::const_iterator it = m->llChildren.begin();
627 it != m->llChildren.end();
628 ++it)
630 if ((child = (*it)->i_findChildOrSelf(aName)))
662 for (SnapshotsList::const_iterator it = m->llChildren.begin();
663 it != m->llChildren.end();
664 ++it)
666 Snapshot *pChild = *it;
695 for (SnapshotsList::const_iterator it = m->llChildren.begin();
696 it != m->llChildren.end();
697 ++it)
699 Snapshot *pChild = *it;
711 * this snapshot or any of its (grand-)children and updates it accordingly.
779 for (SnapshotsList::const_iterator it = m->llChildren.begin();
780 it != m->llChildren.end();
781 ++it)
788 Snapshot *pSnap = *it;
842 // report the saved state file if it's not on the list yet
846 for (std::list<Utf8Str>::const_iterator it = llFilenames.begin();
847 it != llFilenames.end();
848 ++it)
850 const Utf8Str &str = *it;
909 // additionally it postpones the uninit() call until we no longer need
912 for (SnapshotsList::const_iterator it = m->llChildren.begin();
913 it != m->llChildren.end();
914 it = m->llChildren.begin())
916 Snapshot *pChild = *it;
1014 for (HWData::SharedFolderList::iterator it = mHWData->mSharedFolders.begin();
1015 it != mHWData->mSharedFolders.end();
1016 ++it)
1020 rc = folder->initCopy(this, *it);
1022 *it = folder;
1027 for (MediaData::AttachmentList::const_iterator it = mMediaData->mAttachments.begin();
1028 it != mMediaData->mAttachments.end();
1029 ++it)
1031 MediumAttachment *pAtt = *it;
1044 it = aSessionMachine->mStorageControllers->begin();
1045 it != aSessionMachine->mStorageControllers->end();
1046 ++it)
1050 ctrl->initCopy(this, *it);
1069 it = aSessionMachine->mUSBControllers->begin();
1070 it != aSessionMachine->mUSBControllers->end();
1071 ++it)
1075 ctrl->initCopy(this, *it);
1104 /* Confirm a successful initialization when it's the case */
1218 /* Confirm a successful initialization when it's the case */
1252 * with the primary Machine instance (mMachine) if it exists.
1429 tr("Cannot take a snapshot of the machine while it is changing the state (machine state: %s)"),
1441 for (MediaData::AttachmentList::iterator it = mMediaData->mAttachments.begin();
1442 it != mMediaData->mAttachments.end();
1443 ++it)
1445 const ComObjPtr<MediumAttachment> pAtt(*it);
1480 /* create and start the task on a separate thread (note that it will not
1568 tr("Cannot take another snapshot for machine '%s', because it exceeds the maximum snapshot depth limit. Please delete some earlier snapshot which you no longer need"),
1710 * machine state to the state it had at the beginning.
1730 // it for various cleanup steps
1785 /* check the remote state to see that we got it right. */
1822 * Called by the Console when it's done saving the VM state into the snapshot
1891 // delete the saved state file (it might have been already created)
1969 for (MediaData::AttachmentList::iterator it = pSnapMachine->mMediaData->mAttachments.begin();
1970 it != pSnapMachine->mMediaData->mAttachments.end();
1971 ++it)
1973 ComObjPtr<MediumAttachment> &pAttach = *it;
1995 /* create and start the task on a separate thread (note that it will not
2069 // so that releaseSavedStateFile() won't think it's still in use
2101 for (MediaData::AttachmentList::const_iterator it = pSnapshotMachine->mMediaData->mAttachments.begin();
2102 it != pSnapshotMachine->mMediaData->mAttachments.end();
2103 ++it)
2107 pAttach->initCopy(this, *it);
2147 for (MediaData::AttachmentList::const_iterator it = mMediaData.backedUpData()->mAttachments.begin();
2148 it != mMediaData.backedUpData()->mAttachments.end();
2149 ++it)
2151 ComObjPtr<MediumAttachment> pAttach = *it;
2178 * it happens nevertheless we'll close our eyes and continue below. */
2190 for (std::list< ComObjPtr<MediumAttachment> >::iterator it = llDiffAttachmentsToDelete.begin();
2191 it != llDiffAttachmentsToDelete.end();
2192 ++it)
2194 ComObjPtr<MediumAttachment> pAttach = *it; // guaranteed to have only attachments where medium != NULL
2208 // Remove it from the backup or else i_saveSettings will try to detach
2209 // it again and assert. The paranoia check avoids crashes (see
2235 for (MediaList::iterator it = llDiffsToDelete.begin();
2236 it != llDiffsToDelete.end();
2237 ++it)
2239 ComObjPtr<Medium> &pMedium = *it;
2337 * if it is running then the merges are done via internal session callbacks.
2363 tr("Cannot delete a snapshot of the machine while it is changing the state (machine state: %s)"),
2393 tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it has %d child snapshots, which is more than the one snapshot allowed for deletion"),
2400 tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it is the current snapshot and has one child snapshot"),
2435 for (MediaData::AttachmentList::iterator it = pSnapMachine->mMediaData->mAttachments.begin();
2436 it != pSnapMachine->mMediaData->mAttachments.end();
2437 ++it)
2439 ComObjPtr<MediumAttachment> &pAttach = *it;
2637 // no need to lock the snapshot machine since it is const by definition
2649 // merge it with its one and only child (the diff image holding the
2651 for (MediaData::AttachmentList::iterator it = pSnapMachine->mMediaData->mAttachments.begin();
2652 it != pSnapMachine->mMediaData->mAttachments.end();
2653 ++it)
2655 ComObjPtr<MediumAttachment> &pAttach = *it;
2734 // state), unless it's a base image. Backwards merges of the first
2735 // snapshot into the base image is essential, as it ensures that
2746 // refers to the child and have it point to the parent instead
2845 /* linking storage UID with snapshot path, it is a helper container (just for easy finding needed path) */
2943 for (MediumDeleteRecList::iterator it = toDelete.begin();
2944 it != toDelete.end();)
2946 const ComObjPtr<Medium> &pMedium(it->mpHD);
2960 if (it->mpMediumLockList == NULL)
2966 Assert( !it->mfMergeForward
2970 * exceptions: if it's the last medium in the chain or if it's
2972 * In both cases leave the image in place. If it's the first
2973 * exception the user can delete it later if he wants. */
2991 if (it->mfNeedsOnlineMerge)
2994 // SessionMachine::FinishOnlineMergeMedium can get at it.
2998 mConsoleTaskData.mDeleteSnapshotInfo = (void *)&(*it);
3000 rc = i_onlineMergeMedium(it->mpOnlineMediumAttachment,
3001 it->mpSource,
3002 it->mpTarget,
3003 it->mfMergeForward,
3004 it->mpParentForTarget,
3005 it->mpChildrenToReparent,
3006 it->mpMediumLockList,
3014 rc = it->mpSource->i_mergeTo(it->mpTarget,
3015 it->mfMergeForward,
3016 it->mpParentForTarget,
3017 it->mpChildrenToReparent,
3018 it->mpMediumLockList,
3031 AutoReadLock mlock(it->mpSource COMMA_LOCKVAL_SRC_POS);
3032 if (!it->mpSource->i_isMediumFormatFile())
3036 const Utf8Str &loc = it->mpSource->i_getLocationFull();
3042 // thus it's safe to remove the attachment. We use the
3047 fReparentTarget = !it->mfMergeForward;
3049 if (!it->mfNeedsOnlineMerge)
3056 delete it->mpMediumLockList;
3057 it->mpMediumLockList = NULL;
3064 // snapshot, as the VM will take it over. For forward merges the
3070 it->mpTarget);
3071 it->mpTarget->i_removeBackReference(machineId, snapshotId);
3075 it->mpSource);
3090 pAtt = i_findAttachment(pMachine->mMediaData->mAttachments, it->mpSource);
3094 pAtt->i_updateMedium(it->mpTarget);
3095 it->mpTarget->i_addBackReference(pMachine->mData->mUuid, childSnapshotId);
3104 if (it->mfNeedsOnlineMerge)
3105 it->mpTarget->i_addBackReference(pMachine->mData->mUuid, childSnapshotId);
3110 it->mpSource->uninit();
3116 it = toDelete.erase(it);
3151 for (MediumDeleteRecList::const_iterator it = toDelete.begin();
3152 it != toDelete.end();
3153 ++it)
3154 i_cancelDeleteSnapshotMedium(it->mpHD, it->mpSource,
3155 it->mpChildrenToReparent,
3156 it->mfNeedsOnlineMerge,
3157 it->mpMediumLockList, it->mpHDLockToken,
3158 it->mMachineId, it->mSnapshotId);
3218 * it is not merged or deleted (out).
3268 /* the differencing hard disk w/o children will be deleted, protect it
3273 /* not going multi-merge as it's too expensive */
3341 /* Try to lock the newly constructed medium lock list. If it succeeds
3365 for (MediumLockList::Base::iterator it = lockListVMMABegin,
3368 ++it, ++it2)
3370 if ( it == lockListVMMAEnd
3371 || it->GetMedium() != it2->GetMedium())
3376 bool fLockReq = (it2->GetLockRequest() || it->GetLockRequest());
3379 rc = it->UpdateLock(fLockReq);
3397 * the VM is located, and this means it is already locked
3412 for (MediumLockList::Base::iterator it = childrenToReparentBegin;
3413 it != childrenToReparentEnd;
3414 ++it)
3416 ComObjPtr<Medium> pMedium = it->GetMedium();
3418 if (!it->IsLocked())
3470 for (MediumLockList::Base::iterator it = lockListVMMABegin;
3471 it != lockListVMMAEnd;
3472 ++it)
3476 it->UpdateLock(it == lockListLast);
3479 ComObjPtr<Medium> pMedium = it->GetMedium();
3551 // an empty list to cancelMergeTo so that it works as designed.
3561 for (MediumLockList::Base::iterator it = lockListBegin;
3562 it != lockListEnd;
3563 ++it)
3565 ComObjPtr<Medium> pMedium = it->GetMedium();
3576 it->UpdateLock(it == lockListLast);
3646 for (MediumLockList::Base::iterator it = lockListBegin;
3647 it != lockListEnd;
3648 ++it)
3650 MediumLock &mediumLock = *it;
3727 // first, unregister the target since it may become a base
3732 // then, reparent it and disconnect the deleted branch at
3764 // rely on the destructor doing it very late.
3773 for (MediumLockList::Base::iterator it = childrenBegin;
3774 it != childrenEnd;
3775 ++it)
3777 Medium *pMedium = it->GetMedium();
3795 for (MediumLockList::Base::iterator it = lockListBegin;
3796 it != lockListEnd;
3799 MediumLock &mediumLock = *it;
3808 ++it;
3822 * -- there is one more caller added by Task to it which
3824 * caller may still hold an AutoCaller instance for it
3825 * and therefore we cannot uninit() it (it's therefore
3836 rc = pMediumLockList->RemoveByIterator(it);
3857 for (MediumLockList::Base::iterator it = lockListBegin;
3858 it != lockListEnd;
3859 ++it)
3861 it->UpdateLock(it == lockListLast);