VirtualBox

Ignore:
Timestamp:
Aug 27, 2019 5:47:44 PM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Added protocol versioning support plus enhanced versions of existing commands (to also provide context IDs, among other stuff). So far only the host service(s) and the Windows guest is using the new(er) protocol.

File:
1 edited

Legend:

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

    r79036 r80444  
    5454  * Enable the shared clipboard - called by the hgcm clipboard subsystem.
    5555  *
    56   * @param   pClientData    Structure containing context information about the guest system
    57   * @param   fHeadless      Whether headless.
    5856  * @returns RT status code
     57  * @param   pClient            Structure containing context information about the guest system
     58  * @param   fHeadless          Whether headless.
    5959  */
    60 int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENTDATA pClientData, bool fHeadless)
     60int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDCLIENT pClient, bool fHeadless)
    6161{
    62     RT_NOREF(pClientData, fHeadless);
     62    RT_NOREF(pClient, fHeadless);
    6363    LogFlowFunc(("called, returning VINF_SUCCESS\n"));
    6464    return VINF_SUCCESS;
     
    6969 * after a save and restore of the guest.
    7070 */
    71 int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENTDATA /* pClientData */)
     71int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDCLIENT pClient)
    7272{
     73    RT_NOREF(pClient);
    7374    LogFlowFunc(("called, returning VINF_SUCCESS\n"));
    7475    return VINF_SUCCESS;
     
    7879 * Shut down the shared clipboard subsystem and "disconnect" the guest.
    7980 *
    80  * @param   pClientData    Structure containing context information about the guest system
     81 * @param   pClient         Structure containing context information about the guest system
    8182 */
    82 int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENTDATA pClientData)
     83int VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDCLIENT pClient)
    8384{
    84     RT_NOREF(pClientData);
     85    RT_NOREF(pClient);
    8586    return VINF_SUCCESS;
    8687}
     
    9091 * subsystem.
    9192 *
    92  * @param pClientData           Context data for the guest system
    93  * @param u32Formats            Clipboard formats the guest is offering
     93 * @param pClient               Context data for the guest system.
     94 * @param pCmdCtx               Command context to use.
     95 * @param pFormats              Clipboard formats the guest is offering.
    9496 */
    95 int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENTDATA pClientData, uint32_t u32Formats)
     97int VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
     98                                       PSHAREDCLIPBOARDFORMATDATA pFormats)
    9699{
    97     RT_NOREF(pClientData, u32Formats);
     100    RT_NOREF(pClient, pCmdCtx, pFormats);
    98101    return VINF_SUCCESS;
    99102}
     
    102105 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
    103106 *
    104  * @param pClientData   Context information about the guest VM
    105  * @param u32Format     The format that the guest would like to receive the data in
    106  * @param pv            Where to write the data to
    107  * @param cb            The size of the buffer to write the data to
    108  * @param pcbActual     Where to write the actual size of the written data
     107 * @param pClient       Context information about the guest VM
     108 * @param pCmdCtx       Command context to use.
     109 * @param pData         Data block to put read data into.
    109110 */
    110 int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENTDATA pClientData, uint32_t u32Format,
    111                                  void *pv, uint32_t cb, uint32_t *pcbActual)
     111int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
     112                                 PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)
    112113{
    113     RT_NOREF(pClientData, u32Format, pv, cb);
    114     LogFlowFunc(("called, returning VINF_SUCCESS\n"));
     114    RT_NOREF(pClient, pCmdCtx, pData);
     115
    115116    /* No data available. */
    116117    *pcbActual = 0;
     118
    117119    return VINF_SUCCESS;
    118120}
    119121
    120 int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENTDATA pClientData, void *pv, uint32_t cb,
    121                                   uint32_t u32Format)
     122int VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,
     123                                  PSHAREDCLIPBOARDDATABLOCK pData)
    122124{
    123     RT_NOREF(pClientData, pv, cb, u32Format);
     125    RT_NOREF(pClient, pCmdCtx, pData);
    124126    return VERR_NOT_IMPLEMENTED;
    125127}
    126128
    127129#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    128 int VBoxClipboardSvcImplURIReadDir(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDDIRDATA pDirData)
     130int VBoxClipboardSvcImplURIReadDir(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)
    129131{
    130     RT_NOREF(pClientData, pDirData);
     132    RT_NOREF(pClient, pDirData);
    131133    return VERR_NOT_IMPLEMENTED;
    132134}
    133135
    134 int VBoxClipboardSvcImplURIWriteDir(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDDIRDATA pDirData)
     136int VBoxClipboardSvcImplURIWriteDir(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)
    135137{
    136     RT_NOREF(pClientData, pDirData);
     138    RT_NOREF(pClient, pDirData);
    137139    return VERR_NOT_IMPLEMENTED;
    138140}
    139141
    140 int VBoxClipboardSvcImplURIReadFileHdr(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDFILEHDR pFileHdr)
     142int VBoxClipboardSvcImplURIReadFileHdr(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)
    141143{
    142     RT_NOREF(pClientData, pFileHdr);
     144    RT_NOREF(pClient, pFileHdr);
    143145    return VERR_NOT_IMPLEMENTED;
    144146}
    145147
    146 int VBoxClipboardSvcImplURIWriteFileHdr(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDFILEHDR pFileHdr)
     148int VBoxClipboardSvcImplURIWriteFileHdr(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)
    147149{
    148     RT_NOREF(pClientData, pFileHdr);
     150    RT_NOREF(pClient, pFileHdr);
    149151    return VERR_NOT_IMPLEMENTED;
    150152}
    151153
    152 int VBoxClipboardSvcImplURIReadFileData(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDFILEDATA pFileData)
     154int VBoxClipboardSvcImplURIReadFileData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)
    153155{
    154     RT_NOREF(pClientData, pFileData);
     156    RT_NOREF(pClient, pFileData);
    155157    return VERR_NOT_IMPLEMENTED;
    156158}
    157159
    158 int VBoxClipboardSvcImplURIWriteFileData(PVBOXCLIPBOARDCLIENTDATA pClientData, PVBOXCLIPBOARDFILEDATA pFileData)
     160int VBoxClipboardSvcImplURIWriteFileData(PVBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)
    159161{
    160     RT_NOREF(pClientData, pFileData);
     162    RT_NOREF(pClient, pFileData);
    161163    return VERR_NOT_IMPLEMENTED;
    162164}
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