VirtualBox

Changeset 77068 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 31, 2019 11:53:09 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128518
Message:

Guest Control/Main: Renamed GuestSessionTaskInternalOpen() to GuestSessionTaskInternalStart() to match the rest of the terminology. Emphasize rc usage.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r76958 r77068  
    3636#include <deque>
    3737
    38 class GuestSessionTaskInternalOpen; /* Needed for i_startSessionThreadTask(). */
     38class GuestSessionTaskInternalStart; /* Needed for i_startSessionThreadTask(). */
    3939
    4040/**
     
    313313    int                     i_startSession(int *pGuestRc);
    314314    int                     i_startSessionAsync(void);
    315     static void             i_startSessionThreadTask(GuestSessionTaskInternalOpen *pTask);
     315    static int              i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask);
    316316    Guest                  *i_getParent(void) { return mParent; }
    317317    uint32_t                i_getProtocolVersion(void) { return mData.mProtocolVersion; }
  • trunk/src/VBox/Main/include/GuestSessionImplTasks.h

    r76562 r77068  
    3535class Guest;
    3636class GuestSessionTask;
    37 class GuestSessionTaskInternalOpen;
     37class GuestSessionTaskInternalStart;
    3838
    3939
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r76958 r77068  
    7979
    8080/**
    81  * Class for asynchronously opening a guest session.
     81 * Class for asynchronously starting a guest session.
    8282 */
    83 class GuestSessionTaskInternalOpen : public GuestSessionTaskInternal
     83class GuestSessionTaskInternalStart : public GuestSessionTaskInternal
    8484{
    8585public:
    8686
    87     GuestSessionTaskInternalOpen(GuestSession *pSession)
     87    GuestSessionTaskInternalStart(GuestSession *pSession)
    8888        : GuestSessionTaskInternal(pSession)
    8989    {
     
    9393    void handler()
    9494    {
    95         GuestSession::i_startSessionThreadTask(this);
     95        /* Ignore rc */ GuestSession::i_startSessionThreadTask(this);
    9696    }
    9797};
     
    19721972}
    19731973
     1974/**
     1975 * Starts the guest session asynchronously in a separate thread.
     1976 *
     1977 * @returns IPRT status code.
     1978 */
    19741979int GuestSession::i_startSessionAsync(void)
    19751980{
     
    19771982
    19781983    int vrc;
    1979     GuestSessionTaskInternalOpen* pTask = NULL;
     1984    GuestSessionTaskInternalStart* pTask = NULL;
    19801985    try
    19811986    {
    1982         pTask = new GuestSessionTaskInternalOpen(this);
     1987        pTask = new GuestSessionTaskInternalStart(this);
    19831988        if (!pTask->isOk())
    19841989        {
    19851990            delete pTask;
    1986             LogFlow(("GuestSession: Could not create GuestSessionTaskInternalOpen object \n"));
     1991            LogFlow(("GuestSession: Could not create GuestSessionTaskInternalStart object\n"));
    19871992            throw VERR_MEMOBJ_INIT_FAILED;
    19881993        }
    19891994
    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. */
    19931997        HRESULT hrc = pTask->createThread();
    19941998        vrc = Global::vboxStatusCodeFromCOM(hrc);
     
    20082012}
    20092013
     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 */
    20102020/* static */
    2011 void GuestSession::i_startSessionThreadTask(GuestSessionTaskInternalOpen *pTask)
     2021int GuestSession::i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask)
    20122022{
    20132023    LogFlowFunc(("pTask=%p\n", pTask));
     
    20192029    AutoCaller autoCaller(pSession);
    20202030    if (FAILED(autoCaller.rc()))
    2021         return;
     2031        return VERR_COM_INVALID_OBJECT_STATE;
    20222032
    20232033    int vrc = pSession->i_startSession(NULL /* Guest rc, ignored */);
    2024 /** @todo
    2025  *
    2026  * r=bird: Is it okay to ignore @a vrc here?
    2027  *
    2028  */
    2029 
    20302034    /* Nothing to do here anymore. */
    20312035
    20322036    LogFlowFuncLeaveRC(vrc);
    2033     NOREF(vrc);
     2037    return vrc;
    20342038}
    20352039
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette