VirtualBox

Ignore:
Timestamp:
Jan 27, 2021 5:11:25 PM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: More code for HTTP transfers. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/SharedClipboard-x11.h

    r87082 r87452  
    3535
    3636#include <VBox/GuestHost/SharedClipboard.h>
     37#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
     38# include <VBox/GuestHost/SharedClipboard-transfers.h>
     39#endif
    3740
    3841/** Enables the Xt busy / update handling. */
     
    105108#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    106109    /** The best HTML format X11 has to offer, as an index into the formats table. */
    107     SHCLX11FMTIDX idxFmtURI;
     110    SHCLX11FMTIDX   idxFmtURI;
     111# ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
     112    /** HTTP transfer context data. */
     113    SHCLHTTPCONTEXT HttpCtx;
     114# endif
    108115#endif
    109116    /** What kind of formats does VBox have to offer? */
     
    148155 *  @{
    149156 */
    150 DECLCALLBACK(int)  ShClX11RequestDataForX11Callback(SHCLCONTEXT *pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb);
    151 DECLCALLBACK(void) ShClX11ReportFormatsCallback(SHCLCONTEXT *pCtx, SHCLFORMATS fFormats);
    152 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
     157/**
     158 * Callback for reading clipboard data from the guest.
     159 * The function will be invoked for every single target the clipboard requests.
     160 *
     161 * @note Runs in Xt event thread.
     162 *
     163 * @returns VBox status code. VERR_NO_DATA if no data available.
     164 * @param   pCtx                Pointer to the host clipboard structure.
     165 * @param   uFmt                The format in which the data should be transferred
     166 *                              (VBOX_SHCL_FMT_XXX).
     167 * @param   ppv                 Returns an allocated buffer with data read from the guest on success.
     168 *                              Needs to be free'd with RTMemFree() by the caller.
     169 * @param   pcb                 Returns the amount of data read (in bytes) on success.
     170 */
     171DECLCALLBACK(int)  ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb);
     172
     173/**
     174 * Reports formats available in the X11 clipboard to VBox.
     175 *
     176 * @note   Runs in Xt event thread.
     177 *
     178 * @param  pCtx                 Opaque context pointer for the glue code.
     179 * @param  fFormats             The formats available.
     180 */
     181DECLCALLBACK(void) ShClX11ReportFormatsCallback(PSHCLCONTEXT pCtx, SHCLFORMATS fFormats);
     182
     183/**
     184 * Called by the backend to tell us that a request for data from X11 has completed.
     185 *
     186 * @param  pCtx                 Our context information.
     187 * @param  rcCompletion         The completion status of the request.
     188 * @param  pReq                 The request structure that we passed in when we started
     189 *                              the request.  We RTMemFree() this in this function.
     190 * @param  pv                   The clipboard data returned from X11 if the request succeeded (see @a rcCompletion).
     191 * @param  cb                   The size of the data in @a pv.
     192 */
     193DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
    153194/** @} */
    154195
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