VirtualBox

Changeset 80623 in vbox for trunk/include


Ignore:
Timestamp:
Sep 6, 2019 10:05:11 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133152
Message:

Shared Clipboard: Removed old protocol handling cruft on the host side and added message translation support for serving older Guest Additions. Updated docs / protocol changelog.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r80468 r80623  
    11/** @file
    2  * Shared Clipboard - Common Guest and Host Code.
     2 * Shared Clipboard - Common guest and host Code.
    33 */
    44
     
    5050#define VBOX_SHARED_CLIPBOARD_FMT_NONE          0
    5151/** Shared Clipboard format is an Unicode text. */
    52 #define VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT   UINT32_C(0x01)
     52#define VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT   RT_BIT(0)
    5353/** Shared Clipboard format is bitmap (BMP / DIB). */
    54 #define VBOX_SHARED_CLIPBOARD_FMT_BITMAP        UINT32_C(0x02)
     54#define VBOX_SHARED_CLIPBOARD_FMT_BITMAP        RT_BIT(1)
    5555/** Shared Clipboard format is HTML. */
    56 #define VBOX_SHARED_CLIPBOARD_FMT_HTML          UINT32_C(0x04)
     56#define VBOX_SHARED_CLIPBOARD_FMT_HTML          RT_BIT(2)
    5757#ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
    5858/** Shared Clipboard format is an URI list. */
    59 #define VBOX_SHARED_CLIPBOARD_FMT_URI_LIST      UINT32_C(0x08)
     59#define VBOX_SHARED_CLIPBOARD_FMT_URI_LIST      RT_BIT(3)
    6060#endif
    6161
     
    167167
    168168VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource);
     169VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource);
    169170int SharedClipboardEventRegister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);
    170171int SharedClipboardEventUnregister(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID);
     
    189190} SHAREDCLIPBOARDSOURCE;
    190191
    191 enum
    192 {
    193     /** The number of milliseconds before the clipboard times out. */
    194 #ifndef TESTCASE
    195     CLIPBOARD_TIMEOUT = 5000
    196 #else
    197     CLIPBOARD_TIMEOUT = 1
    198 #endif
    199 };
    200 
    201192/** Opaque data structure for the X11/VBox frontend/glue code. */
    202193struct _VBOXCLIPBOARDCONTEXT;
     
    208199typedef struct _CLIPBACKEND CLIPBACKEND;
    209200
    210 /** Opaque request structure for clipboard data.
     201/** Opaque request structure for X11 clipboard data.
    211202 * @todo All use of single and double underscore prefixes is banned! */
    212203struct _CLIPREADCBREQ;
     
    216207extern CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless);
    217208extern void ClipDestructX11(CLIPBACKEND *pBackend);
    218 #ifdef __cplusplus
    219 extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab = false);
    220 #else
    221209extern int ClipStartX11(CLIPBACKEND *pBackend, bool grab);
    222 #endif
    223210extern int ClipStopX11(CLIPBACKEND *pBackend);
    224 extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend,
    225                                    VBOXCLIPBOARDFORMATS vboxFormats);
    226 extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormat,
    227                                   CLIPREADCBREQ *pReq);
     211extern int ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormats);
     212extern int ClipRequestDataFromX11(CLIPBACKEND *pBackend, VBOXCLIPBOARDFORMATS vboxFormat, CLIPREADCBREQ *pReq);
    228213
    229214/* APIs exported by the X11/VBox frontend */
    230 extern int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx,
    231                                  uint32_t u32Format, void **ppv,
    232                                  uint32_t *pcb);
    233 extern void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx,
    234                                  uint32_t u32Formats);
    235 extern void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc,
    236                                            CLIPREADCBREQ *pReq, void *pv,
    237                                            uint32_t cb);
     215extern int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb);
     216extern void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats);
     217extern void ClipRequestFromX11CompleteCallback(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb);
    238218#endif /* !VBOX_INCLUDED_GuestHost_SharedClipboard_h */
     219
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r80470 r80623  
    4040 *
    4141 *     Protocol v1 (VBox >= 6.1):
    42  *         + Introduces protocol versioning and context IDs for parallel,
     42 *         + Adds protocol versioning and context IDs for parallel,
    4343 *           asynchronous transfers.
    44  *         | Keeps backwards-compatbility with protocol v0 clients.
     44 *         | Keeps backwards-compatbility with protocol v0 clients by translating
     45 *           messages to protocol v0, to not break compatibility with older
     46 *           Guest Additions (VBox < 6.1).
    4547 */
    4648
     
    9698/** Reports available clipboard format from host to the guest.
    9799 *  Formerly known as VBOX_SHARED_CLIPBOARD_HOST_MSG_REPORT_FORMATS. */
    98 #define VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_WRITE                3
    99 /** Reports available clipboard format from host to the guest. */
    100 #define VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_READ                 4
     100#define VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT               3
    101101
    102102/** Initiates a new transfer (read / write) on the guest side. */
     
    144144/** Sends a list of available formats to the host.
    145145 *  Formely known as VBOX_SHARED_CLIPBOARD_GUEST_FN_REPORT_FORMATS. */
    146 #define VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_WRITE          2
     146#define VBOX_SHARED_CLIPBOARD_GUEST_FN_FORMATS_REPORT         2
    147147/** Reads data in specified format from the host. */
    148148#define VBOX_SHARED_CLIPBOARD_GUEST_FN_DATA_READ              3
Note: See TracChangeset for help on using the changeset viewer.

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