Changeset 34398 in vbox
- Timestamp:
- Nov 26, 2010 4:24:58 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r34338 r34398 1450 1450 ComPtr<IProgress> progress; 1451 1451 CHECK_ERROR(guest, UpdateGuestAdditions(Bstr(Utf8Source).raw(), 1452 0 /* Flags, not used. */,1452 AdditionsUpdateFlag_None, 1453 1453 progress.asOutParam())); 1454 1454 if (FAILED(rc)) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r34254 r34398 364 364 CGuest guest = session().GetConsole().GetGuest(); 365 365 #ifdef DEBUG_andy 366 CProgress progressInstall = guest.UpdateGuestAdditions("c:\\Downloads\\VBoxGuestAdditions_3.2.8.iso", 0); 366 CProgress progressInstall = guest.UpdateGuestAdditions("c:\\Downloads\\VBoxGuestAdditions_3.2.8.iso", 367 AdditionsUpdateFlag_WaitForUpdateStartOnly); 367 368 #else 368 CProgress progressInstall = guest.UpdateGuestAdditions(strSource, 0 /* Flags, not used. */); 369 /* Since we are going to show a modal progress dialog we don't want to wait for the whole 370 * update progress being complete - the user might need to interact with the VM to confirm (WHQL) 371 * popups - instead we only wait until the actual update process was started. */ 372 CProgress progressInstall = guest.UpdateGuestAdditions(strSource, 373 AdditionsUpdateFlag_WaitForUpdateStartOnly); 369 374 #endif 370 375 bool fResult = guest.isOk(); -
trunk/src/VBox/Main/GuestImpl.cpp
r34368 r34398 79 79 /* Task data. */ 80 80 Utf8Str strSource; 81 ULONG uFlags; 81 82 }; 82 83 … … 417 418 if (SUCCEEDED(rc)) 418 419 { 420 /* If the caller does not want to wait for out guest update process to end, 421 * complete the progress object now so that the caller can do other work. */ 422 if (aTask->uFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly) 423 aTask->progress->notifyComplete(S_OK); 424 419 425 LogRel(("Guest Additions update is running ...\n")); 420 426 while (SUCCEEDED(progressInstaller->COMGETTER(Completed(&fCompleted)))) … … 466 472 /* Clean up */ 467 473 aTask->rc = rc; 468 aTask->progress->SetCurrentOperationProgress(99); 474 if (SUCCEEDED( aTask->progress->COMGETTER(Completed(&fCompleted))) 475 && !fCompleted) 476 aTask->progress->SetCurrentOperationProgress(99); 469 477 470 478 if ( SUCCEEDED(aTask->progress->COMGETTER(Canceled(&fCanceled))) … … 479 487 } 480 488 481 aTask->progress->notifyComplete(rc); 489 if (SUCCEEDED( aTask->progress->COMGETTER(Completed(&fCompleted))) 490 && !fCompleted) 491 aTask->progress->notifyComplete(rc); 482 492 } 483 493 else /* The task was canceled, set error code to prevent assertions. */ 484 494 { 485 495 LogRel(("Guest Additions update was canceled\n")); 486 aTask->progress->notifyComplete(VBOX_E_IPRT_ERROR, 487 COM_IIDOF(IGuest), 488 Guest::getStaticComponentName(), 489 "Automatic Guest Additions update was canceled"); 496 if (SUCCEEDED( aTask->progress->COMGETTER(Completed(&fCompleted))) 497 && !fCompleted) 498 aTask->progress->notifyComplete(VBOX_E_IPRT_ERROR, 499 COM_IIDOF(IGuest), 500 Guest::getStaticComponentName(), 501 "Automatic Guest Additions update was canceled"); 490 502 } 491 503 … … 2334 2346 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2335 2347 2336 /* Validate flags. */ 2337 if (aFlags != CopyFileFlag_None) 2338 { 2339 if ( !(aFlags & CopyFileFlag_Recursive) 2340 && !(aFlags & CopyFileFlag_Update) 2341 && !(aFlags & CopyFileFlag_FollowLinks)) 2342 { 2343 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags); 2344 } 2345 } 2348 if (aFlags != 0) /* Flags are not supported at the moment. */ 2349 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags); 2346 2350 2347 2351 HRESULT rc = S_OK; … … 2627 2631 CheckComArgOutPointerValid(aProgress); 2628 2632 2629 if (aFlags != 0) /* Flags are not supported at the moment. */2630 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags);2631 2632 2633 AutoCaller autoCaller(this); 2633 2634 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2635 2636 /* Validate flags. */ 2637 if (aFlags) 2638 { 2639 if (!(aFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly)) 2640 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags); 2641 } 2634 2642 2635 2643 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 2656 2664 * to the Guest Additions .ISO we want to mount. */ 2657 2665 task->strSource = (Utf8Str(aSource)); 2666 task->uFlags = aFlags; 2658 2667 2659 2668 rc = task->startThread(); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r34397 r34398 7767 7767 </desc> 7768 7768 7769 <const name="None" value="0">7769 <const name="None" value="0"> 7770 7770 <desc>Guest Additions are not loaded.</desc> 7771 7771 </const> 7772 <const name="System" value="1">7772 <const name="System" value="1"> 7773 7773 <desc>Guest drivers are loaded.</desc> 7774 7774 </const> 7775 <const name="Userland" value="2">7775 <const name="Userland" value="2"> 7776 7776 <desc>Common components (such as application services) are loaded.</desc> 7777 7777 </const> 7778 <const name="Desktop" value="3">7778 <const name="Desktop" value="3"> 7779 7779 <desc>Per-user desktop components are loaded.</desc> 7780 </const> 7781 </enum> 7782 7783 <enum 7784 name="AdditionsUpdateFlag" 7785 uuid="726a818d-18d6-4389-94e8-3e9e6826171a" 7786 > 7787 <desc> 7788 Guest Additions update flags. 7789 </desc> 7790 7791 <const name="None" value="0"> 7792 <desc>No flag set.</desc> 7793 </const> 7794 <const name="WaitForUpdateStartOnly" value="1"> 7795 <desc>Only wait for the update process being started and do not 7796 wait while peforming the actual update.</desc> 7780 7797 </const> 7781 7798 </enum> … … 8186 8203 <param name="flags" type="unsigned long" dir="in"> 8187 8204 <desc> 8188 Copy flags. 8205 Copy flags. Not used at the moment and must be set to 0. 8189 8206 </desc> 8190 8207 </param> … … 8283 8300 <param name="flags" type="unsigned long" dir="in"> 8284 8301 <desc> 8285 Additional flags for update process. Not used at the moment and 8286 must be set to 0. 8302 Flags for Guest Additions update. 8287 8303 </desc> 8288 8304 </param>
Note:
See TracChangeset
for help on using the changeset viewer.