Changeset 77068 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 31, 2019 11:53:09 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128518
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImpl.h
r76958 r77068 36 36 #include <deque> 37 37 38 class GuestSessionTaskInternal Open; /* Needed for i_startSessionThreadTask(). */38 class GuestSessionTaskInternalStart; /* Needed for i_startSessionThreadTask(). */ 39 39 40 40 /** … … 313 313 int i_startSession(int *pGuestRc); 314 314 int i_startSessionAsync(void); 315 static void i_startSessionThreadTask(GuestSessionTaskInternalOpen*pTask);315 static int i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask); 316 316 Guest *i_getParent(void) { return mParent; } 317 317 uint32_t i_getProtocolVersion(void) { return mData.mProtocolVersion; } -
trunk/src/VBox/Main/include/GuestSessionImplTasks.h
r76562 r77068 35 35 class Guest; 36 36 class GuestSessionTask; 37 class GuestSessionTaskInternal Open;37 class GuestSessionTaskInternalStart; 38 38 39 39 -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r76958 r77068 79 79 80 80 /** 81 * Class for asynchronously opening a guest session.81 * Class for asynchronously starting a guest session. 82 82 */ 83 class GuestSessionTaskInternal Open: public GuestSessionTaskInternal83 class GuestSessionTaskInternalStart : public GuestSessionTaskInternal 84 84 { 85 85 public: 86 86 87 GuestSessionTaskInternal Open(GuestSession *pSession)87 GuestSessionTaskInternalStart(GuestSession *pSession) 88 88 : GuestSessionTaskInternal(pSession) 89 89 { … … 93 93 void handler() 94 94 { 95 GuestSession::i_startSessionThreadTask(this);95 /* Ignore rc */ GuestSession::i_startSessionThreadTask(this); 96 96 } 97 97 }; … … 1972 1972 } 1973 1973 1974 /** 1975 * Starts the guest session asynchronously in a separate thread. 1976 * 1977 * @returns IPRT status code. 1978 */ 1974 1979 int GuestSession::i_startSessionAsync(void) 1975 1980 { … … 1977 1982 1978 1983 int vrc; 1979 GuestSessionTaskInternal Open* pTask = NULL;1984 GuestSessionTaskInternalStart* pTask = NULL; 1980 1985 try 1981 1986 { 1982 pTask = new GuestSessionTaskInternal Open(this);1987 pTask = new GuestSessionTaskInternalStart(this); 1983 1988 if (!pTask->isOk()) 1984 1989 { 1985 1990 delete pTask; 1986 LogFlow(("GuestSession: Could not create GuestSessionTaskInternal Open object\n"));1991 LogFlow(("GuestSession: Could not create GuestSessionTaskInternalStart object\n")); 1987 1992 throw VERR_MEMOBJ_INIT_FAILED; 1988 1993 } 1989 1994 1990 /* Asynchronously open the session on the guest by kicking off a 1991 * worker thread. */ 1992 //this function delete pTask in case of exceptions, so there is no need in the call of delete operator 1995 /* Asynchronously open the session on the guest by kicking off a worker thread. */ 1996 /* Note: This function deletes pTask in case of exceptions, so there is no need in the call of delete operator. */ 1993 1997 HRESULT hrc = pTask->createThread(); 1994 1998 vrc = Global::vboxStatusCodeFromCOM(hrc); … … 2008 2012 } 2009 2013 2014 /** 2015 * Static function to start a guest session asynchronously. 2016 * 2017 * @returns IPRT status code. 2018 * @param pTask Task object to use for starting the guest session. 2019 */ 2010 2020 /* static */ 2011 void GuestSession::i_startSessionThreadTask(GuestSessionTaskInternalOpen*pTask)2021 int GuestSession::i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask) 2012 2022 { 2013 2023 LogFlowFunc(("pTask=%p\n", pTask)); … … 2019 2029 AutoCaller autoCaller(pSession); 2020 2030 if (FAILED(autoCaller.rc())) 2021 return ;2031 return VERR_COM_INVALID_OBJECT_STATE; 2022 2032 2023 2033 int vrc = pSession->i_startSession(NULL /* Guest rc, ignored */); 2024 /** @todo2025 *2026 * r=bird: Is it okay to ignore @a vrc here?2027 *2028 */2029 2030 2034 /* Nothing to do here anymore. */ 2031 2035 2032 2036 LogFlowFuncLeaveRC(vrc); 2033 NOREF(vrc);2037 return vrc; 2034 2038 } 2035 2039
Note:
See TracChangeset
for help on using the changeset viewer.