- Timestamp:
- Jul 5, 2023 7:14:28 AM (18 months ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r100367 r100370 461 461 */ 462 462 int ShClBackendTransferHandleStatusReply(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer, SHCLSOURCE enmSource, SHCLTRANSFERSTATUS enmStatus, int rcStatus); 463 /**464 * Called when the guest wants to read the transfer roots.465 *466 * @returns VBox status code.467 * @param pBackend Shared Clipboard backend to use.468 * @param pClient Shared Clipboard client context.469 * @param pTransfer Shared Clipboard transfer to get roots for.470 */471 int ShClBackendTransferHGRootListRead(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);472 463 /** @} */ 473 464 #endif -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-transfers.cpp
r100367 r100370 1663 1663 ASSERT_GUEST_RETURN(aParms[2].type == VBOX_HGCM_SVC_PARM_64BIT, VERR_WRONG_PARAMETER_TYPE); /* # Entries */ 1664 1664 1665 if ( ShClTransferGetSource(pTransfer) == SHCLSOURCE_LOCAL1666 && ShClTransferGetDir(pTransfer) == SHCLTRANSFERDIR_TO_REMOTE)1667 {1668 rc = ShClBackendTransferHGRootListRead(pClient->pBackend, pClient, pTransfer);1669 if (RT_FAILURE(rc))1670 break;1671 }1672 else1673 break;1674 1675 1665 SHCLLISTHDR rootListHdr; 1676 1666 RT_ZERO(rootListHdr); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r100369 r100370 970 970 971 971 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 972 int ShClBackendTransferHGRootListRead(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer) 973 { 974 RT_NOREF(pBackend); 975 976 LogFlowFuncEnter(); 977 978 const PSHCLWINCTX pWinCtx = &pClient->State.pCtx->Win; 979 980 int rc = SharedClipboardWinTransferGetRootsFromClipboard(pWinCtx, pTransfer); 981 982 LogFlowFuncLeaveRC(rc); 983 return rc; 972 /** 973 * Handles transfer status replies from the guest. 974 */ 975 int ShClBackendTransferHandleStatusReply(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer, SHCLSOURCE enmSource, SHCLTRANSFERSTATUS enmStatus, int rcStatus) 976 { 977 RT_NOREF(pBackend, pClient, pTransfer, enmSource, enmStatus, rcStatus); 978 979 return VINF_SUCCESS; 984 980 } 985 981 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */ 982 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r100368 r100370 434 434 rc = ShClTransferRootsInitFromStringList(pTransfer, 435 435 (char *)pResp->Read.pvData, pResp->Read.cbData + 1 /* Include zero terminator */); 436 //if (RT_SUCCESS(rc))437 // rc = ShClTransferRootListRead(pTransfer);438 439 436 if (RT_SUCCESS(rc)) 440 437 LogRel2(("Shared Clipboard: Host reported %RU64 X11 root entries for transfer to guest\n", ShClTransferRootsCount(pTransfer))); … … 662 659 return VINF_SUCCESS; 663 660 } 664 665 int ShClBackendTransferHGRootListRead(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)666 {667 RT_NOREF(pBackend);668 669 #if 1670 RT_NOREF(pClient, pTransfer);671 int rc = 0;672 #else673 LogFlowFuncEnter();674 675 PSHCLEVENT pEvent;676 int rc = ShClEventSourceGenerateAndRegisterEvent(&pClient->EventSrc, &pEvent);677 if (RT_SUCCESS(rc))678 {679 rc = ShClX11ReadDataFromX11Async(&pClient->State.pCtx->X11, VBOX_SHCL_FMT_URI_LIST, UINT32_MAX, pEvent);680 if (RT_SUCCESS(rc))681 {682 /* X supplies the data asynchronously, so we need to wait for data to arrive first. */683 PSHCLEVENTPAYLOAD pPayload;684 rc = ShClEventWait(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);685 if (RT_SUCCESS(rc))686 {687 if (pPayload)688 {689 Assert(pPayload->cbData == sizeof(SHCLX11RESPONSE));690 AssertPtr(pPayload->pvData);691 PSHCLX11RESPONSE pResp = (PSHCLX11RESPONSE)pPayload->pvData;692 693 rc = ShClTransferRootsInitFromStringList(pTransfer,694 (char *)pResp->Read.pvData, pResp->Read.cbData + 1 /* Include zero terminator */);695 if (RT_SUCCESS(rc))696 rc = ShClTransferRootListRead(pTransfer);697 698 if (RT_SUCCESS(rc))699 LogRel2(("Shared Clipboard: Host reported %RU64 X11 root entries for transfer to guest\n", ShClTransferRootsCount(pTransfer)));700 701 RTMemFree(pResp->Read.pvData);702 pResp->Read.cbData = 0;703 704 ShClPayloadFree(pPayload);705 pPayload = NULL;706 }707 else708 rc = VERR_NO_DATA; /* No payload. */709 }710 }711 712 ShClEventRelease(pEvent);713 }714 else715 rc = VERR_SHCLPB_MAX_EVENTS_REACHED;716 #endif717 718 LogFlowFuncLeaveRC(rc);719 return rc;720 }721 661 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */ 722 662 -
trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
r100367 r100370 331 331 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 332 332 int ShClBackendTransferHandleStatusReply(PSHCLBACKEND, PSHCLCLIENT, PSHCLTRANSFER, SHCLSOURCE, SHCLTRANSFERSTATUS, int) { return VINF_SUCCESS; } 333 int ShClBackendTransferHGRootListRead(PSHCLBACKEND, PSHCLCLIENT, PSHCLTRANSFER) { return VINF_SUCCESS; }334 333 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */ 335 334
Note:
See TracChangeset
for help on using the changeset viewer.