Changeset 18269 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 25, 2009 6:01:07 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 45017
- Location:
- trunk/src/VBox/Main
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r18263 r18269 210 210 211 211 list<Utf8Str> llWarnings; 212 213 ULONG ulWeightPerOperation; // for progress calculations 212 214 }; 213 215 … … 1394 1396 strNetwork, // orig 1395 1397 Utf8StrFmt("%RI32", (uint32_t)nwAdapterVBox), // conf 1398 0, 1396 1399 Utf8StrFmt("type=%s", strNetwork.c_str())); // extra conf 1397 1400 } … … 1552 1555 di.strHref, 1553 1556 strPath, 1557 (uint32_t)(di.iPopulatedSize / _1M), 1554 1558 strExtraConfig); 1555 1559 } … … 1619 1623 try 1620 1624 { 1621 uint32_t opCount = calcMaxProgress();1622 1625 Bstr progressDesc = BstrFmt(tr("Import appliance '%s'"), 1623 1626 m->strPath.raw()); 1624 /* Create the progress object */ 1625 progress.createObject(); 1626 rc = progress->init(mVirtualBox, static_cast<IAppliance*>(this), 1627 progressDesc, 1628 FALSE /* aCancelable */, 1629 opCount, 1630 progressDesc); 1627 rc = setUpProgress(progress, progressDesc); 1631 1628 if (FAILED(rc)) throw rc; 1632 1629 … … 1715 1712 { 1716 1713 if (!task->progress.isNull()) 1717 task->progress->advanceOperation(BstrFmt(tr("Importing Virtual System %d"), i + 1)); 1714 task->progress->setNextOperation(BstrFmt(tr("Importing virtual system %d"), i + 1), 1715 pAppliance->m->ulWeightPerOperation); 1718 1716 1719 1717 /* How many sub notifications are necessary? */ … … 1756 1754 1757 1755 if (!task->progress.isNull()) 1758 rc = task->progress-> notifyProgress((uint32_t)(opCountMax * opCount++));1756 rc = task->progress->setCurrentOperationProgress((uint32_t)(opCountMax * opCount++)); 1759 1757 1760 1758 /* CPU count (ignored for now) */ … … 1780 1778 1781 1779 if (!task->progress.isNull()) 1782 task->progress-> notifyProgress((uint32_t)(opCountMax * opCount++));1780 task->progress->setCurrentOperationProgress((uint32_t)(opCountMax * opCount++)); 1783 1781 1784 1782 /* Audio Adapter */ … … 1816 1814 1817 1815 if (!task->progress.isNull()) 1818 task->progress-> notifyProgress((uint32_t)(opCountMax * opCount++));1816 task->progress->setCurrentOperationProgress((uint32_t)(opCountMax * opCount++)); 1819 1817 1820 1818 /* Change the network adapters */ … … 1929 1927 1930 1928 if (!task->progress.isNull()) 1931 task->progress-> notifyProgress((uint32_t)(opCountMax * opCount++));1929 task->progress->setCurrentOperationProgress((uint32_t)(opCountMax * opCount++)); 1932 1930 1933 1931 /* CDROM drive */ … … 2015 2013 2016 2014 if (!task->progress.isNull()) 2017 task->progress-> notifyProgress((uint32_t)(opCountMax * opCount++));2015 task->progress->setCurrentOperationProgress((uint32_t)(opCountMax * opCount++)); 2018 2016 2019 2017 // store new machine for roll-back in case of errors … … 2101 2099 /* Advance to the next operation */ 2102 2100 if (!task->progress.isNull()) 2103 task->progress->advanceOperation (BstrFmt(tr("Creating virtual disk image '%s'"), pcszDstFilePath)); 2101 task->progress->setNextOperation(BstrFmt(tr("Creating virtual disk image '%s'"), pcszDstFilePath), 2102 vsdeHD->ulSizeMB); // operation's weight, as set up with the IProgress originally 2104 2103 } 2105 2104 else … … 2138 2137 /* Advance to the next operation */ 2139 2138 if (!task->progress.isNull()) 2140 task->progress->advanceOperation (BstrFmt(tr("Importing virtual disk image '%s'"), strSrcFilePath.c_str())); 2139 task->progress->setNextOperation(BstrFmt(tr("Importing virtual disk image '%s'"), strSrcFilePath.c_str()), 2140 vsdeHD->ulSizeMB); // operation's weight, as set up with the IProgress originally); 2141 2141 } 2142 2142 … … 2144 2144 // report its result 2145 2145 BOOL fCompleted; 2146 LONG currentPercent;2146 ULONG currentPercent; 2147 2147 while (SUCCEEDED(progress->COMGETTER(Completed(&fCompleted)))) 2148 2148 { … … 2150 2150 if (FAILED(rc)) throw rc; 2151 2151 if (!task->progress.isNull()) 2152 task->progress-> notifyProgress(currentPercent);2152 task->progress->setCurrentOperationProgress(currentPercent); 2153 2153 if (fCompleted) 2154 2154 break; … … 2399 2399 try 2400 2400 { 2401 uint32_t opCount = calcMaxProgress(); 2402 Bstr progressDesc = BstrFmt(tr("Write appliance '%s'"), 2401 Bstr progressDesc = BstrFmt(tr("Export appliance '%s'"), 2403 2402 m->strPath.raw()); 2404 /* Create the progress object */ 2405 progress.createObject(); 2406 rc = progress->init(mVirtualBox, static_cast<IAppliance*>(this), 2407 progressDesc, 2408 FALSE /* aCancelable */, 2409 opCount, 2410 progressDesc); 2411 CheckComRCThrowRC(rc); 2403 rc = setUpProgress(progress, progressDesc); 2404 if (FAILED(rc)) throw rc; 2412 2405 2413 2406 /* Initialize our worker task */ … … 3029 3022 // advance to the next operation 3030 3023 if (!task->progress.isNull()) 3031 task->progress->advanceOperation(BstrFmt(tr("Exporting virtual disk image '%s'"), strSrcFilePath.c_str())); 3024 task->progress->setNextOperation(BstrFmt(tr("Exporting virtual disk image '%s'"), strSrcFilePath.c_str()), 3025 pDiskEntry->ulSizeMB); // operation's weight, as set up with the IProgress originally); 3032 3026 3033 3027 // now loop until the asynchronous operation completes and then 3034 3028 // report its result 3035 3029 BOOL fCompleted; 3036 LONG currentPercent;3030 ULONG currentPercent; 3037 3031 while (SUCCEEDED(pProgress2->COMGETTER(Completed(&fCompleted)))) 3038 3032 { … … 3040 3034 if (FAILED(rc)) throw rc; 3041 3035 if (!task->progress.isNull()) 3042 task->progress-> notifyProgress(currentPercent);3036 task->progress->setCurrentOperationProgress(currentPercent); 3043 3037 if (fCompleted) 3044 3038 break; … … 3207 3201 3208 3202 /** 3209 * Calculates the maximum progress value forimportMachines() and write().3203 * Calculates the no. of operations for the IProgress objects in importMachines() and write(). 3210 3204 * @return 3211 3205 */ 3212 uint32_t Appliance::calcMaxProgress() 3213 { 3214 /* Figure out how many sub operation the import will need */ 3215 /* One for the appliance */ 3216 uint32_t opCount = 1; 3206 HRESULT Appliance::setUpProgress(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription) 3207 { 3208 HRESULT rc; 3209 3210 /* Create the progress object */ 3211 pProgress.createObject(); 3212 3213 // use one percent for parsing the XML and one percent for each virtual system 3214 // in the XML; use the rest (e.g. 97%) for the disk images 3215 ULONG cFixed = 1 + m->virtualSystemDescriptions.size(); 3216 ULONG ulPercentForDisks = 100 - cFixed; 3217 3218 // weigh the disk images according to their sizes 3219 uint32_t ulTotalMB = 0; 3220 uint32_t cDisks = 0; 3217 3221 list< ComObjPtr<VirtualSystemDescription> >::const_iterator it; 3218 3222 for (it = m->virtualSystemDescriptions.begin(); … … 3220 3224 ++it) 3221 3225 { 3222 /* One for every Virtual System */3223 ++opCount;3224 3226 ComObjPtr<VirtualSystemDescription> vsdescThis = (*it); 3225 3227 /* One for every hard disk of the Virtual System */ 3226 3228 std::list<VirtualSystemDescriptionEntry*> avsdeHDs = vsdescThis->findByType(VirtualSystemDescriptionType_HardDiskImage); 3227 opCount += (uint32_t)avsdeHDs.size(); 3229 std::list<VirtualSystemDescriptionEntry*>::const_iterator itH; 3230 for (itH = avsdeHDs.begin(); 3231 itH != avsdeHDs.end(); 3232 ++itH) 3233 { 3234 ulTotalMB += (**itH).ulSizeMB; 3235 ++cDisks; 3236 } 3228 3237 } 3229 3238 3230 return opCount; 3239 ULONG ulTotalOperationsWeight = ulTotalMB * 100 / ulPercentForDisks; 3240 m->ulWeightPerOperation = ulTotalOperationsWeight / 100; 3241 3242 Log(("Setting up progress object: ulTotalMB = %d, cFixed = %d, cDisks = %d, => cOperations = %d, ulTotalOperationsWeight = %d, m->ulWeightPerOperation = %d\n", 3243 ulTotalMB, cFixed, cDisks, cFixed + (ULONG)cDisks, ulTotalOperationsWeight, m->ulWeightPerOperation)); 3244 3245 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), 3246 bstrDescription, 3247 FALSE /* aCancelable */, 3248 cFixed + (ULONG)cDisks, // ULONG cOperations, 3249 ulTotalOperationsWeight, // ULONG ulTotalOperationsWeight, 3250 bstrDescription, // CBSTR bstrFirstOperationDescription, 3251 m->ulWeightPerOperation); // ULONG ulFirstOperationWeight, 3252 return rc; 3231 3253 } 3232 3254 … … 3536 3558 AutoWriteLock alock(this); 3537 3559 3538 addEntry(aType, "", aVboxValue, aVboxValue, aExtraConfigValue);3560 addEntry(aType, "", aVboxValue, aVboxValue, 0, aExtraConfigValue); 3539 3561 3540 3562 return S_OK; … … 3553 3575 const Utf8Str &aOrigValue, 3554 3576 const Utf8Str &aAutoValue, 3577 uint32_t ulSizeMB, 3555 3578 const Utf8Str &strExtraConfig /*= ""*/) 3556 3579 { … … 3562 3585 vsde.strVbox = aAutoValue; 3563 3586 vsde.strExtraConfig = strExtraConfig; 3587 vsde.ulSizeMB = ulSizeMB; 3564 3588 3565 3589 m->llDescriptions.push_back(vsde); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r18116 r18269 4613 4613 /* advance percent count */ 4614 4614 if (aProgress) 4615 aProgress-> notifyProgress(99 * (++ step) / StepCount );4615 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4616 4616 4617 4617 #ifdef VBOX_WITH_HGCM … … 4680 4680 /* advance percent count */ 4681 4681 if (aProgress) 4682 aProgress-> notifyProgress(99 * (++ step) / StepCount );4682 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4683 4683 4684 4684 # endif /* VBOX_WITH_GUEST_PROPS defined */ … … 4700 4700 /* advance percent count */ 4701 4701 if (aProgress) 4702 aProgress-> notifyProgress(99 * (++ step) / StepCount );4702 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4703 4703 4704 4704 #endif /* VBOX_WITH_HGCM */ … … 4731 4731 /* advance percent count */ 4732 4732 if (aProgress) 4733 aProgress-> notifyProgress(99 * (++ step) / StepCount );4733 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4734 4734 4735 4735 vrc = VINF_SUCCESS; … … 4760 4760 /* advance percent count */ 4761 4761 if (aProgress) 4762 aProgress-> notifyProgress(99 * (++ step) / StepCount );4762 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4763 4763 4764 4764 LogFlowThisFunc (("Ready for VM destruction.\n")); … … 4804 4804 /* advance percent count */ 4805 4805 if (aProgress) 4806 aProgress-> notifyProgress(99 * (++ step) / StepCount );4806 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4807 4807 4808 4808 if (VBOX_SUCCESS (vrc)) … … 4832 4832 /* advance percent count */ 4833 4833 if (aProgress) 4834 aProgress-> notifyProgress(99 * (++ step) / StepCount );4834 aProgress->setCurrentOperationProgress(99 * (++ step) / StepCount ); 4835 4835 } 4836 4836 else … … 5937 5937 /* update the progress object */ 5938 5938 if (task->mProgress) 5939 task->mProgress-> notifyProgress(uPercent);5939 task->mProgress->setCurrentOperationProgress(uPercent); 5940 5940 5941 5941 return VINF_SUCCESS; -
trunk/src/VBox/Main/HardDiskImpl.cpp
r18162 r18269 2098 2098 AssertComRCReturnRC (autoCaller.rc()); 2099 2099 2100 aProgress-> advanceOperation (BstrFmt (2101 tr ("Discarding hard disk '%s'"), name().raw()));2100 aProgress->setNextOperation(BstrFmt(tr("Discarding hard disk '%s'"), name().raw()), 2101 1); // weight 2102 2102 2103 2103 if (aChain == NULL) … … 3440 3440 /* update the progress object, capping it at 99% as the final percent 3441 3441 * is used for additional operations like setting the UUIDs and similar. */ 3442 HRESULT rc = that->mm.vdProgress-> notifyProgress(uPercent * 99 / 100);3442 HRESULT rc = that->mm.vdProgress->setCurrentOperationProgress(uPercent * 99 / 100); 3443 3443 if (FAILED(rc)) 3444 3444 { -
trunk/src/VBox/Main/MachineImpl.cpp
r18265 r18269 119 119 static DECLCALLBACK(int) progressCallback (unsigned uPercentage, void *pvUser) 120 120 { 121 Progress *progress = static_cast <Progress *>(pvUser);121 Progress *progress = static_cast<Progress*>(pvUser); 122 122 123 123 /* update the progress object */ 124 124 if (progress) 125 progress-> notifyProgress(uPercentage);125 progress->setCurrentOperationProgress(uPercentage); 126 126 127 127 return VINF_SUCCESS; … … 7225 7225 Assert (hd->type() == HardDiskType_Writethrough); 7226 7226 7227 rc = aProgress-> advanceOperation (7228 BstrFmt (tr ("Skipping writethrough hard disk '%s'"),7229 hd->root()->name().raw()));7227 rc = aProgress->setNextOperation(BstrFmt(tr("Skipping writethrough hard disk '%s'"), 7228 hd->root()->name().raw()), 7229 1); // weight 7230 7230 CheckComRCThrowRC (rc); 7231 7231 … … 7236 7236 /* need a diff */ 7237 7237 7238 rc = aProgress-> advanceOperation (7239 BstrFmt (tr ("Creating differencing hard disk for '%s'"),7240 hd->root()->name().raw()));7238 rc = aProgress->setNextOperation(BstrFmt(tr("Creating differencing hard disk for '%s'"), 7239 hd->root()->name().raw()), 7240 1); // weight 7241 7241 CheckComRCThrowRC (rc); 7242 7242 … … 10147 10147 stateFrom.raw(), stateTo.raw())); 10148 10148 10149 mSnapshotData.mServerProgress-> advanceOperation (10150 Bstr (tr ("Copying the execution state")));10149 mSnapshotData.mServerProgress->setNextOperation(Bstr(tr("Copying the execution state")), 10150 1); // weight 10151 10151 10152 10152 /* Leave the lock before a lengthy operation (mMachineState is … … 10300 10300 Assert (hd->type() == HardDiskType_Writethrough); 10301 10301 10302 rc = aTask.progress-> advanceOperation (10303 BstrFmt (tr ("Skipping writethrough hard disk '%s'"),10304 hd->root()->name().raw()));10302 rc = aTask.progress->setNextOperation(BstrFmt(tr("Skipping writethrough hard disk '%s'"), 10303 hd->root()->name().raw()), 10304 1); // weight 10305 10305 CheckComRCThrowRC (rc); 10306 10306 … … 10455 10455 if (stateFilePath) 10456 10456 { 10457 aTask.progress-> advanceOperation (10458 Bstr (tr ("Discarding the execution state")));10457 aTask.progress->setNextOperation(Bstr(tr("Discarding the execution state")), 10458 1); // weight 10459 10459 10460 10460 RTFileDelete (Utf8Str (stateFilePath)); … … 10700 10700 snapStateFilePath.raw(), stateFilePath.raw())); 10701 10701 10702 aTask.progress-> advanceOperation (10703 Bstr (tr ("Restoring the execution state")));10702 aTask.progress->setNextOperation(Bstr(tr("Restoring the execution state")), 10703 1); // weight 10704 10704 10705 10705 /* leave the lock before the potentially lengthy operation */ -
trunk/src/VBox/Main/ProgressImpl.cpp
r18252 r18269 59 59 mCanceled = FALSE; 60 60 mResultCode = S_OK; 61 mOperationCount = 0; 62 mOperation = 0; 63 mOperationPercent = 0; 61 62 m_cOperations = 63 m_ulTotalOperationsWeight = 64 m_ulOperationsCompletedWeight = 65 m_ulCurrentOperation = 66 m_ulCurrentOperationWeight = 67 m_ulOperationPercent = 0; 64 68 65 69 return S_OK; … … 95 99 NOREF (aAutoInitSpan); 96 100 97 AutoCaller autoCaller 101 AutoCaller autoCaller(this); 98 102 AssertReturn (autoCaller.state() == InInit, E_FAIL); 99 103 … … 197 201 CheckComArgOutPointerValid(aId); 198 202 199 AutoCaller autoCaller 200 CheckComRCReturnRC 203 AutoCaller autoCaller(this); 204 CheckComRCReturnRC(autoCaller.rc()); 201 205 202 206 /* mId is constant during life time, no need to lock */ … … 210 214 CheckComArgOutPointerValid(aDescription); 211 215 212 AutoCaller autoCaller 213 CheckComRCReturnRC 216 AutoCaller autoCaller(this); 217 CheckComRCReturnRC(autoCaller.rc()); 214 218 215 219 /* mDescription is constant during life time, no need to lock */ … … 223 227 CheckComArgOutPointerValid(aInitiator); 224 228 225 AutoCaller autoCaller 226 CheckComRCReturnRC 229 AutoCaller autoCaller(this); 230 CheckComRCReturnRC(autoCaller.rc()); 227 231 228 232 /* mInitiator/mParent are constant during life time, no need to lock */ … … 244 248 CheckComArgOutPointerValid(aCancelable); 245 249 246 AutoCaller autoCaller 247 CheckComRCReturnRC 250 AutoCaller autoCaller(this); 251 CheckComRCReturnRC(autoCaller.rc()); 248 252 249 253 AutoReadLock alock (this); … … 254 258 } 255 259 256 STDMETHODIMP ProgressBase::COMGETTER(Percent) (LONG *aPercent)260 STDMETHODIMP ProgressBase::COMGETTER(Percent)(ULONG *aPercent) 257 261 { 258 262 CheckComArgOutPointerValid(aPercent); 259 263 260 AutoCaller autoCaller 261 CheckComRCReturnRC 262 263 AutoReadLock alock 264 AutoCaller autoCaller(this); 265 CheckComRCReturnRC(autoCaller.rc()); 266 267 AutoReadLock alock(this); 264 268 265 269 if (mCompleted && SUCCEEDED (mResultCode)) … … 268 272 { 269 273 /* global percent = 270 * (100 / mOperationCount) * mOperation + 271 * ((100 / mOperationCount) / 100) * mOperationPercent */ 272 *aPercent = (100 * mOperation + mOperationPercent) / mOperationCount; 274 * (100 / m_cOperations) * mOperation + 275 * ((100 / m_cOperations) / 100) * m_ulOperationPercent */ 276 // *aPercent = (100 * mOperation + m_ulOperationPercent) / m_cOperations; 277 278 *aPercent = (ULONG)( ( (double)m_ulOperationsCompletedWeight // weight of operations that have been completed 279 + ((double)m_ulOperationPercent * (double)m_ulCurrentOperationWeight / (double)100) // plus partial weight of the current operation 280 ) * (double)100 / (double)m_ulTotalOperationsWeight); 273 281 } 274 282 … … 280 288 CheckComArgOutPointerValid(aCompleted); 281 289 282 AutoCaller autoCaller 283 CheckComRCReturnRC 290 AutoCaller autoCaller(this); 291 CheckComRCReturnRC(autoCaller.rc()); 284 292 285 293 AutoReadLock alock (this); … … 294 302 CheckComArgOutPointerValid(aCanceled); 295 303 296 AutoCaller autoCaller 297 CheckComRCReturnRC 304 AutoCaller autoCaller(this); 305 CheckComRCReturnRC(autoCaller.rc()); 298 306 299 307 AutoReadLock alock (this); … … 308 316 CheckComArgOutPointerValid(aResultCode); 309 317 310 AutoCaller autoCaller 311 CheckComRCReturnRC 318 AutoCaller autoCaller(this); 319 CheckComRCReturnRC(autoCaller.rc()); 312 320 313 321 AutoReadLock alock (this); … … 326 334 CheckComArgOutPointerValid(aErrorInfo); 327 335 328 AutoCaller autoCaller 329 CheckComRCReturnRC 336 AutoCaller autoCaller(this); 337 CheckComRCReturnRC(autoCaller.rc()); 330 338 331 339 AutoReadLock alock (this); … … 344 352 CheckComArgOutPointerValid(aOperationCount); 345 353 346 AutoCaller autoCaller 347 CheckComRCReturnRC 354 AutoCaller autoCaller(this); 355 CheckComRCReturnRC(autoCaller.rc()); 348 356 349 357 AutoReadLock alock (this); 350 358 351 *aOperationCount = m OperationCount;359 *aOperationCount = m_cOperations; 352 360 353 361 return S_OK; … … 358 366 CheckComArgOutPointerValid(aOperation); 359 367 360 AutoCaller autoCaller 361 CheckComRCReturnRC 368 AutoCaller autoCaller(this); 369 CheckComRCReturnRC(autoCaller.rc()); 362 370 363 371 AutoReadLock alock (this); 364 372 365 *aOperation = m Operation;373 *aOperation = m_ulCurrentOperation; 366 374 367 375 return S_OK; … … 372 380 CheckComArgOutPointerValid(aOperationDescription); 373 381 374 AutoCaller autoCaller 375 CheckComRCReturnRC 382 AutoCaller autoCaller(this); 383 CheckComRCReturnRC(autoCaller.rc()); 376 384 377 385 AutoReadLock alock (this); 378 386 379 m OperationDescription.cloneTo(aOperationDescription);380 381 return S_OK; 382 } 383 384 STDMETHODIMP ProgressBase::COMGETTER(OperationPercent) (LONG *aOperationPercent)387 m_bstrOperationDescription.cloneTo(aOperationDescription); 388 389 return S_OK; 390 } 391 392 STDMETHODIMP ProgressBase::COMGETTER(OperationPercent)(ULONG *aOperationPercent) 385 393 { 386 394 CheckComArgOutPointerValid(aOperationPercent); 387 395 388 AutoCaller autoCaller 389 CheckComRCReturnRC 396 AutoCaller autoCaller(this); 397 CheckComRCReturnRC(autoCaller.rc()); 390 398 391 399 AutoReadLock alock (this); … … 394 402 *aOperationPercent = 100; 395 403 else 396 *aOperationPercent = m OperationPercent;404 *aOperationPercent = m_ulOperationPercent; 397 405 398 406 return S_OK; … … 481 489 IUnknown *aInitiator, 482 490 CBSTR aDescription, BOOL aCancelable, 483 ULONG aOperationCount, CBSTR aOperationDescription, 491 ULONG cOperations, ULONG ulTotalOperationsWeight, 492 CBSTR bstrFirstOperationDescription, ULONG ulFirstOperationWeight, 484 493 OUT_GUID aId /* = NULL */) 485 494 { 486 495 LogFlowThisFunc (("aDescription=\"%ls\"\n", aDescription)); 487 496 488 AssertReturn (aOperationDescription, E_INVALIDARG);489 AssertReturn (aOperationCount >= 1, E_INVALIDARG);497 AssertReturn(bstrFirstOperationDescription, E_INVALIDARG); 498 AssertReturn(ulTotalOperationsWeight >= 1, E_INVALIDARG); 490 499 491 500 /* Enclose the state transition NotReady->InInit->Ready */ … … 504 513 mCancelable = aCancelable; 505 514 506 mOperationCount = aOperationCount; 507 mOperation = 0; /* the first operation */ 508 mOperationDescription = aOperationDescription; 515 m_cOperations = cOperations; 516 m_ulTotalOperationsWeight = ulTotalOperationsWeight; 517 m_ulOperationsCompletedWeight = 0; 518 m_ulCurrentOperation = 0; 519 m_bstrOperationDescription = bstrFirstOperationDescription; 520 m_ulCurrentOperationWeight = ulFirstOperationWeight; 521 m_ulOperationPercent = 0; 509 522 510 523 int vrc = RTSemEventMultiCreate (&mCompletedSem); … … 535 548 * @param aOperationDescription Description of the individual operation. 536 549 */ 537 HRESULT Progress::init (BOOL aCancelable, ULONG aOperationCount, 538 CBSTR aOperationDescription) 550 HRESULT Progress::init(BOOL aCancelable, 551 ULONG aOperationCount, 552 CBSTR aOperationDescription) 539 553 { 540 554 LogFlowThisFunc (("aOperationDescription=\"%ls\"\n", aOperationDescription)); … … 551 565 mCancelable = aCancelable; 552 566 553 mOperationCount = aOperationCount; 554 mOperation = 0; /* the first operation */ 555 mOperationDescription = aOperationDescription; 567 // for this variant we assume for now that all operations are weighed "1" 568 // and equal total weight = operation count 569 m_cOperations = aOperationCount; 570 m_ulTotalOperationsWeight = aOperationCount; 571 m_ulOperationsCompletedWeight = 0; 572 m_ulCurrentOperation = 0; 573 m_bstrOperationDescription = aOperationDescription; 574 m_ulCurrentOperationWeight = 1; 575 m_ulOperationPercent = 0; 556 576 557 577 int vrc = RTSemEventMultiCreate (&mCompletedSem); … … 611 631 LogFlowThisFunc (("aTimeout=%d\n", aTimeout)); 612 632 613 AutoCaller autoCaller 614 CheckComRCReturnRC 615 616 AutoWriteLock alock 633 AutoCaller autoCaller(this); 634 CheckComRCReturnRC(autoCaller.rc()); 635 636 AutoWriteLock alock(this); 617 637 618 638 /* if we're already completed, take a shortcut */ … … 667 687 * calling this method will definitey freese event processing. 668 688 */ 669 STDMETHODIMP Progress::WaitForOperationCompletion 689 STDMETHODIMP Progress::WaitForOperationCompletion(ULONG aOperation, LONG aTimeout) 670 690 { 671 691 LogFlowThisFuncEnter(); 672 692 LogFlowThisFunc (("aOperation=%d, aTimeout=%d\n", aOperation, aTimeout)); 673 693 674 AutoCaller autoCaller 675 CheckComRCReturnRC 676 677 AutoWriteLock alock 678 679 CheckComArgExpr(aOperation, aOperation < m OperationCount);694 AutoCaller autoCaller(this); 695 CheckComRCReturnRC(autoCaller.rc()); 696 697 AutoWriteLock alock(this); 698 699 CheckComArgExpr(aOperation, aOperation < m_cOperations); 680 700 681 701 /* if we're already completed or if the given operation is already done, 682 702 * then take a shortcut */ 683 if (!mCompleted && aOperation >= mOperation) 703 if ( !mCompleted 704 && aOperation >= m_ulCurrentOperation) 684 705 { 685 706 RTTIMESPEC time; … … 691 712 int64_t lastTime = RTTimeSpecGetMilli (&time); 692 713 693 while (!mCompleted && aOperation >= m Operation &&714 while (!mCompleted && aOperation >= m_ulCurrentOperation && 694 715 (forever || timeLeft > 0)) 695 716 { … … 729 750 STDMETHODIMP Progress::Cancel() 730 751 { 731 AutoCaller autoCaller 732 CheckComRCReturnRC 733 734 AutoWriteLock alock 752 AutoCaller autoCaller(this); 753 CheckComRCReturnRC(autoCaller.rc()); 754 755 AutoWriteLock alock(this); 735 756 736 757 if (!mCancelable) … … 751 772 * (in range [0, 100]). 752 773 */ 753 HRESULT Progress:: notifyProgress (LONG aPercent)754 { 755 AutoCaller autoCaller 774 HRESULT Progress::setCurrentOperationProgress(ULONG aPercent) 775 { 776 AutoCaller autoCaller(this); 756 777 AssertComRCReturnRC (autoCaller.rc()); 757 778 758 AutoWriteLock alock 759 760 AssertReturn (aPercent >= 0 &&aPercent <= 100, E_INVALIDARG);779 AutoWriteLock alock(this); 780 781 AssertReturn(aPercent <= 100, E_INVALIDARG); 761 782 762 783 if (mCancelable && mCanceled) … … 768 789 AssertReturn (!mCompleted && !mCanceled, E_FAIL); 769 790 770 771 mOperationPercent = aPercent; 791 m_ulOperationPercent = aPercent; 772 792 773 793 return S_OK; … … 782 802 * @note The current operation must not be the last one. 783 803 */ 784 HRESULT Progress:: advanceOperation (CBSTR aOperationDescription)785 { 786 AssertReturn (aOperationDescription, E_INVALIDARG);787 788 AutoCaller autoCaller 804 HRESULT Progress::setNextOperation(CBSTR bstrNextOperationDescription, ULONG ulNextOperationsWeight) 805 { 806 AssertReturn(bstrNextOperationDescription, E_INVALIDARG); 807 808 AutoCaller autoCaller(this); 789 809 AssertComRCReturnRC (autoCaller.rc()); 790 810 791 AutoWriteLock alock 811 AutoWriteLock alock(this); 792 812 793 813 AssertReturn (!mCompleted && !mCanceled, E_FAIL); 794 AssertReturn (mOperation + 1 < mOperationCount, E_FAIL); 795 796 mOperation ++; 797 mOperationDescription = aOperationDescription; 798 mOperationPercent = 0; 814 AssertReturn (m_ulCurrentOperation + 1 < m_cOperations, E_FAIL); 815 816 ++m_ulCurrentOperation; 817 m_ulOperationsCompletedWeight += m_ulCurrentOperationWeight; 818 819 m_bstrOperationDescription = bstrNextOperationDescription; 820 m_ulCurrentOperationWeight = ulNextOperationsWeight; 821 m_ulOperationPercent = 0; 822 823 Log(("Progress::setNextOperation(%ls): ulNextOperationsWeight = %d; m_ulCurrentOperation is now %d, m_ulOperationsCompletedWeightis now %d\n", 824 m_bstrOperationDescription.raw(), ulNextOperationsWeight, m_ulCurrentOperation, m_ulOperationsCompletedWeight)); 799 825 800 826 /* wake up all waiting threads */ … … 823 849 HRESULT Progress::notifyComplete (HRESULT aResultCode) 824 850 { 825 AutoCaller autoCaller 851 AutoCaller autoCaller(this); 826 852 AssertComRCReturnRC (autoCaller.rc()); 827 853 828 AutoWriteLock alock 854 AutoWriteLock alock(this); 829 855 830 856 AssertReturn (mCompleted == FALSE, E_FAIL); … … 880 906 else 881 907 { 882 m Operation = mOperationCount- 1; /* last operation */883 m OperationPercent = 100;908 m_ulCurrentOperation = m_cOperations - 1; /* last operation */ 909 m_ulOperationPercent = 100; 884 910 } 885 911 … … 939 965 const Bstr &aComponent, const Bstr &aText) 940 966 { 941 AutoCaller autoCaller 967 AutoCaller autoCaller(this); 942 968 AssertComRCReturnRC (autoCaller.rc()); 943 969 944 AutoWriteLock alock 970 AutoWriteLock alock(this); 945 971 946 972 AssertReturn (mCompleted == FALSE, E_FAIL); … … 1035 1061 mCanceled = FALSE; 1036 1062 1037 m OperationCount= 0; /* will be calculated later */1038 1039 m Operation = 0;1063 m_cOperations = 0; /* will be calculated later */ 1064 1065 m_ulCurrentOperation = 0; 1040 1066 rc = mProgresses [0]->COMGETTER(OperationDescription) ( 1041 m OperationDescription.asOutParam());1067 m_bstrOperationDescription.asOutParam()); 1042 1068 CheckComRCReturnRC (rc); 1043 1069 … … 1059 1085 CheckComRCReturnRC (rc); 1060 1086 1061 m OperationCount+= opCount;1087 m_cOperations += opCount; 1062 1088 } 1063 1089 } … … 1133 1159 //////////////////////////////////////////////////////////////////////////////// 1134 1160 1135 STDMETHODIMP CombinedProgress::COMGETTER(Percent) (LONG *aPercent)1161 STDMETHODIMP CombinedProgress::COMGETTER(Percent)(ULONG *aPercent) 1136 1162 { 1137 1163 CheckComArgOutPointerValid(aPercent); 1138 1164 1139 AutoCaller autoCaller 1140 CheckComRCReturnRC 1165 AutoCaller autoCaller(this); 1166 CheckComRCReturnRC(autoCaller.rc()); 1141 1167 1142 1168 /* checkProgress needs a write lock */ 1143 AutoWriteLock alock 1169 AutoWriteLock alock(this); 1144 1170 1145 1171 if (mCompleted && SUCCEEDED (mResultCode)) … … 1151 1177 1152 1178 /* global percent = 1153 * (100 / m OperationCount) * mOperation +1154 * ((100 / m OperationCount) / 100) * mOperationPercent */1155 *aPercent = (100 * m Operation + mOperationPercent) / mOperationCount;1179 * (100 / m_cOperations) * mOperation + 1180 * ((100 / m_cOperations) / 100) * m_ulOperationPercent */ 1181 *aPercent = (100 * m_ulCurrentOperation + m_ulOperationPercent) / m_cOperations; 1156 1182 } 1157 1183 … … 1163 1189 CheckComArgOutPointerValid(aCompleted); 1164 1190 1165 AutoCaller autoCaller 1166 CheckComRCReturnRC 1191 AutoCaller autoCaller(this); 1192 CheckComRCReturnRC(autoCaller.rc()); 1167 1193 1168 1194 /* checkProgress needs a write lock */ 1169 AutoWriteLock alock 1195 AutoWriteLock alock(this); 1170 1196 1171 1197 HRESULT rc = checkProgress(); … … 1179 1205 CheckComArgOutPointerValid(aCanceled); 1180 1206 1181 AutoCaller autoCaller 1182 CheckComRCReturnRC 1207 AutoCaller autoCaller(this); 1208 CheckComRCReturnRC(autoCaller.rc()); 1183 1209 1184 1210 /* checkProgress needs a write lock */ 1185 AutoWriteLock alock 1211 AutoWriteLock alock(this); 1186 1212 1187 1213 HRESULT rc = checkProgress(); … … 1195 1221 CheckComArgOutPointerValid(aResultCode); 1196 1222 1197 AutoCaller autoCaller 1198 CheckComRCReturnRC 1223 AutoCaller autoCaller(this); 1224 CheckComRCReturnRC(autoCaller.rc()); 1199 1225 1200 1226 /* checkProgress needs a write lock */ 1201 AutoWriteLock alock 1227 AutoWriteLock alock(this); 1202 1228 1203 1229 HRESULT rc = checkProgress(); … … 1211 1237 CheckComArgOutPointerValid(aErrorInfo); 1212 1238 1213 AutoCaller autoCaller 1214 CheckComRCReturnRC 1239 AutoCaller autoCaller(this); 1240 CheckComRCReturnRC(autoCaller.rc()); 1215 1241 1216 1242 /* checkProgress needs a write lock */ 1217 AutoWriteLock alock 1243 AutoWriteLock alock(this); 1218 1244 1219 1245 HRESULT rc = checkProgress(); … … 1227 1253 CheckComArgOutPointerValid(aOperation); 1228 1254 1229 AutoCaller autoCaller 1230 CheckComRCReturnRC 1255 AutoCaller autoCaller(this); 1256 CheckComRCReturnRC(autoCaller.rc()); 1231 1257 1232 1258 /* checkProgress needs a write lock */ 1233 AutoWriteLock alock 1259 AutoWriteLock alock(this); 1234 1260 1235 1261 HRESULT rc = checkProgress(); … … 1243 1269 CheckComArgOutPointerValid(aOperationDescription); 1244 1270 1245 AutoCaller autoCaller 1246 CheckComRCReturnRC 1271 AutoCaller autoCaller(this); 1272 CheckComRCReturnRC(autoCaller.rc()); 1247 1273 1248 1274 /* checkProgress needs a write lock */ 1249 AutoWriteLock alock 1275 AutoWriteLock alock(this); 1250 1276 1251 1277 HRESULT rc = checkProgress(); … … 1255 1281 } 1256 1282 1257 STDMETHODIMP CombinedProgress::COMGETTER(OperationPercent) (LONG *aOperationPercent)1283 STDMETHODIMP CombinedProgress::COMGETTER(OperationPercent)(ULONG *aOperationPercent) 1258 1284 { 1259 1285 CheckComArgOutPointerValid(aOperationPercent); 1260 1286 1261 AutoCaller autoCaller 1262 CheckComRCReturnRC 1287 AutoCaller autoCaller(this); 1288 CheckComRCReturnRC(autoCaller.rc()); 1263 1289 1264 1290 /* checkProgress needs a write lock */ 1265 AutoWriteLock alock 1291 AutoWriteLock alock(this); 1266 1292 1267 1293 HRESULT rc = checkProgress(); … … 1285 1311 LogFlowThisFunc (("aTtimeout=%d\n", aTimeout)); 1286 1312 1287 AutoCaller autoCaller 1288 CheckComRCReturnRC 1289 1290 AutoWriteLock alock 1313 AutoCaller autoCaller(this); 1314 CheckComRCReturnRC(autoCaller.rc()); 1315 1316 AutoWriteLock alock(this); 1291 1317 1292 1318 /* if we're already completed, take a shortcut */ … … 1340 1366 LogFlowThisFunc (("aOperation=%d, aTimeout=%d\n", aOperation, aTimeout)); 1341 1367 1342 AutoCaller autoCaller 1343 CheckComRCReturnRC 1344 1345 AutoWriteLock alock 1346 1347 if (aOperation >= m OperationCount)1368 AutoCaller autoCaller(this); 1369 CheckComRCReturnRC(autoCaller.rc()); 1370 1371 AutoWriteLock alock(this); 1372 1373 if (aOperation >= m_cOperations) 1348 1374 return setError (E_FAIL, 1349 tr ("Operation number must be in range [0, %d]"), m Operation - 1);1375 tr ("Operation number must be in range [0, %d]"), m_ulCurrentOperation - 1); 1350 1376 1351 1377 /* if we're already completed or if the given operation is already done, 1352 1378 * then take a shortcut */ 1353 if (!mCompleted && aOperation >= m Operation)1379 if (!mCompleted && aOperation >= m_ulCurrentOperation) 1354 1380 { 1355 1381 HRESULT rc = S_OK; … … 1388 1414 int64_t lastTime = RTTimeSpecGetMilli (&time); 1389 1415 1390 while (!mCompleted && aOperation >= m Operation &&1416 while (!mCompleted && aOperation >= m_ulCurrentOperation && 1391 1417 (forever || timeLeft > 0)) 1392 1418 { … … 1420 1446 STDMETHODIMP CombinedProgress::Cancel() 1421 1447 { 1422 AutoCaller autoCaller 1423 CheckComRCReturnRC 1424 1425 AutoWriteLock alock 1448 AutoCaller autoCaller(this); 1449 CheckComRCReturnRC(autoCaller.rc()); 1450 1451 AutoWriteLock alock(this); 1426 1452 1427 1453 if (!mCancelable) … … 1502 1528 while (completed && !mCompleted); 1503 1529 1504 rc = progress->COMGETTER(OperationPercent) (&m OperationPercent);1530 rc = progress->COMGETTER(OperationPercent) (&m_ulOperationPercent); 1505 1531 if (SUCCEEDED (rc)) 1506 1532 { 1507 1533 ULONG operation = 0; 1508 1534 rc = progress->COMGETTER(Operation) (&operation); 1509 if (SUCCEEDED (rc) && mCompletedOperations + operation > m Operation)1535 if (SUCCEEDED (rc) && mCompletedOperations + operation > m_ulCurrentOperation) 1510 1536 { 1511 m Operation = mCompletedOperations + operation;1537 m_ulCurrentOperation = mCompletedOperations + operation; 1512 1538 rc = progress->COMGETTER(OperationDescription) ( 1513 m OperationDescription.asOutParam());1539 m_bstrOperationDescription.asOutParam()); 1514 1540 } 1515 1541 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r18258 r18269 7816 7816 <interface 7817 7817 name="IProgress" extends="$unknown" 7818 uuid=" d3aa5417-6103-41fc-9e54-01ee1d08f42f"7818 uuid="ee1aa091-fda8-47a9-8f1c-4bba002a3229" 7819 7819 wsmap="managed" 7820 7820 > … … 7871 7871 </attribute> 7872 7872 7873 <attribute name="percent" type=" long" readonly="yes">7873 <attribute name="percent" type="unsigned long" readonly="yes"> 7874 7874 <desc> 7875 7875 Current progress value of the task as a whole, in percent. 7876 7876 This value depends on how many operations are already complete. 7877 Returns 100 if <link to="#completed" /> is true. 7877 7878 </desc> 7878 7879 </attribute> … … 7920 7921 </attribute> 7921 7922 7922 <attribute name="operationPercent" type=" long" readonly="yes">7923 <attribute name="operationPercent" type="unsigned long" readonly="yes"> 7923 7924 <desc>Progress value of the current sub-operation only, in percent.</desc> 7924 7925 </attribute> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r18214 r18269 34 34 35 35 class VirtualBox; 36 class Progress; 36 37 37 38 class ATL_NO_VTABLE Appliance : … … 96 97 HRESULT searchUniqueVMName(Utf8Str& aName) const; 97 98 HRESULT searchUniqueDiskImageFilePath(Utf8Str& aName) const; 98 uint32_t calcMaxProgress();99 HRESULT setUpProgress(ComObjPtr<Progress> &pProgress, const Bstr &bstrDescription); 99 100 void addWarning(const char* aWarning, ...); 100 101 … … 116 117 Utf8Str strVbox; // configuration value (type-dependent) 117 118 Utf8Str strExtraConfig; // extra configuration key=value strings (type-dependent) 119 120 uint32_t ulSizeMB; // hard disk images only: size of the uncompressed image in MB 118 121 }; 119 122 … … 187 190 const Utf8Str &aOrigValue, 188 191 const Utf8Str &aAutoValue, 192 uint32_t ulSizeMB = 0, 189 193 const Utf8Str &strExtraConfig = ""); 190 194 -
trunk/src/VBox/Main/include/ProgressImpl.h
r17684 r18269 72 72 // IProgress properties 73 73 STDMETHOD(COMGETTER(Cancelable)) (BOOL *aCancelable); 74 STDMETHOD(COMGETTER(Percent)) ( LONG *aPercent);74 STDMETHOD(COMGETTER(Percent)) (ULONG *aPercent); 75 75 STDMETHOD(COMGETTER(Completed)) (BOOL *aCompleted); 76 76 STDMETHOD(COMGETTER(Canceled)) (BOOL *aCanceled); … … 80 80 STDMETHOD(COMGETTER(Operation)) (ULONG *aCount); 81 81 STDMETHOD(COMGETTER(OperationDescription)) (BSTR *aOperationDescription); 82 STDMETHOD(COMGETTER(OperationPercent)) ( LONG *aOperationPercent);82 STDMETHOD(COMGETTER(OperationPercent)) (ULONG *aOperationPercent); 83 83 84 84 // public methods only for internal purposes … … 112 112 ComPtr <IVirtualBoxErrorInfo> mErrorInfo; 113 113 114 ULONG mOperationCount; 115 ULONG mOperation; 116 Bstr mOperationDescription; 117 LONG mOperationPercent; 114 ULONG m_cOperations; // number of operations (so that progress dialog can display something like 1/3) 115 ULONG m_ulTotalOperationsWeight; // sum of weights of all operations, given to constructor 116 117 ULONG m_ulOperationsCompletedWeight; // summed-up weight of operations that have been completed; initially 0 118 119 ULONG m_ulCurrentOperation; // operations counter, incremented with each setNextOperation() 120 Bstr m_bstrOperationDescription; // name of current operation; initially from constructor, changed with setNextOperation() 121 ULONG m_ulCurrentOperationWeight; // weight of current operation, given to setNextOperation() 122 ULONG m_ulOperationPercent; // percentage of current operation, set with setCurrentOperationProgress() 118 123 }; 119 124 … … 148 153 // public initializer/uninitializer for internal purposes only 149 154 150 HRESULT init ( 155 /** 156 * Simplified constructor for progress objects that have only one 157 * operation as a task. 158 * @param aParent 159 * @param aInitiator 160 * @param aDescription 161 * @param aCancelable 162 * @param aId 163 * @return 164 */ 165 HRESULT init( 151 166 #if !defined (VBOX_COM_INPROC) 152 167 VirtualBox *aParent, … … 156 171 OUT_GUID aId = NULL) 157 172 { 158 return init 173 return init( 159 174 #if !defined (VBOX_COM_INPROC) 160 175 aParent, 161 176 #endif 162 aInitiator, aDescription, aCancelable, 1, aDescription, aId); 177 aInitiator, 178 aDescription, 179 aCancelable, 180 1, // cOperations 181 1, // ulTotalOperationsWeight 182 aDescription, // bstrFirstOperationDescription 183 1, // ulFirstOperationWeight 184 aId); 163 185 } 164 186 165 HRESULT init ( 187 /** 188 * Not quite so simplified constructor for progress objects that have 189 * more than one operation, but all sub-operations are weighed the same. 190 * @param aParent 191 * @param aInitiator 192 * @param aDescription 193 * @param aCancelable 194 * @param cOperations 195 * @param bstrFirstOperationDescription 196 * @param aId 197 * @return 198 */ 199 HRESULT init( 166 200 #if !defined (VBOX_COM_INPROC) 167 201 VirtualBox *aParent, … … 169 203 IUnknown *aInitiator, 170 204 CBSTR aDescription, BOOL aCancelable, 171 ULONG aOperationCount, CBSTR aOperationDescription, 205 ULONG cOperations, 206 CBSTR bstrFirstOperationDescription, 207 OUT_GUID aId = NULL) 208 { 209 return init( 210 #if !defined (VBOX_COM_INPROC) 211 aParent, 212 #endif 213 aInitiator, 214 aDescription, 215 aCancelable, 216 cOperations, // cOperations 217 cOperations, // ulTotalOperationsWeight = cOperations 218 bstrFirstOperationDescription, // bstrFirstOperationDescription 219 1, // ulFirstOperationWeight: weigh them all the same 220 aId); 221 } 222 223 HRESULT init( 224 #if !defined (VBOX_COM_INPROC) 225 VirtualBox *aParent, 226 #endif 227 IUnknown *aInitiator, 228 CBSTR aDescription, BOOL aCancelable, 229 ULONG cOperations, ULONG ulTotalOperationsWeight, 230 CBSTR bstrFirstOperationDescription, ULONG ulFirstOperationWeight, 172 231 OUT_GUID aId = NULL); 173 232 … … 178 237 179 238 // IProgress methods 180 STDMETHOD(WaitForCompletion) 181 STDMETHOD(WaitForOperationCompletion) 239 STDMETHOD(WaitForCompletion)(LONG aTimeout); 240 STDMETHOD(WaitForOperationCompletion)(ULONG aOperation, LONG aTimeout); 182 241 STDMETHOD(Cancel)(); 183 242 184 243 // public methods only for internal purposes 185 244 186 HRESULT notifyProgress (LONG aPercent);187 HRESULT advanceOperation (CBSTR aOperationDescription);188 189 HRESULT notifyComplete 190 HRESULT notifyComplete 191 192 193 HRESULT notifyCompleteBstr 194 245 HRESULT setCurrentOperationProgress(ULONG aPercent); 246 HRESULT setNextOperation(CBSTR bstrNextOperationDescription, ULONG ulNextOperationsWeight); 247 248 HRESULT notifyComplete(HRESULT aResultCode); 249 HRESULT notifyComplete(HRESULT aResultCode, const GUID &aIID, 250 const Bstr &aComponent, 251 const char *aText, ...); 252 HRESULT notifyCompleteBstr(HRESULT aResultCode, const GUID &aIID, 253 const Bstr &aComponent, const Bstr &aText); 195 254 196 255 /** For com::SupportErrorInfoImpl. */ … … 328 387 329 388 // IProgress properties 330 STDMETHOD(COMGETTER(Percent)) ( LONG *aPercent);389 STDMETHOD(COMGETTER(Percent)) (ULONG *aPercent); 331 390 STDMETHOD(COMGETTER(Completed)) (BOOL *aCompleted); 332 391 STDMETHOD(COMGETTER(Canceled)) (BOOL *aCanceled); … … 335 394 STDMETHOD(COMGETTER(Operation)) (ULONG *aCount); 336 395 STDMETHOD(COMGETTER(OperationDescription)) (BSTR *aOperationDescription); 337 STDMETHOD(COMGETTER(OperationPercent)) ( LONG *aOperationPercent);396 STDMETHOD(COMGETTER(OperationPercent)) (ULONG *aOperationPercent); 338 397 339 398 // IProgress methods … … 359 418 360 419 #endif /* ____H_PROGRESSIMPL */ 361 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ 420
Note:
See TracChangeset
for help on using the changeset viewer.