VirtualBox

Changeset 82527 in vbox for trunk/include


Ignore:
Timestamp:
Dec 10, 2019 1:46:40 AM (5 years ago)
Author:
vboxsync
Message:

SharedClipboardSvc,Vbgl: Worked over the host messages, taking locks when needed, not using C++ lists and a bunch of other simplifications. bugref:9437

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r82513 r82527  
    157157    RTLISTNODE          Node;
    158158    /** The event's ID, for self-reference. */
    159     SHCLEVENTID         uID;
     159    SHCLEVENTID         idEvent;
    160160    /** Event semaphore for signalling the event. */
    161     RTSEMEVENT          hEventSem;
     161    RTSEMEVENTMULTI     hEvtMulSem;
    162162    /** Payload to this event, optional (NULL). */
    163163    PSHCLEVENTPAYLOAD   pPayload;
     
    177177    SHCLEVENTSOURCEID uID;
    178178    /** Next upcoming event ID. */
    179     SHCLEVENTID       uEventIDNext;
     179    SHCLEVENTID       idNextEvent;
    180180    /** List of events (PSHCLEVENT). */
    181181    RTLISTANCHOR      lstEvents;
     
    202202 *  @{
    203203 */
     204SHCLEVENTID ShClEventIdGenerateAndRegister(PSHCLEVENTSOURCE pSource);
    204205SHCLEVENTID ShClEventIDGenerate(PSHCLEVENTSOURCE pSource);
    205206SHCLEVENTID ShClEventGetLast(PSHCLEVENTSOURCE pSource);
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r82526 r82527  
    114114/** Returned only when the HGCM client session is closed (by different thread).
    115115 *
    116  * This can require no futher host interaction has session has been closed.
     116 * This can require no futher host interaction since the session has been
     117 * closed.
     118 *
     119 * @since 1.3.2
    117120 */
    118121#define VBOX_SHCL_HOST_MSG_QUIT                             1
    119122/** Request data for a specific format from the guest.
    120123 *
    121  * This takes one parameter (in addition to the message number), a 32-bit
     124 * Two parameters, first the 32-bit message ID followed by a a 32-bit
    122125 * format bit (VBOX_SHCL_FMT_XXX).  The guest will respond by issuing a
    123  * VBOX_SHCL_GUEST_F_DATA_WRITE.
     126 * VBOX_SHCL_GUEST_FN_DATA_WRITE.
     127 *
     128 * @note  The host may sometimes incorrectly set more than one format bit, in
     129 *        which case it's up to the guest to pick which to write back.
     130 * @since 1.3.2
    124131 */
    125132#define VBOX_SHCL_HOST_MSG_READ_DATA                        2
    126 /** Reports available clipboard format from host to the guest.
    127  *  Formerly known as VBOX_SHCL_HOST_MSG_REPORT_FORMATS. */
     133/** Reports available clipboard format on the host to the guest.
     134 *
     135 * Two parameters, first the 32-bit message ID followed by a 32-bit format mask
     136 * containing zero or more VBOX_SHCL_FMT_XXX flags.  The guest is not require to
     137 * respond to the host when receiving this message.
     138 *
     139 * @since 1.3.2
     140 */
    128141#define VBOX_SHCL_HOST_MSG_FORMATS_REPORT                   3
    129142/** Message PEEK or GET operation was canceled, try again.
     143 *
     144 * This is returned by VBOX_SHCL_GUEST_FN_MSG_PEEK_WAIT and
     145 * VBOX_SHCL_GUEST_FN_MSG_OLD_GET_WAIT in response to the guest calling
     146 * VBOX_SHCL_GUEST_FN_MSG_CANCEL.  The 2nd parameter is set to zero (be it
     147 * thought of as a parameter count or a format mask).
     148 *
    130149 * @since   6.1.0
    131150 */
    132151#define VBOX_SHCL_HOST_MSG_CANCELED                         4
     152
     153/** Request data for a specific format from the guest with context ID.
     154 *
     155 * This is send instead of the VBOX_SHCL_HOST_MSG_READ_DATA message to guest
     156 * that advertises VBOX_SHCL_GF_0_CONTEXT_ID.  The first parameter is a 64-bit
     157 * context ID which is to be used when issuing VBOX_SHCL_GUEST_F_DATA_WRITE, and
     158 * the second parameter is a 32-bit format bit (VBOX_SHCL_FMT_XXX).  The guest
     159 * will respond by issuing a VBOX_SHCL_GUEST_F_DATA_WRITE.
     160 *
     161 * @note  The host may sometimes incorrectly set more than one format bit, in
     162 *        which case it's up to the guest to pick which to write back.
     163 * @since 6.3.2
     164 */
     165#define VBOX_SHCL_HOST_MSG_READ_DATA_CID                    5
    133166
    134167/** Sends a transfer status to the guest side.
     
    710743#define VBOX_SHCL_CPARMS_REPORT_FORMATS_61B 3   /**< The 6.1 dev cycle variant, see VBOX_SHCL_GUEST_FN_REPORT_FORMATS. */
    711744/** @} */
    712 /**
    713  * Reports available formats.
    714  */
    715 typedef struct _VBoxShClFormatsMsg
    716 {
    717     VBGLIOCHGCMCALL hdr;
    718 
    719     union
    720     {
    721         struct
    722         {
    723             /** uint32_t, out:  VBOX_SHCL_FMT_*. */
    724             HGCMFunctionParameter uFormats;
    725         } v0;
    726 
    727         struct
    728         {
    729             /** uint64_t, out: Context ID. */
    730             HGCMFunctionParameter uContext;
    731             /** uint32_t, out: VBOX_SHCL_FMT_*. */
    732             HGCMFunctionParameter uFormats;
    733             /** uint32_t, out: Format flags. */
    734             HGCMFunctionParameter fFlags;
    735         } v1;
    736     } u;
    737 } VBoxShClFormatsMsg;
    738 
    739 /**
    740  * Requests to read clipboard data.
    741  */
    742 typedef struct _VBoxShClReadDataReqMsg
    743 {
    744     VBGLIOCHGCMCALL hdr;
    745 
    746     /** uint64_t, out: Context ID. */
    747     HGCMFunctionParameter uContext;
    748     /** uint32_t, out: Request flags; currently unused and must be set to 0. */
    749     HGCMFunctionParameter fFlags;
    750     /** uint32_t, out: Requested format to read data in. */
    751     HGCMFunctionParameter uFormat;
    752     /** uint32_t, out: Maximum size (in bytes) to read. */
    753     HGCMFunctionParameter cbSize;
    754 } VBoxShClReadDataReqMsg;
    755 
    756 #define VBOX_SHCL_CPARMS_READ_DATA_REQ 4
    757745
    758746/** @name VBOX_SHCL_GUEST_FN_DATA_READ
  • trunk/include/VBox/VBoxGuestLib.h

    r82525 r82527  
    624624/**
    625625 * Enumeration specifying a Shared Clipboard event type.
     626 * @todo r=bird: Surely, this isn't necessary?!
    626627 */
    627628typedef enum _VBGLR3CLIPBOARDEVENTTYPE
     
    657658        SHCLFORMATDATA       ReportedFormats;
    658659        /** Reports that data needs to be read from the guest. */
    659         SHCLDATAREQ          ReadData;
     660        SHCLFORMAT           fReadData;
    660661#  ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    661662        /** Reports a transfer status to the guest. */
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