Lines Matching refs:task

201  *       task thread function will delete them when the task is complete.
275 /* Must have a strong VirtualBox reference during a task otherwise the
276 * reference count might drop to 0 while a task is still running. This
779 * destroy the task before we send out the completion notification.
828 * Implementation code for the "create base" task.
836 * Implementation code for the "create diff" task.
844 * Implementation code for the "clone" task.
852 * Implementation code for the "compact" task.
860 * Implementation code for the "resize" task.
869 * Implementation code for the "reset" task.
877 * Implementation code for the "delete" task.
885 * Implementation code for the "merge" task.
893 * Implementation code for the "export" task.
901 * Implementation code for the "import" task.
909 * Implementation code for the "encrypt" task.
2541 /* setup task object to carry out the operation asynchronously */
2820 /* setup task object to carry out the operation asynchronously */
2913 /* setup task object to carry out the operation asynchronously */
2983 /* setup task object to carry out the operation asynchronously */
3063 /* setup task object to carry out the operation asynchronously */
3198 /* setup task object to carry out the operation asynchronously */
4460 /* setup task object to carry out the operation sync/async */
4469 /* register a task (it will deregister itself when done) */
4757 /* setup task object to carry out the operation sync/async */
5429 /* setup task object to carry out the operation sync/async */
5652 /* setup task object to carry out the operation asynchronously */
5747 /* setup task object to carry out the operation asynchronously */
5887 /* setup task object to carry out the operation asynchronously */
6569 tr("Medium '%s' is locked for reading by another task"),
6576 tr("Medium '%s' is locked for writing by another task"),
7288 * @note When the task is executed by this method, IProgress::notifyComplete()
7290 * task when the task is finished to signal the operation completion for
7303 /// @todo use a more descriptive task name
7321 * some asynchronous task. Avoid calling it from a normal thread since the task
7325 * @note When the task is executed by this method, IProgress::notifyComplete()
7326 * is not called for the progress object associated with this task when
7327 * the task is finished. Instead, the result of the operation is returned
7346 * Implementation code for the "create base" task.
7352 * @param task
7355 HRESULT Medium::i_taskCreateBaseHandler(Medium::CreateBaseTask &task)
7399 rc = VirtualBox::i_ensureFilePathExists(location, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
7409 task.mSize,
7410 task.mVariant & ~MediumVariant_NoCreateDir,
7417 task.mVDOperationIfaces);
7467 if (task.isAsync())
7487 * Implementation code for the "create diff" task.
7489 * This task always gets started from Medium::createDiffStorage() and can run
7495 * @param task
7498 HRESULT Medium::i_taskCreateDiffHandler(Medium::CreateDiffTask &task)
7502 const ComObjPtr<Medium> &pTarget = task.mTarget;
7555 task.mpMediumLockList->GetBegin();
7557 task.mpMediumLockList->GetEnd();
7591 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
7599 (task.mVariant & ~MediumVariant_NoCreateDir) | VD_IMAGE_FLAGS_DIFF,
7605 task.mVDOperationIfaces);
7688 // deregister the task registered in createDiffStorage()
7694 if (task.isAsync())
7707 * Implementation code for the "merge" task.
7709 * This task always gets started from Medium::mergeTo() and can run
7715 * @param task
7718 HRESULT Medium::i_taskMergeHandler(Medium::MergeTask &task)
7722 const ComObjPtr<Medium> &pTarget = task.mTarget;
7726 if (!task.mParentForTarget.isNull())
7727 if (task.mParentForTarget->i_getDepth() >= SETTINGS_MEDIUM_DEPTH_MAX)
7729 AutoReadLock plock(task.mParentForTarget COMMA_LOCKVAL_SRC_POS);
7732 task.mParentForTarget->m->strLocationFull.c_str());
7749 task.mpMediumLockList->GetBegin();
7751 task.mpMediumLockList->GetEnd();
7817 task.mVDOperationIfaces);
7822 if (!task.mfMergeForward)
7827 if (task.mpChildrenToReparent)
7829 MediumLockList::Base::iterator childrenBegin = task.mpChildrenToReparent->GetBegin();
7830 MediumLockList::Base::iterator childrenEnd = task.mpChildrenToReparent->GetEnd();
7882 if (task.mfMergeForward)
7892 pTarget->i_setParent(task.mParentForTarget);
7893 if (task.mParentForTarget)
7912 if (task.mpChildrenToReparent)
7917 MediumLockList::Base::iterator childrenBegin = task.mpChildrenToReparent->GetBegin();
7918 MediumLockList::Base::iterator childrenEnd = task.mpChildrenToReparent->GetEnd();
7935 task.mpMediumLockList->GetBegin();
7937 task.mpMediumLockList->GetEnd();
7974 task.mMediumCaller.release();
7980 rc2 = task.mpMediumLockList->RemoveByIterator(it);
7983 if (task.isAsync() || pMedium != this)
7993 if (task.isAsync())
8013 if (task.isAsync())
8014 i_cancelMergeTo(task.mpChildrenToReparent, task.mpMediumLockList);
8021 * Implementation code for the "clone" task.
8026 * @param task
8029 HRESULT Medium::i_taskCloneHandler(Medium::CloneTask &task)
8033 const ComObjPtr<Medium> &pTarget = task.mTarget;
8034 const ComObjPtr<Medium> &pParent = task.mParent;
8054 * signal from the task initiator (which releases it only after
8080 task.mpSourceMediumLockList->GetBegin();
8082 task.mpSourceMediumLockList->GetEnd();
8124 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
8137 task.mpTargetMediumLockList->GetBegin();
8139 task.mpTargetMediumLockList->GetEnd();
8178 if (task.midxSrcImageSame == UINT32_MAX)
8187 task.mVariant & ~MediumVariant_NoCreateDir,
8192 task.mVDOperationIfaces);
8203 task.midxSrcImageSame,
8204 task.midxDstImageSame,
8205 task.mVariant & ~MediumVariant_NoCreateDir,
8210 task.mVDOperationIfaces);
8302 // now, at the end of this task (always asynchronous), save the settings
8313 /* Everything is explicitly unlocked when the task exits,
8314 * as the task destruction also destroys the source chain. */
8319 task.mpSourceMediumLockList->Clear();
8325 * Implementation code for the "delete" task.
8327 * This task always gets started from Medium::deleteStorage() and can run
8331 * @param task
8334 HRESULT Medium::i_taskDeleteHandler(Medium::DeleteTask &task)
8336 NOREF(task);
8341 /* The lock is also used as a signal from the task initiator (which
8393 * Implementation code for the "reset" task.
8397 * @param task
8400 HRESULT Medium::i_taskResetHandler(Medium::ResetTask &task)
8409 /* The lock is also used as a signal from the task initiator (which
8439 task.mpMediumLockList->GetBegin();
8441 task.mpMediumLockList->GetEnd();
8500 task.mVDOperationIfaces);
8532 /* Everything is explicitly unlocked when the task exits,
8533 * as the task destruction also destroys the media chain. */
8539 * Implementation code for the "compact" task.
8541 * @param task
8544 HRESULT Medium::i_taskCompactHandler(Medium::CompactTask &task)
8549 * signal from the task initiator (which releases it only after
8563 task.mpMediumLockList->GetBegin();
8565 task.mpMediumLockList->GetEnd();
8605 vrc = VDCompact(hdd, VD_LAST_IMAGE, task.mVDOperationIfaces);
8629 /* Everything is explicitly unlocked when the task exits,
8630 * as the task destruction also destroys the media chain. */
8636 * Implementation code for the "resize" task.
8638 * @param task
8641 HRESULT Medium::i_taskResizeHandler(Medium::ResizeTask &task)
8649 /* The lock is also used as a signal from the task initiator (which
8661 task.mpMediumLockList->GetBegin();
8663 task.mpMediumLockList->GetEnd();
8704 vrc = VDResize(hdd, task.mSize, &geo, &geo, task.mVDOperationIfaces);
8710 task.mSize, location.c_str());
8737 /* Everything is explicitly unlocked when the task exits,
8738 * as the task destruction also destroys the media chain. */
8744 * Implementation code for the "export" task.
8750 * @param task
8753 HRESULT Medium::i_taskExportHandler(Medium::ExportTask &task)
8760 * signal from the task initiator (which releases it only after
8813 if (!task.m_pSecretKeyStore)
8819 vrc = task.m_pSecretKeyStore->retainSecretKey(itKeyId->second, &pKey);
8831 task.m_pSecretKeyStore->releaseSecretKey(itKeyId->second);
8837 task.m_pSecretKeyStore->releaseSecretKey(itKeyId->second);
8843 task.m_pSecretKeyStore->releaseSecretKey(itKeyId->second);
8848 task.mpSourceMediumLockList->GetBegin();
8850 task.mpSourceMediumLockList->GetEnd();
8875 Utf8Str targetFormat(task.mFormat->i_getId());
8876 Utf8Str targetLocation(task.mFilename);
8877 uint64_t capabilities = task.mFormat->i_getCapabilities();
8888 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
8906 task.mVariant & ~MediumVariant_NoCreateDir,
8910 task.mVDImageIfaces,
8911 task.mVDOperationIfaces);
8927 /* Everything is explicitly unlocked when the task exits,
8928 * as the task destruction also destroys the source chain. */
8932 task.mpSourceMediumLockList->Clear();
8938 * Implementation code for the "import" task.
8944 * @param task
8947 HRESULT Medium::i_taskImportHandler(Medium::ImportTask &task)
8951 const ComObjPtr<Medium> &pParent = task.mParent;
8971 * signal from the task initiator (which releases it only after
8998 task.mFormat->i_getId().c_str(),
8999 task.mFilename.c_str(),
9001 task.mVDImageIfaces);
9005 task.mFilename.c_str(),
9010 uint64_t capabilities = task.mFormat->i_getCapabilities();
9024 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
9037 task.mpTargetMediumLockList->GetBegin();
9039 task.mpTargetMediumLockList->GetEnd();
9084 task.mVariant & ~MediumVariant_NoCreateDir,
9089 task.mVDOperationIfaces);
9177 // now, at the end of this task (always asynchronous), save the settings
9187 /* Everything is explicitly unlocked when the task exits,
9188 * as the task destruction also destroys the target chain. */
9192 task.mpTargetMediumLockList->Clear();
9238 * Implementation code for the "encrypt" task.
9240 * @param task
9243 HRESULT Medium::i_taskEncryptHandler(Medium::EncryptTask &task)
9248 * signal from the task initiator (which releases it only after
9294 if (task.mstrCurrentPassword.isEmpty())
9312 i_taskEncryptSettingsSetup(&CryptoSettingsRead, NULL, it->second.c_str(), task.mstrCurrentPassword.c_str(),
9324 if (task.mstrCipher.isNotEmpty())
9326 if ( task.mstrNewPassword.isEmpty()
9327 && task.mstrNewPasswordId.isEmpty()
9328 && task.mstrCurrentPassword.isNotEmpty())
9331 pszPasswordNew = task.mstrCurrentPassword.c_str();
9333 else if (task.mstrNewPassword.isEmpty())
9336 else if (task.mstrNewPasswordId.isEmpty())
9340 pszPasswordNew = task.mstrNewPassword.c_str();
9342 i_taskEncryptSettingsSetup(&CryptoSettingsWrite, task.mstrCipher.c_str(), NULL,
9350 else if (task.mstrNewPasswordId.isNotEmpty() || task.mstrNewPassword.isNotEmpty())
9356 task.mpMediumLockList->GetBegin();
9358 task.mpMediumLockList->GetEnd();
9394 vrc = VDPrepareWithFilters(pDisk, task.mVDOperationIfaces);
9407 if ( task.mstrNewPasswordId.isNotEmpty()
9408 || task.mstrCipher.isEmpty())
9418 if (task.mstrNewPasswordId.isNotEmpty())
9419 pBase->m->mapProperties["CRYPT/KeyId"] = task.mstrNewPasswordId;
9445 /* Everything is explicitly unlocked when the task exits,
9446 * as the task destruction also destroys the media chain. */