VirtualBox

Changeset 82525 in vbox for trunk/include


Ignore:
Timestamp:
Dec 9, 2019 7:48:38 PM (5 years ago)
Author:
vboxsync
Message:

SharedClipboardSvc,Vbgl: Looked at the connect and feature exchange stuff. Decided to make the connect one always fail, that way the beta and rc additions should not try make use of any of the new features and we should be free to do whatever we like. Need to circle back and drop the _61B parameter count variants later. bugref:9437

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/VBoxClipboardSvc.h

    r82513 r82525  
    343343#define VBOX_SHCL_GUEST_FN_DATA_WRITE             4
    344344
    345 /** Does the actual protocol handshake.
    346  *
    347  * If this message is not being sent by the guest, the host handles that
    348  * particular client with the legacy protocol (v0).
    349  *
    350  * @retval  VINF_SUCCESS on success.
    351  * @retval  VERR_INVALID_CLIENT_ID
    352  * @retval  VERR_WRONG_PARAMETER_COUNT
    353  * @retval  VERR_WRONG_PARAMETER_TYPE
     345/** This is a left-over from the 6.1 dev cycle and will always fail.
     346 *
     347 * It used to take three 32-bit parameters, only one of which was actually used.
     348 *
     349 * It was replaced by VBOX_SHCL_GUEST_FN_REPORT_FEATURES and
     350 * VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE.
     351 *
     352 * @retval  VERR_NOT_IMPLEMENTED
    354353 * @since   6.1
    355354 */
     
    564563#define VBOX_SHCL_GUEST_FN_ERROR                  27
    565564
     565/** For negotiating a chunk size between the guest and host.
     566 *
     567 * Takes two 32-bit parameters both being byte counts, the first one gives the
     568 * maximum chunk size the guest can handle and the second the preferred choice
     569 * of the guest.  Upon return, the host will have updated both of them to
     570 * reflect the maximum and default chunk sizes this client connect.  The guest
     571 * may set the 2nd value to zero and let the host choose.
     572 *
     573 * @retval  VINF_SUCCESS on success.
     574 * @retval  VERR_INVALID_CLIENT_ID
     575 * @retval  VERR_WRONG_PARAMETER_COUNT
     576 * @retval  VERR_WRONG_PARAMETER_TYPE
     577 * @retval  VERR_INVALID_PARAMETER if the 2nd parameter is larger than the
     578 *          first one
     579 * @since   6.1
     580 */
     581#define VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE     28
     582
    566583/** The last function number (used for validation/sanity).   */
    567 #define VBOX_SHCL_GUEST_FN_LAST                   VBOX_SHCL_GUEST_FN_ERROR
     584#define VBOX_SHCL_GUEST_FN_LAST                   VBOX_SHCL_GUEST_FN_NEGOTIATE_CHUNK_SIZE
    568585/** @} */
    569586
     
    579596/** No flags set. */
    580597#define VBOX_SHCL_GF_NONE                         0
    581 /** Guest can handle context IDs (uint64_t, in paParam[0]).
    582  *  This is true for Guest Additions < 6.1. */
     598/** The guest can handle context IDs where applicable. */
    583599#define VBOX_SHCL_GF_0_CONTEXT_ID                 RT_BIT_64(0)
    584600/** Bit that must be set in the 2nd parameter, will be cleared if the host reponds
     
    592608/** No flags set. */
    593609#define VBOX_SHCL_HF_NONE                         0
     610/** The host can handle context IDs where applicable as well as the new
     611 *  message handling functions. */
     612#define VBOX_SHCL_HF_0_CONTEXT_ID                 RT_BIT_64(0)
    594613/** @} */
    595614
  • trunk/include/VBox/VBoxGuestLib.h

    r82513 r82525  
    576576 * @{ */
    577577
    578 #  ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    579 /**
    580  * Structure containing context parameters for Shared Clipboard transfers.
    581  */
    582 typedef struct VBGLR3SHCLTRANSFERCMDCTX
    583 {
    584     /** Callback table to use for all transfers. */
    585     SHCLTRANSFERCALLBACKS Callbacks;
    586 } VBGLR3SHCLTRANSFERCMDCTX, *PVBGLR3SHCLTRANSFERCMDCTX;
    587 #  endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    588 
    589578/**
    590579 * The context required for either retrieving or sending a HGCM shared clipboard
    591580 * commands from or to the host.
     581 *
     582 * @todo This struct could be handy if we want to implement a second
     583 *       communication channel, e.g. via TCP/IP. Use a union for the HGCM stuff then.
    592584 */
    593585typedef struct VBGLR3SHCLCMDCTX
    594586{
    595     /** @todo This struct could be handy if we want to implement
    596      *        a second communication channel, e.g. via TCP/IP.
    597      *        Use a union for the HGCM stuff then. */
    598 
    599     /** IN/OUT: Context ID to retrieve or to use. */
    600     uint64_t                  uContextID;
    601     /** IN: HGCM client ID to use for communication. */
    602     uint32_t                  uClientID;
    603     /** IN: Maximum chunk size (in bytes). */
    604     uint32_t                  cbChunkSize;
    605     /** IN: Host feature flags (of type VBOX_SHCL_HF_XXX). */
    606     uint64_t                  fHostFeatures;
    607     /** Flag indicating whether to use the legacy protocol (<= VBox 6.1) or not.
    608      *  This is determined in VbglR3ClipboardConnectEx(). */
    609     bool                      fUseLegacyProtocol;
     587    /** HGCM client ID to use for communication.
     588     * This is set by VbglR3ClipboardConnectEx(). */
     589    uint32_t                    idClient;
     590    /** This is @c false if both VBOX_SHCL_HF_0_CONTEXT_ID and
     591     * VBOX_SHCL_GF_0_CONTEXT_ID are set, otherwise @c true and only the old
     592     * protocol (< 6.1) should be used.
     593     * This is set by VbglR3ClipboardConnectEx(). */
     594    bool                        fUseLegacyProtocol;
     595    /** Host feature flags (VBOX_SHCL_HF_XXX).
     596     * This is set by VbglR3ClipboardConnectEx(). */
     597    uint64_t                    fHostFeatures;
     598    /** The guest feature flags reported to the host (VBOX_SHCL_GF_XXX).
     599     * This is set by VbglR3ClipboardConnectEx().  */
     600    uint64_t                    fGuestFeatures;
     601#  ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
     602    /** Default chunk size (in bytes).
     603     * This is set by VbglR3ClipboardConnectEx(). */
     604    uint32_t                    cbChunkSize;
     605    /** Max chunk size (in bytes).
     606     * This is set by VbglR3ClipboardConnectEx(). */
     607    uint32_t                    cbMaxChunkSize;
     608#  endif
     609
     610    /** The context ID - input or/and output depending on the operation. */
     611    uint64_t                    idContext;
    610612    /** OUT: Number of parameters retrieved.
    611      * @todo r=bird: s/uNumParms/cParms/ !! */
    612     uint32_t                  uNumParms;
     613     * This is set by ??. */
     614    uint32_t                    cParmsRecived;
     615
    613616#  ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    614     VBGLR3SHCLTRANSFERCMDCTX  Transfers;
     617    /** Callback table to use for all transfers. */
     618    SHCLTRANSFERCALLBACKS       Callbacks;
    615619#  endif
    616 } VBGLR3SHCLCMDCTX, *PVBGLR3SHCLCMDCTX;
     620} VBGLR3SHCLCMDCTX;
     621/** Pointer to a shared clipboard context for Vbgl. */
     622typedef VBGLR3SHCLCMDCTX *PVBGLR3SHCLCMDCTX;
    617623
    618624/**
     
    680686VBGLR3DECL(int)     VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats);
    681687
    682 VBGLR3DECL(int)     VbglR3ClipboardConnectEx(PVBGLR3SHCLCMDCTX pCtx);
     688VBGLR3DECL(int)     VbglR3ClipboardConnectEx(PVBGLR3SHCLCMDCTX pCtx, uint64_t fGuestFeatures);
    683689VBGLR3DECL(int)     VbglR3ClipboardDisconnectEx(PVBGLR3SHCLCMDCTX pCtx);
    684690
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