Changeset 98263 in vbox
- Timestamp:
- Jan 24, 2023 1:52:49 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155463
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AutoCaller.h
r98262 r98263 54 54 * destroyed). 55 55 * 56 * If # rc() returns a failure after the instance creation, it means that56 * If #hrc() returns a failure after the instance creation, it means that 57 57 * the managed VirtualBoxBase object is not Ready, or in any other invalid 58 58 * state, so that the caller must not use the object and can return this … … 97 97 * @param aObj Object to add a normal caller to. If NULL, this 98 98 * instance is effectively turned to no-op (where 99 * rc() will return S_OK).99 * hrc() will return S_OK). 100 100 */ 101 101 AutoCaller(VirtualBoxBase *aObj) … … 124 124 125 125 /** 126 * Returns the stored result code returned by ObjectState::addCaller() 127 * after instance creation or after the last #add() call. A successful 128 * result code means the number of callers was successfully increased. 129 * @deprecated use hrc() 130 */ 131 HRESULT rc() const { return mRC; } 132 133 /** 134 * Returns |true| if |SUCCEEDED(rc())| is |true|, for convenience. 135 * |true| means the number of callers was successfully increased. 126 * Returns |true| if |SUCCEEDED(hrc())| is |true|, for convenience. |true| means 127 * the number of callers was successfully increased. 136 128 */ 137 129 bool isOk() const { return SUCCEEDED(mRC); } 138 130 139 131 /** 140 * Returns |true| if |FAILED( rc())| is |true|, for convenience.141 * |true| meansthe number of callers was _not_ successfully increased.132 * Returns |true| if |FAILED(hrc())| is |true|, for convenience. |true| means 133 * the number of callers was _not_ successfully increased. 142 134 */ 143 135 bool isNotOk() const { return FAILED(mRC); } … … 145 137 /** 146 138 * Temporarily decreases the number of callers of the managed object. 147 * May only be called if #isOk() returns |true|. Note that # rc() will148 * returnE_FAIL after this method succeeds.139 * May only be called if #isOk() returns |true|. Note that #hrc() will return 140 * E_FAIL after this method succeeds. 149 141 */ 150 142 void release() … … 204 196 * 205 197 * @param aObj Object to add a caller to. If NULL, this 206 * instance is effectively turned to no-op (where 207 * r c() will return S_OK).198 * instance is effectively turned to no-op (where hrc() will 199 * return S_OK). 208 200 * @param aLimited If |false|, then it's a regular caller, otherwise a 209 201 * limited caller. … … 268 260 * 269 261 * @param aObj Object to add a limited caller to. If NULL, this 270 * instance is effectively turned to no-op (where 271 * r c() will return S_OK).262 * instance is effectively turned to no-op (where hrc() will 263 * return S_OK). 272 264 */ 273 265 AutoLimitedCaller(VirtualBoxBase *aObj) -
trunk/src/VBox/Main/include/AutoStateDep.h
r98262 r98263 84 84 85 85 /** Decreases the number of dependencies before the instance is 86 * destroyed. Note that will reset # rc() to E_FAIL. */86 * destroyed. Note that will reset #hrc() to E_FAIL. */ 87 87 void release() 88 88 { … … 92 92 } 93 93 94 /** Restores the number of callers after by #release(). # rc() will be94 /** Restores the number of callers after by #release(). #hrc() will be 95 95 * reset to the result of calling addStateDependency() and must be 96 96 * rechecked to ensure the operation succeeded. */ … … 104 104 /** Returns the result of Machine::addStateDependency(). */ 105 105 HRESULT hrc() const { return mRC; } 106 /** Returns the result of Machine::addStateDependency().107 * @deprecated Use #hrc() instead. */108 HRESULT rc() const { return mRC; }109 106 110 107 /** Shortcut to SUCCEEDED(hrc()). */ -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r98262 r98263 212 212 213 213 HRESULT hrc() const { return mRC; } 214 HRESULT rc() const { return mRC; }215 214 bool isOk() const { return SUCCEEDED(hrc()); } 216 215 … … 6255 6254 /* The VM may be no more operational when this message arrives 6256 6255 * (e.g. it may be Saving or Stopping or just PoweredOff). Use 6257 * AutoVMCaller to detect it -- AutoVMCaller:: rc() will return a6256 * AutoVMCaller to detect it -- AutoVMCaller::hrc() will return a 6258 6257 * failure in this case. */ 6259 6258 -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r98262 r98263 348 348 349 349 HRESULT hrc() const { return mRC; } 350 HRESULT rc() const { return mRC; }351 350 bool isOk() const { return SUCCEEDED(hrc()); } 352 351 bool NotifyAboutChanges() const { return mNotifyAboutChanges; }
Note:
See TracChangeset
for help on using the changeset viewer.