Changeset 97801 in vbox
- Timestamp:
- Dec 14, 2022 2:50:42 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154876
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestDnDPrivate.h
r97788 r97801 853 853 * @{ */ 854 854 bool isProgressCanceled(void) const; 855 bool isProgressRunning(void) const; 855 856 int setProgress(unsigned uPercentage, uint32_t uState, int rcOp = VINF_SUCCESS, const Utf8Str &strMsg = ""); 856 857 HRESULT resetProgress(const ComObjPtr<Guest>& pParent); -
trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp
r97798 r97801 356 356 * 357 357 * @returns VBox status code. Will get sent back to the host service. 358 * @retval VERR_NO_DATA if no new messages from the host side are available at the moment. 358 359 * @retval VERR_CANCELLED for indicating that the current operation was cancelled. 359 360 * @param uMsg HGCM message ID (function number). … … 395 396 } 396 397 398 case GUEST_DND_FN_GET_NEXT_HOST_MSG: 399 vrc = VERR_NO_DATA; /* Indicate back to the host service that there are no new messages. */ 400 break; 401 397 402 default: 398 AssertMsgBreakStmt(pThis->isProgressCanceled(), ("Transfer not cancelled (yet)!\n"), vrc = VERR_INVALID_STATE); 403 AssertMsgBreakStmt(pThis->isProgressRunning() == false, 404 ("Progress object not completed / canceld yet! State is '%s' (%#x)\n", 405 DnDStateToStr(pThis->m_enmState), pThis->m_enmState), 406 vrc = VERR_INVALID_STATE); /* Please report this! */ 399 407 vrc = VERR_CANCELLED; 400 408 break; … … 429 437 * Returns whether the progress object has been canceled or not. 430 438 * 431 * @returns \c true if canceled , \c false if not.439 * @returns \c true if canceled or progress does not exist, \c false if not. 432 440 */ 433 441 bool GuestDnDState::isProgressCanceled(void) const 434 442 { 443 if (m_pProgress.isNull()) 444 return true; 445 435 446 BOOL fCanceled; 436 if (!m_pProgress.isNull()) 437 { 438 HRESULT hr = m_pProgress->COMGETTER(Canceled)(&fCanceled); 439 AssertComRC(hr); 440 } 441 else 442 fCanceled = TRUE; 443 447 HRESULT hr = m_pProgress->COMGETTER(Canceled)(&fCanceled); 448 AssertComRCReturn(hr, false); 444 449 return RT_BOOL(fCanceled); 450 } 451 452 /** 453 * Returns whether the progress object still is in a running state or not. 454 * 455 * @returns \c true if running, \c false if not. 456 */ 457 bool GuestDnDState::isProgressRunning(void) const 458 { 459 if (m_pProgress.isNull()) 460 return false; 461 462 BOOL fRunning; 463 HRESULT hr = m_pProgress->COMGETTER(Completed)(&fRunning); 464 AssertComRCReturn(hr, false); 465 return RT_BOOL(fRunning); 445 466 } 446 467
Note:
See TracChangeset
for help on using the changeset viewer.