VirtualBox

Changeset 98262 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jan 24, 2023 1:42:14 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155461
Message:

Main: rc() -> hrc()/vrc(). bugref:10223

Location:
trunk/src/VBox/Main/include
Files:
4 edited

Legend:

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

    r98103 r98262  
    6969 * {
    7070 *     AutoCaller autoCaller(this);
    71  *     HRESULT hrc = autoCaller.rc();
     71 *     HRESULT hrc = autoCaller.hrc();
    7272 *     if (SUCCEEDED(hrc))
    7373 *     {
     
    115115
    116116    /**
     117     * Returns the stored result code returned by ObjectState::addCaller() after
     118     * instance creation or after the last #add() call.
     119     *
     120     * A successful result code means the number of callers was successfully
     121     * increased.
     122     */
     123    HRESULT hrc() const { return mRC; }
     124
     125    /**
    117126     * Returns the stored result code returned by ObjectState::addCaller()
    118127     * after instance creation or after the last #add() call. A successful
    119128     * result code means the number of callers was successfully increased.
     129     * @deprecated use hrc()
    120130     */
    121131    HRESULT rc() const { return mRC; }
     
    230240 * {
    231241 *     AutoLimitedCaller autoCaller(this);
    232  *     HRESULT hrc = autoCaller.rc();
     242 *     HRESULT hrc = autoCaller.hrc();
    233243 *     if (SUCCEEDED(hrc))
    234244 *     {
  • trunk/src/VBox/Main/include/AutoStateDep.h

    r98103 r98262  
    4444     *  @code
    4545     *      AutoCaller autoCaller(this);
    46      *      if (FAILED(autoCaller.rc())) return autoCaller.rc();
     46     *      if (FAILED(autoCaller.hrc())) return autoCaller.hrc();
    4747     *
    4848     *      Machine::AutoStateDependency<MutableStateDep> adep(mParent);
    49      *      if (FAILED(stateDep.rc())) return stateDep.rc();
     49     *      if (FAILED(stateDep.hrc())) return stateDep.hrc();
    5050     *      ...
    5151     *      // code that depends on the particular machine state
     
    103103
    104104        /** Returns the result of Machine::addStateDependency(). */
     105        HRESULT hrc() const { return mRC; }
     106        /** Returns the result of Machine::addStateDependency().
     107         * @deprecated Use #hrc() instead.  */
    105108        HRESULT rc() const { return mRC; }
    106109
    107         /** Shortcut to SUCCEEDED(rc()). */
     110        /** Shortcut to SUCCEEDED(hrc()). */
    108111        bool isOk() const { return SUCCEEDED(mRC); }
    109112
     
    136139     *  this object is destroyed. If the machine state cannot be protected (as
    137140     *  a result of the state change currently in progress), this instance's
    138      *  #rc() method will indicate a failure, and the caller is not allowed to
     141     *  #hrc() method will indicate a failure, and the caller is not allowed to
    139142     *  rely on any particular machine state and should return the failed
    140143     *  result code to the upper level.
     
    148151     *  Succeeds only if the machine state is in one of the mutable states, and
    149152     *  guarantees the given mutable state won't change before this object is
    150      *  destroyed. If the machine is not mutable, this instance's #rc() method
     153     *  destroyed. If the machine is not mutable, this instance's #hrc() method
    151154     *  will indicate a failure, and the caller is not allowed to rely on any
    152155     *  particular machine state and should return the failed result code to
     
    167170     *  if the machine is in the Saved state, and guarantees the given mutable
    168171     *  state won't change before this object is destroyed. If the machine is
    169      *  not mutable, this instance's #rc() method will indicate a failure, and
     172     *  not mutable, this instance's #hrc() method will indicate a failure, and
    170173     *  the caller is not allowed to rely on any particular machine state and
    171174     *  should return the failed result code to the upper level.
     
    183186     *  if the machine is in the Running or Paused state, and guarantees the
    184187     *  given mutable state won't change before this object is destroyed. If
    185      *  the machine is not mutable, this instance's #rc() method will indicate
     188     *  the machine is not mutable, this instance's #hrc() method will indicate
    186189     *  a failure, and the caller is not allowed to rely on any particular
    187190     *  machine state and should return the failed result code to the upper
     
    200203     *  if the machine is in the Running, Paused or Saved state, and guarantees
    201204     *  the given mutable state won't change before this object is destroyed.
    202      *  If the machine is not mutable, this instance's #rc() method will
     205     *  If the machine is not mutable, this instance's #hrc() method will
    203206     *  indicate a failure, and the caller is not allowed to rely on any
    204207     *  particular machine state and should return the failed result code to
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r98123 r98262  
    437437            doRelease();
    438438        }
    439         /** Restores the number of callers after by #release(). #rc() must be
     439        /** Restores the number of callers after by #release(). #hrc() must be
    440440         *  rechecked to ensure the operation succeeded. */
    441441        void addYY()
     
    445445        }
    446446        /** Returns the result of Console::addVMCaller() */
     447        HRESULT hrc() const { return mRC; }
     448        /** Returns the result of Console::addVMCaller()
     449         * @deprecated Use #hrc() instead.  */
    447450        HRESULT rc() const { return mRC; }
    448         /** Shortcut to SUCCEEDED(rc()) */
     451        /** Shortcut to SUCCEEDED(hrc()) */
    449452        bool isOk() const { return SUCCEEDED(mRC); }
    450453    protected:
     
    471474     *  <code>
    472475     *      AutoVMCaller autoVMCaller(this);
    473      *      if (FAILED(autoVMCaller.rc())) return autoVMCaller.rc();
     476     *      if (FAILED(autoVMCaller.hrc())) return autoVMCaller.hrc();
    474477     *      ...
    475478     *      VMR3ReqCall (mpUVM, ...
     
    540543
    541544        /** The combined result of Console::addVMCaller() and Console::safeVMPtrRetainer */
    542         HRESULT rc() const { return Base::isOk()? mRC: Base::rc(); }
    543         /** Shortcut to SUCCEEDED(rc()) */
     545        HRESULT hrc() const { return Base::isOk() ? mRC : Base::hrc(); }
     546        /** The combined result of Console::addVMCaller() and Console::safeVMPtrRetainer
     547         * @deprecated Use hrc() instead.  */
     548        HRESULT rc() const { return Base::isOk() ? mRC : Base::hrc(); }
     549        /** Shortcut to SUCCEEDED(hrc()) */
    544550        bool isOk() const { return SUCCEEDED(mRC) && Base::isOk(); }
    545551
     
    569575     *      Console::SafeVMPtr ptrVM(mParent);
    570576     *      if (!ptrVM.isOk())
    571      *          return ptrVM.rc();
     577     *          return ptrVM.hrc();
    572578     *      ...
    573579     *      VMR3ReqCall(ptrVM.rawUVM(), ...
     
    588594     *  <code>
    589595     *      Console::SafeVMPtrQuiet pVM(mParent);
    590      *      if (pVM.rc())
     596     *      if (pVM.hrc())
    591597     *          VMR3ReqCall(pVM, ...
    592598     *      return S_OK;
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r98103 r98262  
    418418        /** Session timeout (in ms). */
    419419        uint32_t                    mTimeout;
    420         /** The last returned session status
    421          *  returned from the guest side. */
    422         int                         mRC;
     420        /** The last returned session VBox status status returned from the guest side. */
     421        int                         mVrc;
    423422        /** Object ID allocation bitmap; clear bits are free, set bits are busy. */
    424423        uint64_t                    bmObjectIds[VBOX_GUESTCTRL_MAX_OBJECTS / sizeof(uint64_t) / 8];
     
    443442            , mProtocolVersion(rThat.mProtocolVersion)
    444443            , mTimeout(rThat.mTimeout)
    445             , mRC(rThat.mRC)
     444            , mVrc(rThat.mVrc)
    446445        {
    447446            memcpy(&bmObjectIds, &rThat.bmObjectIds, sizeof(bmObjectIds));
Note: See TracChangeset for help on using the changeset viewer.

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