VirtualBox

Changeset 100378 in vbox


Ignore:
Timestamp:
Jul 5, 2023 9:04:11 AM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Installed Windows host callbacks for reading the host root list. ​​bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r100375 r100378  
    6161
    6262/*********************************************************************************************************************************
    63 *   Internal Functions                                                                                                           *
     63*   Structures and Typedefs                                                                                                      *
    6464*********************************************************************************************************************************/
    65 static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx);
    66 
     65/**
     66 * Global context information used by the host glue for the X11 clipboard backend.
     67 */
    6768struct SHCLCONTEXT
    6869{
     
    7475    SHCLWINCTX                 Win;
    7576};
     77
     78
     79/*********************************************************************************************************************************
     80*   Prototypes                                                                                                                   *
     81*********************************************************************************************************************************/
     82static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx);
     83
     84#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
     85static DECLCALLBACK(int) shClSvcWinTransferIfaceHGRootListRead(PSHCLTXPROVIDERCTX pCtx);
     86#endif
    7687
    7788
     
    245256        case SHCLTRANSFERDIR_FROM_REMOTE: /* Guest -> Host. */
    246257        {
    247             /** @todo BUGBUG */
     258            pIface->pfnRootListRead  = shClSvcTransferIfaceGHRootListRead;
     259
     260            pIface->pfnListOpen      = shClSvcTransferIfaceGHListOpen;
     261            pIface->pfnListClose     = shClSvcTransferIfaceGHListClose;
     262            pIface->pfnListHdrRead   = shClSvcTransferIfaceGHListHdrRead;
     263            pIface->pfnListEntryRead = shClSvcTransferIfaceGHListEntryRead;
     264
     265            pIface->pfnObjOpen       = shClSvcTransferIfaceGHObjOpen;
     266            pIface->pfnObjClose      = shClSvcTransferIfaceGHObjClose;
     267            pIface->pfnObjRead       = shClSvcTransferIfaceGHObjRead;
    248268            break;
    249269        }
     
    251271        case SHCLTRANSFERDIR_TO_REMOTE: /* Host -> Guest. */
    252272        {
    253             /** @todo BUGBUG */
     273            pIface->pfnRootListRead  = shClSvcWinTransferIfaceHGRootListRead;
    254274            break;
    255275        }
     
    724744}
    725745
    726 /*
    727  * Public platform dependent functions.
    728  */
    729 
     746
     747/*********************************************************************************************************************************
     748*   Backend implementation                                                                                                       *
     749*********************************************************************************************************************************/
    730750int ShClBackendInit(PSHCLBACKEND pBackend, VBOXHGCMSVCFNTABLE *pTable)
    731751{
     
    10311051    return VINF_SUCCESS;
    10321052}
     1053
     1054
     1055/*********************************************************************************************************************************
     1056*   Provider interface implementation                                                                                            *
     1057*********************************************************************************************************************************/
     1058
     1059/** @copydoc SHCLTXPROVIDERIFACE::pfnRootListRead */
     1060static DECLCALLBACK(int) shClSvcWinTransferIfaceHGRootListRead(PSHCLTXPROVIDERCTX pCtx)
     1061{
     1062    LogFlowFuncEnter();
     1063
     1064    PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser;
     1065    AssertPtr(pClient);
     1066
     1067    AssertPtr(pClient->State.pCtx);
     1068    PSHCLWINCTX pWin = &pClient->State.pCtx->Win;
     1069
     1070    int rc = SharedClipboardWinTransferGetRootsFromClipboard(pWin, pCtx->pTransfer);
     1071
     1072    LogFlowFuncLeaveRC(rc);
     1073    return rc;
     1074}
    10331075#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    10341076
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