VirtualBox

Ignore:
Timestamp:
Aug 17, 2018 5:56:34 PM (6 years ago)
Author:
vboxsync
Message:

Main/Progress+Appliance+Machine: Turn IProgress::waitForAsyncProgressCompletion into an internal method. It is not needed by any client code outside the API, it's simply is too special. Also include the error propagation which it originally skipped (leding to reduntant code in the calling code). Remove a replicated version of it from the Appliance code which seems to be the half-forgotten ancestor of the method in IProgress. Adapt the users of the method to the new internal method, which made the code easier to read.

File:
1 edited

Legend:

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

    r69500 r73743  
    138138    HRESULT i_notifyCompleteEI(HRESULT aResultCode,
    139139                               const ComPtr<IVirtualBoxErrorInfo> &aErrorInfo);
     140    /**
     141     * Waits until the other task is completed (including all sub-operations)
     142     * and forward all changes from the other progress to this progress. This
     143     * means sub-operation number, description, percent and so on.
     144     *
     145     * The caller is responsible for having at least the same count of
     146     * sub-operations in this progress object as there are in the other
     147     * progress object.
     148     *
     149     * If the other progress object supports cancel and this object gets any
     150     * cancel request (when here enabled as well), it will be forwarded to
     151     * the other progress object.
     152     *
     153     * Error information is automatically preserved (by transferring it to
     154     * the current thread's error information). If the caller wants to set it
     155     * as the completion state of this progress it needs to be done separately.
     156     *
     157     * @param   aProgressOther  Progress object from which the state is
     158     *                  forwarded until it is signalling completion.
     159     * @return COM error status, also reflecting the failed completion.
     160     */
     161    HRESULT i_waitForOtherProgressCompletion(const ComPtr<IProgress> &aProgressOther);
    140162
    141163    bool i_notifyPointOfNoReturn(void);
     
    213235    HRESULT waitForOperationCompletion(ULONG aOperation,
    214236                                       LONG aTimeout);
    215     HRESULT waitForAsyncProgressCompletion(const ComPtr<IProgress> &aPProgressAsync);
    216237    HRESULT cancel();
    217238
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