VirtualBox

Changeset 81174 in vbox


Ignore:
Timestamp:
Oct 9, 2019 9:06:38 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Docs.

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

Legend:

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

    r80998 r81174  
    119119int ShClSvcImplInit(void)
    120120{
    121     Log(("vboxClipboardInit\n"));
    122 
    123121    g_ctx.fTerminate = false;
    124122
     
    228226}
    229227
    230 /**
    231  * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
    232  *
    233  * @param pClient               Context information about the guest VM.
    234  * @param pCmdCtx               Command context to use for reading the data. Currently unused.
    235  * @param pData                 Data block to put read data into.
    236  * @param pcbActual             Where to write the actual size of the written data.
    237  */
    238228int ShClSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
    239229                        PSHCLDATABLOCK pData, uint32_t *pcbActual)
     
    254244}
    255245
    256 /**
    257  * Called by the HGCM clipboard subsystem when we have requested data and that data arrives.
    258  *
    259  *
    260  * @param pClient               Context information about the guest VM.
    261  * @param pCmdCtx               Command context to use for writing the data. Currently unused.
    262  * @param pData                 Data block to write to clipboard.
    263  */
    264246int ShClSvcImplWriteData(PSHCLCLIENT pClient,
    265247                         PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r80995 r81174  
    197197
    198198# ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    199 int shclSvcTransferStart(PSHCLCLIENT pClient,
    200                          SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource,
    201                          PSHCLTRANSFER *ppTransfer);
     199int shclSvcTransferStart(PSHCLCLIENT pClient, SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource, PSHCLTRANSFER *ppTransfer);
    202200int shclSvcTransferStop(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
    203201bool shclSvcTransferMsgIsAllowed(uint32_t uMode, uint32_t uMsg);
    204 # endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
     202#endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    205203
    206204/*
    207205 * Platform-dependent implementations.
    208206 */
     207/**
     208 * Called on initialization.
     209 */
    209210int ShClSvcImplInit(void);
     211/**
     212 * Called on destruction.
     213 */
    210214void ShClSvcImplDestroy(void);
    211 
     215/**
     216 * Called when a new HGCM client connects.
     217 *
     218 * @returns VBox status code.
     219 * @param   pClient             Shared Clipboard client context.
     220 * @param   fHeadless           Whether this is a headless connection or not.
     221 */
    212222int ShClSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless);
     223/**
     224 * Called when a HGCM client disconnects.
     225 *
     226 * @returns VBox status code.
     227 * @param   pClient             Shared Clipboard client context.
     228 */
    213229int ShClSvcImplDisconnect(PSHCLCLIENT pClient);
     230/**
     231 * Called when the guest reported available clipboard formats to the host OS.
     232 *
     233 * @returns VBox status code.
     234 * @param   pClient             Shared Clipboard client context.
     235 * @param   pCmdCtx             Shared Clipboard command context.
     236 * @param   pFormats            Announced formats from the guest.
     237 */
    214238int ShClSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats);
    215239/** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/
     240/**
     241 * Called when the guest wants to read host clipboard data.
     242 *
     243 * @returns VBox status code.
     244 * @param   pClient             Shared Clipboard client context.
     245 * @param   pCmdCtx             Shared Clipboard command context.
     246 * @param   pData               Where to return the read clipboard data.
     247 * @param   pcbActual           Where to return the amount of bytes read.
     248 */
    216249int ShClSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual);
     250/**
     251 * Called when the guest writes clipboard data to the host.
     252 *
     253 * @returns VBox status code.
     254 * @param   pClient             Shared Clipboard client context.
     255 * @param   pCmdCtx             Shared Clipboard command context.
     256 * @param   pData               Clipboard data from the guest.
     257 */
    217258int ShClSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);
    218259/**
    219260 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
    220261 * after a save and restore of the guest.
     262 *
     263 * @returns VBox status code.
     264 * @param   pClient             Shared Clipboard client context.
    221265 */
    222266int ShClSvcImplSync(PSHCLCLIENT pClient);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r81152 r81174  
    7878}
    7979
    80 /**
    81  * Initialise the host side of the shared clipboard.
    82  * @note  Host glue code
    83  */
    8480int ShClSvcImplInit(void)
    8581{
     
    8884}
    8985
    90 /**
    91  * Terminate the host side of the shared clipboard.
    92  * @note  host glue code
    93  */
    9486void ShClSvcImplDestroy(void)
    9587{
     
    9890
    9991/**
    100  * Connect a guest to the shared clipboard.
    101  * @note  on the host, we assume that some other application already owns
     92 * @note  On the host, we assume that some other application already owns
    10293 *        the clipboard and leave ownership to X11.
    10394 */
     
    139130}
    140131
    141 /**
    142  * Synchronise the contents of the host clipboard with the guest, called
    143  * after a save and restore of the guest.
    144  * @note  Host glue code
    145  */
    146132int ShClSvcImplSync(PSHCLCLIENT pClient)
    147133{
     
    191177}
    192178
    193 /**
    194  * VBox is taking possession of the shared clipboard.
    195  *
    196  * @param pClient               Context data for the guest system.
    197  * @param pCmdCtx               Command context to use.
    198  * @param pFormats              Clipboard formats the guest is offering.
    199  */
    200179int ShClSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
    201180                              PSHCLFORMATDATA pFormats)
     
    227206
    228207/**
    229  * Called when the host service wants to read the X11 clipboard.
    230  *
    231  * @returns VINF_SUCCESS on successful completion.
    232  * @returns VINF_HGCM_ASYNC_EXECUTE if the operation will complete asynchronously.
    233  * @returns IPRT status code on failure.
    234  *
    235  * @param pClient               Context information about the guest VM.
    236  * @param pCmdCtx               Command context to use.
    237  * @param pData                 Data block to put read data into.
    238  * @param pcbActual             Where to write the actual size of the written data.
    239  *
    240208 * @note   We always fail or complete asynchronously.
    241209 * @note   On success allocates a CLIPREADCBREQ structure which must be
    242210 *         freed in ClipCompleteDataRequestFromX11 when it is called back from
    243211 *         the backend code.
    244  *
    245212 */
    246213int ShClSvcImplReadData(PSHCLCLIENT pClient,
     
    291258}
    292259
    293 /**
    294  * Called when writing guest clipboard data to the host service.
    295  *
    296  * @param  pClient              Context information about the guest VM.
    297  * @param  pCmdCtx              Pointer to the clipboard command context.
    298  * @param  pData                Data block to write to clipboard.
    299  */
    300260int ShClSvcImplWriteData(PSHCLCLIENT pClient,
    301261                         PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)
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