Lines Matching refs:mSession
132 mSession.mPID = NIL_RTPROCESS;
133 mSession.mLockType = LockType_Null;
134 mSession.mState = SessionState_Unlocked;
829 if (!mData->mSession.mMachine.isNull())
844 (SessionMachine*)mData->mSession.mMachine));
850 static_cast<Machine*>(mData->mSession.mMachine)->i_setMachineState(MachineState_Aborted);
857 mData->mSession.mMachine->uninit();
858 /* SessionMachine::uninit() must set mSession.mMachine to null */
859 Assert(mData->mSession.mMachine.isNull());
2669 *aSessionState = mData->mSession.mState;
2678 aSessionType = mData->mSession.mType;
2687 *aSessionPID = mData->mSession.mPID;
3223 LogFlowThisFunc(("mSession.mState=%s\n", Global::stringifySessionState(mData->mSession.mState)));
3225 SessionState_T oldState = mData->mSession.mState;
3230 if ( mData->mSession.mState == SessionState_Unlocking
3231 && mData->mSession.mProgress)
3234 mData->mSession.mProgress->WaitForCompletion(1000);
3236 LogFlowThisFunc(("after waiting: mSession.mState=%s\n", Global::stringifySessionState(mData->mSession.mState)));
3240 if ( (mData->mSession.mState == SessionState_Locked) // machine is write-locked already
3252 ComAssertRet(mData->mSession.mLockType == LockType_Write || mData->mSession.mLockType == LockType_VM, E_FAIL);
3253 ComPtr<IInternalSessionControl> pSessionW = mData->mSession.mDirectControl;
3255 ComObjPtr<SessionMachine> pSessionMachine = mData->mSession.mMachine;
3268 if (mData->mSession.mLockType == LockType_VM)
3292 if (mData->mSession.mState != SessionState_Locked)
3301 mData->mSession.mRemoteControls.push_back(pSessionControl);
3303 else if ( mData->mSession.mState == SessionState_Locked
3304 || mData->mSession.mState == SessionState_Unlocking
3325 bool fLaunchingVMProcess = (mData->mSession.mState == SessionState_Spawning);
3329 if (mData->mSession.mPID == NIL_RTPROCESS)
3344 LogFlowThisFunc(("mSession.mPID=%d(0x%x)\n", mData->mSession.mPID, mData->mSession.mPID));
3354 if ( (RT_SUCCESS(rc) && mData->mSession.mPID == ppid)
3357 LogFlowThisFunc(("mSession.mPID => %d(%#x) - windows hardening stub\n", mData->mSession.mPID, pid));
3358 mData->mSession.mPID = pid;
3362 if (mData->mSession.mPID != pid)
3366 pid, mUserData->s.strName.c_str(), mData->mSession.mPID);
3388 SessionState_T origState = mData->mSession.mState;
3389 mData->mSession.mState = SessionState_Spawning;
3411 * Note that mData->mSession.mRemoteControls accessed outside
3456 rc = mData->mSession.mRemoteControls.front()->AssignRemoteMachine(sessionMachine, console);
3473 mData->mSession.mState = origState;
3480 /** @todo Consider checking mData->mSession.mProgress for cancellation
3483 /* We don't reset mSession.mPID here because it is necessary for
3492 Assert(mData->mSession.mRemoteControls.size() == 1);
3493 if (mData->mSession.mRemoteControls.size() == 1)
3496 mData->mSession.mRemoteControls.front()->Uninitialize();
3499 mData->mSession.mRemoteControls.clear();
3500 mData->mSession.mState = SessionState_Unlocked;
3507 mData->mSession.mPID = pid;
3512 mData->mSession.mLockType = aLockType;
3514 mData->mSession.mDirectControl = pSessionControl;
3515 mData->mSession.mState = SessionState_Locked;
3517 mData->mSession.mMachine = sessionMachine;
3522 ComPtr<IUnknown> unk = mData->mSession.mDirectControl;
3653 if (mData->mSession.mState != SessionState_Locked)
3666 if (mData->mSession.mPID != NIL_RTPROCESS)
3667 RTProcTerminate(mData->mSession.mPID);
3889 mData->mSession.mLockedMedia.Unlock();
3891 rc = mData->mSession.mLockedMedia.Insert(pAttachTemp, pMediumLockList);
3892 mData->mSession.mLockedMedia.Lock();
3903 mData->mSession.mLockedMedia.Unlock();
3904 mData->mSession.mLockedMedia.Remove(pAttachTemp);
3905 mData->mSession.mLockedMedia.Lock();
3987 mData->mSession.mLockedMedia.Unlock();
3989 rc = mData->mSession.mLockedMedia.Insert(pAttachTemp, pMediumLockList);
3990 mData->mSession.mLockedMedia.Lock();
4001 mData->mSession.mLockedMedia.Unlock();
4002 mData->mSession.mLockedMedia.Remove(pAttachTemp);
4003 mData->mSession.mLockedMedia.Lock();
4258 mData->mSession.mLockedMedia.Unlock();
4260 rc = mData->mSession.mLockedMedia.Insert(attachment, pMediumLockList);
4261 mData->mSession.mLockedMedia.Lock();
4273 mData->mSession.mLockedMedia.Unlock();
4274 mData->mSession.mLockedMedia.Remove(attachment);
4275 mData->mSession.mLockedMedia.Lock();
5056 if (mData->mSession.mState != SessionState_Unlocked)
5536 if (mData->mSession.mState != SessionState_Locked)
5539 Global::stringifySessionState(mData->mSession.mState));
5541 if (mData->mSession.mLockType == LockType_VM)
5542 directControl = mData->mSession.mDirectControl;
5559 if (mData->mSession.mState != SessionState_Locked)
5562 Global::stringifySessionState(mData->mSession.mState));
5564 if (mData->mSession.mLockType == LockType_VM)
5565 directControl = mData->mSession.mDirectControl;
5620 if (mData->mSession.mLockType == LockType_VM)
5621 directControl = mData->mSession.mDirectControl;
5780 if (mData->mSession.mLockType == LockType_VM)
5781 directControl = mData->mSession.mDirectControl;
5911 if (mData->mSession.mLockType == LockType_VM)
5912 directControl = mData->mSession.mDirectControl;
7416 LogFlowThisFunc(("mSession.mState=%s\n", Global::stringifySessionState(mData->mSession.mState)));
7424 if (mData->mSession.mState != SessionState_Unlocked && mData->mSession.mType.compare("headless", Utf8Str::CaseInsensitive))
7431 if ( mData->mSession.mState == SessionState_Locked
7432 || mData->mSession.mState == SessionState_Spawning
7433 || mData->mSession.mState == SessionState_Unlocking)
7712 mData->mSession.mState = SessionState_Unlocked;
7721 Assert(mData->mSession.mPID == NIL_RTPROCESS);
7722 mData->mSession.mRemoteControls.push_back(aControl);
7723 mData->mSession.mProgress = aProgress;
7724 mData->mSession.mPID = pid;
7725 mData->mSession.mState = SessionState_Spawning;
7726 mData->mSession.mType = strFrontend;
7770 if ( ( mData->mSession.mState == SessionState_Locked
7771 && mData->mSession.mLockType == LockType_VM)
7772 || (aAllowClosing && mData->mSession.mState == SessionState_Unlocking)
7775 AssertReturn(!mData->mSession.mMachine.isNull(), false);
7777 aMachine = mData->mSession.mMachine;
7780 *aControl = mData->mSession.mDirectControl;
7804 if (mData->mSession.mState == SessionState_Spawning)
7836 if (mData->mSession.mState != SessionState_Spawning)
7846 if (mData->mSession.mPID == NIL_RTPROCESS)
7850 int vrc = RTProcWait(mData->mSession.mPID, RTPROCWAIT_FLAGS_NOBLOCK, &status);
7891 Assert(mData->mSession.mRemoteControls.size() == 1);
7892 if (mData->mSession.mRemoteControls.size() == 1)
7895 mData->mSession.mRemoteControls.front()->Uninitialize();
7898 mData->mSession.mRemoteControls.clear();
7899 mData->mSession.mState = SessionState_Unlocked;
7902 if (!mData->mSession.mProgress.isNull())
7904 mData->mSession.mProgress->notifyComplete(rc);
7905 mData->mSession.mProgress.setNull();
7908 mData->mSession.mPID = NIL_RTPROCESS;
10648 lockedMediaMap = &mData->mSession.mLockedMedia;
10901 lockedMediaMap = &mData->mSession.mLockedMedia;
11036 const ComObjPtr<SessionMachine> pMachine = mData->mSession.mMachine;
11041 rc = mData->mSession.mMachine->i_lockMedia();
11364 rc = mData->mSession.mLockedMedia.Get(pAttach, pMediumLockList);
11371 rc = mData->mSession.mLockedMedia.Unlock();
11424 rc = mData->mSession.mLockedMedia.Get(pAttach, pMediumLockList);
11437 rc = mData->mSession.mLockedMedia.Remove(pAttach);
11449 rc = mData->mSession.mLockedMedia.Lock();
12444 * mData->mSession.mMachine.setNull() below (which can release the last
12550 mData->mSession.mPID = NIL_RTPROCESS;
12561 if (mData->mSession.mRemoteControls.size())
12564 mData->mSession.mRemoteControls.size()));
12567 mData->mSession.mRemoteControls.begin();
12568 while (it != mData->mSession.mRemoteControls.end())
12577 mData->mSession.mRemoteControls.clear();
12624 mData->mSession.mDirectControl.setNull();
12629 Assert(mData->mSession.mDirectControl.isNull());
12630 Assert(mData->mSession.mState == SessionState_Unlocking);
12631 Assert(!mData->mSession.mProgress.isNull());
12633 if (mData->mSession.mProgress)
12636 mData->mSession.mProgress->i_notifyComplete(S_OK);
12638 mData->mSession.mProgress->i_notifyComplete(E_FAIL,
12642 mData->mSession.mProgress.setNull();
12646 Assert( (SessionMachine*)mData->mSession.mMachine == this
12650 mData->mSession.mLockType = LockType_Null;
12651 mData->mSession.mMachine.setNull();
12652 mData->mSession.mState = SessionState_Unlocked;
12653 mData->mSession.mType.setNull();
12800 if (mData->mSession.mLockType == LockType_VM)
12801 directControl = mData->mSession.mDirectControl;
12972 if (mData->mSession.mState != SessionState_Locked)
12975 if (!mData->mSession.mProgress.isNull())
12976 mData->mSession.mProgress->setOtherProgressObject(pProgress);
13020 if (mData->mSession.mState != SessionState_Locked)
13024 if (mData->mSession.mProgress)
13026 mData->mSession.mProgress->notifyComplete((HRESULT)aResult);
13027 mData->mSession.mProgress.setNull();
13037 mData->mSession.mPID);
13264 if (control == mData->mSession.mDirectControl)
13271 Assert(mData->mSession.mState == SessionState_Locked);
13272 mData->mSession.mState = SessionState_Unlocking;
13275 mData->mSession.mDirectControl.setNull();
13278 if (mData->mSession.mProgress)
13282 mData->mSession.mProgress->notifyComplete(E_FAIL,
13286 mData->mSession.mProgress.setNull();
13294 Assert(mData->mSession.mProgress.isNull());
13302 mData->mSession.mProgress = progress;
13308 mData->mSession.mRemoteControls.begin();
13309 while (it != mData->mSession.mRemoteControls.end())
13315 BOOL found = it != mData->mSession.mRemoteControls.end();
13320 mData->mSession.mRemoteControls.erase(it);
13614 reason = mData->mSession.mState == SessionState_Unlocking ?
13681 if (mData->mSession.mLockType == LockType_VM)
13682 directControl = mData->mSession.mDirectControl;
13707 if (mData->mSession.mLockType == LockType_VM)
13708 directControl = mData->mSession.mDirectControl;
13736 if (mData->mSession.mLockType == LockType_VM)
13737 directControl = mData->mSession.mDirectControl;
13760 if (mData->mSession.mLockType == LockType_VM)
13761 directControl = mData->mSession.mDirectControl;
13784 if (mData->mSession.mLockType == LockType_VM)
13785 directControl = mData->mSession.mDirectControl;
13808 if (mData->mSession.mLockType == LockType_VM)
13809 directControl = mData->mSession.mDirectControl;
13832 if (mData->mSession.mLockType == LockType_VM)
13833 directControl = mData->mSession.mDirectControl;
13853 if (mData->mSession.mLockType == LockType_VM)
13854 directControl = mData->mSession.mDirectControl;
13877 if (mData->mSession.mLockType == LockType_VM)
13878 directControl = mData->mSession.mDirectControl;
13901 if (mData->mSession.mLockType == LockType_VM)
13902 directControl = mData->mSession.mDirectControl;
13925 if (mData->mSession.mLockType == LockType_VM)
13926 directControl = mData->mSession.mDirectControl;
13949 if (mData->mSession.mLockType == LockType_VM)
13950 directControl = mData->mSession.mDirectControl;
13973 if (mData->mSession.mLockType == LockType_VM)
13974 directControl = mData->mSession.mDirectControl;
13997 if (mData->mSession.mLockType == LockType_VM)
13998 directControl = mData->mSession.mDirectControl;
14021 if (mData->mSession.mLockType == LockType_VM)
14022 directControl = mData->mSession.mDirectControl;
14045 if (mData->mSession.mLockType == LockType_VM)
14046 directControl = mData->mSession.mDirectControl;
14112 if (mData->mSession.mLockType == LockType_VM)
14113 directControl = mData->mSession.mDirectControl;
14145 if (mData->mSession.mLockType == LockType_VM)
14146 directControl = mData->mSession.mDirectControl;
14220 AssertReturn(mData->mSession.mLockedMedia.IsEmpty(), E_FAIL);
14255 mData->mSession.mLockedMedia.Clear();
14260 HRESULT rc = mData->mSession.mLockedMedia.Insert(pAtt, pMediumLockList);
14263 mData->mSession.mLockedMedia.Clear();
14274 HRESULT rc = mData->mSession.mLockedMedia.Lock();
14300 HRESULT rc = mData->mSession.mLockedMedia.Clear();
14553 if (mData->mSession.mLockType == LockType_VM)
14554 directControl = mData->mSession.mDirectControl;
14565 if (mData->mSession.mState == SessionState_Unlocking)