Lines Matching refs:task
140 * Once created, the task structure adds itself as a Console caller. This means:
144 * failure, the Console object may not be used by the task (see
148 * be accidentally uninitialized). Forgetting to delete the created task
152 * If \a aUsesVMPtr parameter is true, the task structure will also add itself
2181 /* setup task object and thread to carry out the operation asynchronously */
2182 std::auto_ptr<VMPowerDownTask> task(new VMPowerDownTask(this, pProgress));
2183 AssertBreakStmt(task->isOk(), rc = E_FAIL);
2186 (void *) task.get(), 0,
2195 /* task is now owned by powerDownThread(), so release it */
2196 task.release();
7101 /* Setup task object and thread to carry out the operation
7103 std::auto_ptr<VMPowerUpTask> task(new VMPowerUpTask(this, pPowerupProgress));
7104 ComAssertComRCRetRC(task->rc());
7106 task->mConfigConstructor = i_configConstructor;
7107 task->mSharedFolders = sharedFolders;
7108 task->mStartPaused = aPaused;
7110 task->mSavedStateFile = savedStateFile;
7111 task->mTeleporterEnabled = fTeleporterEnabled;
7112 task->mEnmFaultToleranceState = enmFaultToleranceState;
7172 task->hardDiskProgresses.push_back(pResetProgress);
7180 /* setup task object and thread to carry out the operation
7236 VMPowerUpTask::ProgressList progresses(task->hardDiskProgresses);
7362 /* setup task object and thread to carry out the operation
7370 (void *)task.get(), 0,
7375 /* task is now owned by powerUpThread(), so release it */
7376 task.release();
8226 /* Setup task object and thread to carry out the operation
8231 std::auto_ptr<VMPowerDownTask> task(new VMPowerDownTask(that, pProgress));
8233 /* If creating a task failed, this can currently mean one of
8239 if (!task->isOk())
8246 (void *)task.get(), 0,
8251 /* task is now owned by powerDownThread(), so release it */
8252 task.release();
9412 std::auto_ptr<VMPowerUpTask> task(static_cast<VMPowerUpTask *>(pvUser));
9413 AssertReturn(task.get(), VERR_INVALID_PARAMETER);
9415 AssertReturn(!task->mConsole.isNull(), VERR_INVALID_PARAMETER);
9416 AssertReturn(!task->mProgress.isNull(), VERR_INVALID_PARAMETER);
9429 ComObjPtr<Console> pConsole = task->mConsole;
9433 /* The lock is also used as a signal from the task initiator (which
9454 it = task->hardDiskProgresses.begin();
9455 it != task->hardDiskProgresses.end(); ++it)
9460 rc = task->mProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1);
9472 if ( !task->mTeleporterEnabled
9473 && task->mEnmFaultToleranceState != FaultToleranceState_Standby)
9545 &task->mErrorMsg,
9546 task->mConfigConstructor,
9590 for (SharedFolderDataMap::const_iterator it = task->mSharedFolders.begin();
9591 it != task->mSharedFolders.end();
9624 if (task->mSavedStateFile.length())
9627 task->mSavedStateFile.c_str()));
9630 task->mSavedStateFile.c_str(),
9632 static_cast<IProgress *>(task->mProgress));
9636 if (task->mStartPaused)
9660 else if (task->mTeleporterEnabled)
9664 rc = pConsole->i_teleporterTrg(pConsole->mpUVM, pMachine, &task->mErrorMsg, task->mStartPaused,
9665 task->mProgress, &fPowerOffOnFailure);
9675 else if (task->mEnmFaultToleranceState != FaultToleranceState_Inactive)
9693 if (task->mProgress->i_setCancelCallback(faultToleranceProgressCancelCallback, pConsole->mpUVM))
9708 task->mEnmFaultToleranceState == FaultToleranceState_Master /* fMaster */,
9715 task->mProgress->i_setCancelCallback(NULL, NULL);
9720 else if (task->mStartPaused)
9760 VMR3AtErrorDeregister(pConsole->mpUVM, Console::i_genericVMSetErrorCallback, &task->mErrorMsg);
9777 * an appropriate error message has been set in task->mErrorMsg.
9781 if (!task->mErrorMsg.length())
9789 task->mErrorMsg = Utf8StrFmt(tr("Failed to start VM execution (%Rrc)"),
9795 throw i_setErrorStatic(E_FAIL, task->mErrorMsg.c_str());
9833 task->mProgress->i_notifyComplete(S_OK);
9838 task->mProgress->i_notifyComplete(rc);
9945 std::auto_ptr<VMPowerDownTask> task(static_cast<VMPowerDownTask *>(pvUser));
9946 AssertReturn(task.get(), VERR_INVALID_PARAMETER);
9948 AssertReturn(task->isOk(), VERR_GENERAL_FAILURE);
9950 Assert(task->mProgress.isNull());
9952 const ComObjPtr<Console> &that = task->mConsole;
9961 task->releaseVMCaller();
9965 that->i_powerDown(task->mServerProgress);