VirtualBox

Changeset 100370 in vbox for trunk/src


Ignore:
Timestamp:
Jul 5, 2023 7:14:28 AM (18 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Removed ShClBackendTransferHGRootListRead(), not needed. ​​bugref:9437

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r100367 r100370  
    461461 */
    462462int 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);
    472463/** @} */
    473464#endif
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-transfers.cpp

    r100367 r100370  
    16631663            ASSERT_GUEST_RETURN(aParms[2].type == VBOX_HGCM_SVC_PARM_64BIT, VERR_WRONG_PARAMETER_TYPE); /* # Entries  */
    16641664
    1665             if (   ShClTransferGetSource(pTransfer) == SHCLSOURCE_LOCAL
    1666                 && ShClTransferGetDir(pTransfer)    == SHCLTRANSFERDIR_TO_REMOTE)
    1667             {
    1668                 rc = ShClBackendTransferHGRootListRead(pClient->pBackend, pClient, pTransfer);
    1669                 if (RT_FAILURE(rc))
    1670                     break;
    1671             }
    1672             else
    1673                 break;
    1674 
    16751665            SHCLLISTHDR rootListHdr;
    16761666            RT_ZERO(rootListHdr);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r100369 r100370  
    970970
    971971#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 */
     975int 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;
    984980}
    985981#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
     982
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r100368 r100370  
    434434                            rc = ShClTransferRootsInitFromStringList(pTransfer,
    435435                                                                     (char *)pResp->Read.pvData, pResp->Read.cbData + 1 /* Include zero terminator */);
    436                             //if (RT_SUCCESS(rc))
    437                             //    rc = ShClTransferRootListRead(pTransfer);
    438 
    439436                            if (RT_SUCCESS(rc))
    440437                                LogRel2(("Shared Clipboard: Host reported %RU64 X11 root entries for transfer to guest\n", ShClTransferRootsCount(pTransfer)));
     
    662659    return VINF_SUCCESS;
    663660}
    664 
    665 int ShClBackendTransferHGRootListRead(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    666 {
    667     RT_NOREF(pBackend);
    668 
    669 #if 1
    670     RT_NOREF(pClient, pTransfer);
    671     int rc = 0;
    672 #else
    673     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                 else
    708                     rc = VERR_NO_DATA; /* No payload. */
    709             }
    710         }
    711 
    712         ShClEventRelease(pEvent);
    713     }
    714     else
    715         rc = VERR_SHCLPB_MAX_EVENTS_REACHED;
    716 #endif
    717 
    718     LogFlowFuncLeaveRC(rc);
    719     return rc;
    720 }
    721661#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    722662
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp

    r100367 r100370  
    331331#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    332332int ShClBackendTransferHandleStatusReply(PSHCLBACKEND, PSHCLCLIENT, PSHCLTRANSFER, SHCLSOURCE, SHCLTRANSFERSTATUS, int) { return VINF_SUCCESS; }
    333 int ShClBackendTransferHGRootListRead(PSHCLBACKEND, PSHCLCLIENT, PSHCLTRANSFER) { return VINF_SUCCESS; }
    334333#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    335334
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette