VirtualBox

Changeset 29932 in vbox


Ignore:
Timestamp:
Jun 1, 2010 1:40:07 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62200
Message:

Main: Rewrote ProgressProxyImpl.cpp to proxy at the most one progress object and skip the final operation of the proxy object that wasn't really needed in the openRemoteSession case. Operations are proxied as well so that the openRemoteSession user can wait for the teleporter to become operational by waiting for the 3rd last operation to complete in a loop(!).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r29864 r29932  
    98419841
    98429842    if (!mData->mSession.mProgress.isNull())
    9843         mData->mSession.mProgress->setOtherProgressObject(aProgress, 7);
     9843        mData->mSession.mProgress->setOtherProgressObject(aProgress);
    98449844
    98459845    return S_OK;
     
    98639863    if (mData->mSession.mProgress)
    98649864    {
    9865         mData->mSession.mProgress->clearOtherProgressObject(tr("Finalizing"), 1);
    98669865        mData->mSession.mProgress->notifyComplete((HRESULT)iResult);
    98679866        mData->mSession.mProgress.setNull();
  • trunk/src/VBox/Main/ProgressProxyImpl.cpp

    r29859 r29932  
    4646HRESULT ProgressProxy::FinalConstruct()
    4747{
    48     mcOtherProgressObjects = 1;
    49     miCurOtherProgressObject = 0;
     48    mfMultiOperation = false;
     49    muOtherProgressStartWeight = 0;
     50    muOtherProgressWeight = 0;
     51    muOtherProgressStartOperation = 0;
    5052
    5153    HRESULT rc = Progress::FinalConstruct();
     
    6668                            BOOL fCancelable)
    6769{
    68     miCurOtherProgressObject = 0;
    69     mcOtherProgressObjects = 0;
     70    mfMultiOperation = false;
     71    muOtherProgressStartWeight = 1;
     72    muOtherProgressWeight = 1;
     73    muOtherProgressStartOperation = 1;
    7074
    7175    return Progress::init(
     
    8488
    8589/**
    86  * Initialize for proxying one or more other objects, assuming we start out and
    87  * end without proxying anyone.
    88  *
    89  * The user must call clearOtherProgressObject when there are no more progress
    90  * objects to be proxied or we'll leave threads waiting forever.
     90 * Initialize for proxying one other progress object.
     91 *
     92 * This is tailored explicitly for the openRemoteSession code, so we start out
     93 * with one operation where we don't have any remote object (powerUp).  Then a
     94 * remote object is added and stays with us till the end.
     95 *
     96 * The user must do normal completion notification or risk leave the threads
     97 * waiting forever!
    9198 */
    9299HRESULT ProgressProxy::init(
     
    97104                            CBSTR bstrDescription,
    98105                            BOOL fCancelable,
    99                             ULONG cOtherProgressObjects,
    100106                            ULONG uTotalOperationsWeight,
    101107                            CBSTR bstrFirstOperationDescription,
    102108                            ULONG uFirstOperationWeight,
    103                             OUT_GUID pId)
    104 {
    105     miCurOtherProgressObject = 0;
    106     mcOtherProgressObjects = cOtherProgressObjects;
     109                            ULONG cOtherProgressObjectOperations)
     110{
     111    mfMultiOperation = false;
     112    muOtherProgressStartWeight    = uFirstOperationWeight;
     113    muOtherProgressWeight         = uTotalOperationsWeight - uFirstOperationWeight;
     114    muOtherProgressStartOperation = 1;
    107115
    108116    return Progress::init(
     
    113121                          bstrDescription,
    114122                          fCancelable,
    115                           1 + cOtherProgressObjects + 1 /* cOperations */,
     123                          1 + cOtherProgressObjectOperations /* cOperations */,
    116124                          uTotalOperationsWeight,
    117125                          bstrFirstOperationDescription,
    118126                          uFirstOperationWeight,
    119                           pId);
     127                          NULL);
    120128}
    121129
     
    123131{
    124132    uninit();
    125     miCurOtherProgressObject = 0;
     133    mfMultiOperation = false;
     134    muOtherProgressStartWeight    = 0;
     135    muOtherProgressWeight         = 0;
     136    muOtherProgressStartOperation = 0;
    126137}
    127138
     
    175186/** Just a wrapper so we can automatically do the handover before setting
    176187 *  the result locally. */
    177 bool    ProgressProxy::notifyPointOfNoReturn(void)
     188bool ProgressProxy::notifyPointOfNoReturn(void)
    178189{
    179190    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     
    188199 * @returns false if failed/canceled, true if not.
    189200 * @param   pOtherProgress      The other progress object. Must not be NULL.
    190  * @param   uOperationWeight    The weight of this operation.  (The description
    191  *                              is taken from the other progress object.)
    192201 */
    193 bool ProgressProxy::setOtherProgressObject(IProgress *pOtherProgress, ULONG uOperationWeight)
    194 {
    195     LogFlowThisFunc(("setOtherProgressObject: %p %u\n", pOtherProgress, uOperationWeight));
     202bool ProgressProxy::setOtherProgressObject(IProgress *pOtherProgress)
     203{
     204    LogFlowThisFunc(("setOtherProgressObject: %p\n", pOtherProgress));
    196205    ComPtr<IProgress> ptrOtherProgress = pOtherProgress;
    197206
    198     /* Get the description first. */
    199     Bstr    bstrOperationDescription;
    200     HRESULT hrc = pOtherProgress->COMGETTER(Description)(bstrOperationDescription.asOutParam());
     207    /*
     208     * Query information from the other progress object before we grab the
     209     * lock.
     210     */
     211    ULONG cOperations;
     212    HRESULT hrc = pOtherProgress->COMGETTER(OperationCount)(&cOperations);
     213    if (FAILED(hrc))
     214        cOperations = 1;
     215
     216    Bstr bstrOperationDescription;
     217    hrc = pOtherProgress->COMGETTER(Description)(bstrOperationDescription.asOutParam());
    201218    if (FAILED(hrc))
    202219        bstrOperationDescription = "oops";
    203220
     221
     222    /*
     223     * Take the lock and check for cancelation, cancel the other object if
     224     * we've been canceled already.
     225     */
    204226    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    205227
    206     /* Do the hand over from any previous progress object. */
    207     clearOtherProgressObjectInternal(false /*fEarly*/);
    208228    BOOL fCompletedOrCanceled = mCompleted || mCanceled;
    209229    if (!fCompletedOrCanceled)
    210230    {
    211         /* Advance to the next object and operation, checking for cancelation
    212            and completion right away to be on the safe side. */
    213         Assert(miCurOtherProgressObject < mcOtherProgressObjects);
     231        /*
     232         * Advance to the next object and operation. If the other object has
     233         * more operations than anticipated, adjust our internal count.
     234         */
    214235        mptrOtherProgress = ptrOtherProgress;
    215 
    216         Progress::SetNextOperation(bstrOperationDescription, uOperationWeight);
    217 
     236        mfMultiOperation  = cOperations > 1;
     237
     238        muOtherProgressStartWeight = m_ulOperationsCompletedWeight + m_ulCurrentOperationWeight;
     239        muOtherProgressWeight      = m_ulTotalOperationsWeight - muOtherProgressStartWeight;
     240        Progress::SetNextOperation(bstrOperationDescription, muOtherProgressWeight);
     241
     242        muOtherProgressStartOperation = m_ulCurrentOperation;
     243        m_cOperations = cOperations + m_ulCurrentOperation;
     244
     245        /*
     246         * Check for cancelation and completion.
     247         */
    218248        BOOL f;
    219249        hrc = ptrOtherProgress->COMGETTER(Completed)(&f);
     
    233263        else
    234264        {
    235             /* Mirror the cancelable property. */
     265            /*
     266             * Finally, mirror the cancelable property.
     267             * Note! Note necessary if we do passthru!
     268             */
    236269            if (mCancelable)
    237270            {
     
    257290}
    258291
    259 /**
    260  * Clears the last other progress objects.
    261  *
    262  * @returns false if failed/canceled, true if not.
    263  * @param   pszLastOperationDescription     The description of the final bit.
    264  * @param   uLastOperationWeight            The weight of the final bit.
    265  */
    266 bool ProgressProxy::clearOtherProgressObject(const char *pszLastOperationDescription, ULONG uLastOperationWeight)
    267 {
    268     LogFlowThisFunc(("%p %u\n", pszLastOperationDescription, uLastOperationWeight));
    269     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    270 
    271     clearOtherProgressObjectInternal(false /* fEarly */);
    272 
    273     /* Advance to the next operation if applicable. */
    274     bool fCompletedOrCanceled = mCompleted || mCanceled;
    275     if (!fCompletedOrCanceled)
    276         Progress::SetNextOperation(Bstr(pszLastOperationDescription), uLastOperationWeight);
    277 
    278     LogFlowThisFunc(("Returns %RTbool\n", !fCompletedOrCanceled));
    279     return !fCompletedOrCanceled;
    280 }
    281 
    282292// Internal methods.
    283293////////////////////////////////////////////////////////////////////////////////
     
    285295
    286296/**
    287  * Internal version of clearOtherProgressObject that doesn't advance to the next
    288  * operation.
    289  *
    290  * This is used both by clearOtherProgressObject as well as a number of places
    291  * where we automatically do the hand over because of failure/completion.
     297 * Clear the other progress object reference, first copying over its state.
     298 *
     299 * This is used internally when completion is signalled one way or another.
    292300 *
    293301 * @param   fEarly          Early clearing or not.
     
    295303void ProgressProxy::clearOtherProgressObjectInternal(bool fEarly)
    296304{
    297     if (!mptrOtherProgress.isNull())
     305    if (mptrOtherProgress.isNotNull())
    298306    {
    299307        ComPtr<IProgress> ptrOtherProgress = mptrOtherProgress;
    300308        mptrOtherProgress.setNull();
    301309        copyProgressInfo(ptrOtherProgress, fEarly);
    302 
    303         miCurOtherProgressObject++;
    304         Assert(miCurOtherProgressObject <= mcOtherProgressObjects);
    305310    }
    306311}
     
    413418////////////////////////////////////////////////////////////////////////////////
    414419
     420STDMETHODIMP ProgressProxy::COMGETTER(Cancelable)(BOOL *aCancelable)
     421{
     422    CheckComArgOutPointerValid(aCancelable);
     423
     424    AutoCaller autoCaller(this);
     425    HRESULT hrc = autoCaller.rc();
     426    if (SUCCEEDED(hrc))
     427    {
     428        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     429
     430        /* ASSUME: The cancelable property can only change to FALSE. */
     431        if (!mCancelable || mptrOtherProgress.isNull())
     432            *aCancelable = mCancelable;
     433        else
     434        {
     435            hrc = mptrOtherProgress->COMGETTER(Cancelable)(aCancelable);
     436            if (SUCCEEDED(hrc) && !*aCancelable)
     437            {
     438                LogFlowThisFunc(("point-of-no-return reached\n"));
     439                mCancelable = FALSE;
     440            }
     441        }
     442    }
     443    return hrc;
     444}
     445
    415446STDMETHODIMP ProgressProxy::COMGETTER(Percent)(ULONG *aPercent)
    416447{
    417 #if 0
    418448    CheckComArgOutPointerValid(aPercent);
    419449
    420450    AutoCaller autoCaller(this);
    421451    HRESULT hrc = autoCaller.rc();
    422     if (SUCCEEDED(rc))
    423     {
    424         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    425 
    426         if (mptrOtherProgress.isNull())
     452    if (SUCCEEDED(hrc))
     453    {
     454        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     455
     456        if (mptrOtherProgress.isNotNull())
    427457            hrc = Progress::COMGETTER(Percent)(aPercent);
    428458        else
    429459        {
     460            /*
     461             * Get the overall percent of the other object and adjust it with
     462             * the weighting given to the period before proxying started.
     463             */
    430464            ULONG uPct;
    431465            hrc = mptrOtherProgress->COMGETTER(Percent)(&uPct);
    432             ....
    433         }
    434     }
    435     return hrc;
    436 #else
    437     return Progress::COMGETTER(Percent)(aPercent);
    438 #endif
     466            if (SUCCEEDED(hrc))
     467            {
     468                double rdPercent = ((double)uPct / 100 * muOtherProgressWeight + muOtherProgressStartWeight)
     469                                 / m_ulTotalOperationsWeight * 100;
     470                *aPercent = RT_MIN((ULONG)rdPercent, 99); /* mptrOtherProgress is cleared when its completed, so we can never return 100%. */
     471            }
     472        }
     473    }
     474    return hrc;
     475}
     476
     477STDMETHODIMP ProgressProxy::COMGETTER(TimeRemaining)(LONG *aTimeRemaining)
     478{
     479    CheckComArgOutPointerValid(aTimeRemaining);
     480
     481    AutoCaller autoCaller(this);
     482    HRESULT hrc = autoCaller.rc();
     483    if (SUCCEEDED(hrc))
     484    {
     485        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     486
     487        if (mptrOtherProgress.isNotNull())
     488            hrc = Progress::COMGETTER(TimeRemaining)(aTimeRemaining);
     489        else
     490            hrc = mptrOtherProgress->COMGETTER(TimeRemaining)(aTimeRemaining);
     491    }
     492    return hrc;
    439493}
    440494
    441495STDMETHODIMP ProgressProxy::COMGETTER(Completed)(BOOL *aCompleted)
    442496{
    443     /* Not proxied since we EXPECT a hand back call. */
     497    /* Not proxied since we EXPECT a normal completion notification call. */
    444498    return Progress::COMGETTER(Completed)(aCompleted);
    445499}
     
    458512        if (   SUCCEEDED(hrc)
    459513            && !*aCanceled
    460             && !mptrOtherProgress.isNull())
     514            && mptrOtherProgress.isNotNull()
     515            && mCancelable)
    461516        {
    462517            hrc = mptrOtherProgress->COMGETTER(Canceled)(aCanceled);
    463518            if (SUCCEEDED(hrc) && *aCanceled)
    464                 clearOtherProgressObjectInternal(true /*fEarly*/);
     519                /* This will not complete the object, only mark it as canceled. */
     520                clearOtherProgressObjectInternal(false /*fEarly*/);
    465521        }
    466522    }
     
    470526STDMETHODIMP ProgressProxy::COMGETTER(ResultCode)(LONG *aResultCode)
    471527{
    472     /* Not proxied yet since we EXPECT a hand back call. */
     528    /* Not proxied since we EXPECT a normal completion notification call. */
    473529    return Progress::COMGETTER(ResultCode)(aResultCode);
    474530}
     
    476532STDMETHODIMP ProgressProxy::COMGETTER(ErrorInfo)(IVirtualBoxErrorInfo **aErrorInfo)
    477533{
    478     /* Not proxied yet since we EXPECT a hand back call. */
     534    /* Not proxied since we EXPECT a normal completion notification call. */
    479535    return Progress::COMGETTER(ErrorInfo)(aErrorInfo);
    480536}
    481537
     538STDMETHODIMP ProgressProxy::COMGETTER(Operation)(ULONG *aOperation)
     539{
     540    CheckComArgOutPointerValid(aOperation);
     541
     542    AutoCaller autoCaller(this);
     543    HRESULT hrc = autoCaller.rc();
     544    if (SUCCEEDED(hrc))
     545    {
     546        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     547        if (mptrOtherProgress.isNull())
     548            hrc =  Progress::COMGETTER(Operation)(aOperation);
     549        else
     550        {
     551            ULONG uCurOtherOperation;
     552            hrc = mptrOtherProgress->COMGETTER(Operation)(&uCurOtherOperation);
     553            if (SUCCEEDED(hrc))
     554                *aOperation = uCurOtherOperation + muOtherProgressStartOperation;
     555        }
     556    }
     557    return hrc;
     558}
     559
     560STDMETHODIMP ProgressProxy::COMGETTER(OperationDescription)(BSTR *aOperationDescription)
     561{
     562    CheckComArgOutPointerValid(aOperationDescription);
     563
     564    AutoCaller autoCaller(this);
     565    HRESULT hrc = autoCaller.rc();
     566    if (SUCCEEDED(hrc))
     567    {
     568        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     569        if (mptrOtherProgress.isNull() || !mfMultiOperation)
     570            hrc = Progress::COMGETTER(OperationDescription)(aOperationDescription);
     571        else
     572            hrc = mptrOtherProgress->COMGETTER(OperationDescription)(aOperationDescription);
     573    }
     574    return hrc;
     575}
     576
    482577STDMETHODIMP ProgressProxy::COMGETTER(OperationPercent)(ULONG *aOperationPercent)
    483578{
    484     /* Not proxied, should be proxied later on. */
    485     return Progress::COMGETTER(OperationPercent)(aOperationPercent);
     579    CheckComArgOutPointerValid(aOperationPercent);
     580
     581    AutoCaller autoCaller(this);
     582    HRESULT hrc = autoCaller.rc();
     583    if (SUCCEEDED(hrc))
     584    {
     585        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     586        if (mptrOtherProgress.isNull() || !mfMultiOperation)
     587            hrc = Progress::COMGETTER(OperationPercent)(aOperationPercent);
     588        else
     589            hrc = mptrOtherProgress->COMGETTER(OperationPercent)(aOperationPercent);
     590    }
     591    return hrc;
    486592}
    487593
     
    512618    LogFlowThisFunc(("aTimeout=%d\n", aTimeout));
    513619
    514     /* For now we'll always block locally. */
     620    /* No need to wait on the proxied object for these since we'll get the
     621       normal completion notifications. */
    515622    hrc = Progress::WaitForCompletion(aTimeout);
    516623
     
    521628STDMETHODIMP ProgressProxy::WaitForOperationCompletion(ULONG aOperation, LONG aTimeout)
    522629{
    523     HRESULT hrc;
    524630    LogFlowThisFuncEnter();
    525631    LogFlowThisFunc(("aOperation=%d aTimeout=%d\n", aOperation, aTimeout));
    526632
    527     /* For now we'll always block locally. Later though, we could consider
    528        blocking remotely when we can. */
    529     hrc = Progress::WaitForOperationCompletion(aOperation, aTimeout);
     633    AutoCaller autoCaller(this);
     634    HRESULT hrc = autoCaller.rc();
     635    if (SUCCEEDED(hrc))
     636    {
     637        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     638
     639        CheckComArgExpr(aOperation, aOperation < m_cOperations);
     640
     641        /*
     642         * Check if we can wait locally.
     643         */
     644        if (   aOperation + 1 == m_cOperations /* final operation */
     645            || mptrOtherProgress.isNull())
     646        {
     647            /* ASSUMES that Progress::WaitForOperationCompletion is using
     648               AutoWriteLock::leave() as it saves us from duplicating the code! */
     649            hrc = Progress::WaitForOperationCompletion(aOperation, aTimeout);
     650        }
     651        else
     652        {
     653            LogFlowThisFunc(("calling the other object...\n"));
     654            ComPtr<IProgress> ptrOtherProgress = mptrOtherProgress;
     655            alock.release();
     656
     657            hrc = ptrOtherProgress->WaitForOperationCompletion(aOperation, aTimeout);
     658        }
     659    }
    530660
    531661    LogFlowThisFuncLeave();
     
    541671    {
    542672        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    543         if (mCancelable)
    544         {
    545             if (!mptrOtherProgress.isNull())
    546             {
    547                 hrc = mptrOtherProgress->Cancel();
    548                 if (SUCCEEDED(hrc))
    549                 {
    550                     if (m_pfnCancelCallback)
    551                         m_pfnCancelCallback(m_pvCancelUserArg);
    552                     clearOtherProgressObjectInternal(true /*fEarly*/);
    553                 }
    554             }
    555             else
    556                 hrc = Progress::Cancel();
    557         }
    558         else
    559             hrc = setError(E_FAIL, tr("Operation cannot be canceled"));
     673        if (mptrOtherProgress.isNull() || !mCancelable)
     674            hrc = Progress::Cancel();
     675        else
     676        {
     677            hrc = mptrOtherProgress->Cancel();
     678            if (SUCCEEDED(hrc))
     679                clearOtherProgressObjectInternal(false /*fEarly*/);
     680        }
    560681    }
    561682
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r29874 r29932  
    19951995                    E_INVALIDARG);
    19961996
     1997    /* get the teleporter enable state for the progress object init. */
     1998    BOOL fTeleporterEnabled;
     1999    rc = machine->COMGETTER(TeleporterEnabled)(&fTeleporterEnabled);
     2000    if (FAILED(rc))
     2001        return rc;
     2002
    19972003    /* create a progress object */
    19982004    ComObjPtr<ProgressProxy> progress;
    19992005    progress.createObject();
    20002006    rc = progress->init(this,
    2001                         static_cast <IMachine *>(machine),
     2007                        static_cast<IMachine *>(machine),
    20022008                        Bstr(tr("Spawning session")),
    20032009                        TRUE /* aCancelable */,
    2004                         1 /* cOtherProgressObjects */,
    2005                         10 /* uTotalOperationsWeight */,
     2010                        fTeleporterEnabled ? 20 : 10 /* uTotalOperationsWeight */,
    20062011                        Bstr(tr("Spawning session")),
    2007                         3 /* uFirstOperationWeight */,
    2008                         NULL /* pId */);
     2012                        2 /* uFirstOperationWeight */,
     2013                        fTeleporterEnabled ? 3 : 1 /* cOtherProgressObjectOperations */);
    20092014    if (SUCCEEDED(rc))
    20102015    {
     
    45214526        ComPtr<IVirtualBoxCallback> cbI;
    45224527        ComPtr<IDispatch> cbD;
    4523    
     4528
    45244529        cbI = sp;
    45254530        cbD = sp;
    45264531
    45274532        /**
    4528          * Would be like this in ideal world, unfortunately our consumers want to be invoked via IDispatch, 
     4533         * Would be like this in ideal world, unfortunately our consumers want to be invoked via IDispatch,
    45294534         * thus going the hard way.
    45304535         */
    4531 #if 0   
     4536#if 0
    45324537        if (cbI != NULL)
    4533         {   
     4538        {
    45344539            HRESULT hrc = handleCallback(cbI);
    45354540            if (hrc == VBOX_E_DONT_CALL_AGAIN)
     
    45444549
    45454550             ::VariantClear(&varResult);
    4546              ::VariantClear(&arg1); 
     4551             ::VariantClear(&arg1);
    45474552             ::VariantClear(&arg2);
    4548              
     4553
    45494554             VARIANTARG args[] = {arg1, arg2};
    45504555             DISPPARAMS disp = { args, NULL, sizeof(args)/sizeof(args[0]), 0};
    45514556
    45524557             cbD->Invoke(dispid, IID_NULL,
    4553                          LOCALE_USER_DEFAULT, 
    4554                          DISPATCH_METHOD, 
    4555                          &disp, &varResult, 
     4558                         LOCALE_USER_DEFAULT,
     4559                         DISPATCH_METHOD,
     4560                         &disp, &varResult,
    45564561                         NULL, NULL);
    45574562        }
  • trunk/src/VBox/Main/include/ProgressProxyImpl.h

    r29862 r29932  
    5959                 CBSTR bstrDescription,
    6060                 BOOL fCancelable,
    61                  ULONG cOtherProgressObjects,
    6261                 ULONG uTotalOperationsWeight,
    6362                 CBSTR bstrFirstOperationDescription,
    6463                 ULONG uFirstOperationWeight,
    65                  OUT_GUID pId = NULL);
     64                 ULONG cOtherProgressObjectOperations);
    6665    void    uninit();
    6766
    6867    // IProgress properties
     68    STDMETHOD(COMGETTER(Cancelable))(BOOL *aCancelable);
    6969    STDMETHOD(COMGETTER(Percent))(ULONG *aPercent);
     70    STDMETHOD(COMGETTER(TimeRemaining))(LONG *aTimeRemaining);
    7071    STDMETHOD(COMGETTER(Completed))(BOOL *aCompleted);
    7172    STDMETHOD(COMGETTER(Canceled))(BOOL *aCanceled);
    7273    STDMETHOD(COMGETTER(ResultCode))(LONG *aResultCode);
    7374    STDMETHOD(COMGETTER(ErrorInfo))(IVirtualBoxErrorInfo **aErrorInfo);
     75    //STDMETHOD(COMGETTER(OperationCount))(ULONG *aOperationCount); - not necessary
     76    STDMETHOD(COMGETTER(Operation))(ULONG *aOperation);
     77    STDMETHOD(COMGETTER(OperationDescription))(BSTR *aOperationDescription);
    7478    STDMETHOD(COMGETTER(OperationPercent))(ULONG *aOperationPercent);
    7579    STDMETHOD(COMSETTER(Timeout))(ULONG aTimeout);
     
    9296                           const char *aText, ...);
    9397    bool    notifyPointOfNoReturn(void);
    94     bool    setOtherProgressObject(IProgress *pOtherProgress, ULONG uOperationWeight);
    95     bool    clearOtherProgressObject(const char *pszLastOperationDescription, ULONG uLastOperationWeight);
     98    bool    setOtherProgressObject(IProgress *pOtherProgress);
    9699
    97100    /** For com::SupportErrorInfoImpl. */
     
    105108    /** The other progress object.  This can be NULL. */
    106109    ComPtr<IProgress> mptrOtherProgress;
    107     /** The number of other progress objects expected. */
    108     ULONG mcOtherProgressObjects;
    109     /** The current other progress object. */
    110     ULONG miCurOtherProgressObject;
     110    /** Set if the other progress object has multiple operations. */
     111    bool mfMultiOperation;
     112    /** The weight the other progress object started at. */
     113    ULONG muOtherProgressStartWeight;
     114    /** The weight of other progress object. */
     115    ULONG muOtherProgressWeight;
     116    /** The operation number the other progress object started at. */
     117    ULONG muOtherProgressStartOperation;
    111118
    112119};
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