VirtualBox

Changeset 85712 in vbox for trunk/include


Ignore:
Timestamp:
Aug 12, 2020 12:24:30 PM (4 years ago)
Author:
vboxsync
Message:

DnD: Added wire protocol support for querying and reporting guest / host features in host service and VbglR3. Untested.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r84984 r85712  
    4444 *           The guest itself uses VBOXDNDCONNECTMSG to report its supported protocol version to the DnD service.
    4545 *
    46  *     Protocol v3 (VBox 5.0.10 and up, current):
     46 *     Protocol v3 (VBox 5.0.10 and up, deprecated):
    4747 *         + Added VBOXDNDDISCONNECTMSG for being able to track client disconnects on host side (Main).
    4848 *         + Added context IDs for every HGCM message. Not used yet and must be 0.
     
    5656 *         - Removed unused HOST_DND_GH_RECV_DIR, HOST_DND_GH_RECV_FILE_DATA and HOST_DND_GH_RECV_FILE_HDR commands.
    5757 *
    58  * Protocol TODO:
    59  *
    60  *     - Split up messages which use VBOXDNDHGACTIONMSG into own functions and remove parameters which
    61  *       are not actually needed / used by a function. Why does HOST_DND_HG_EVT_MOVE need all the format stuff, for example?
     58 *     VBox 6.1.x and up, current:
     59 *         + Added GUEST_DND_QUERY_FEATURES + GUEST_DND_REPORT_FEATURES.
     60 *         - Protocol versioning support in VBOXDNDCONNECTMSG is now marked as being deprecated.
     61 *
     62 ** @todo:
     63 * - Split up messages which use VBOXDNDHGACTIONMSG into own functions and remove parameters which
     64 *   are not actually needed / used by a function. Why does HOST_DND_HG_EVT_MOVE need all the format stuff, for example?
    6265 */
    6366
     
    170173    GUEST_DND_DISCONNECT               = 11,
    171174
     175    /** Report guest side feature flags and retrieve the host ones.
     176     *
     177     * Two 64-bit parameters are passed in from the guest with the guest features
     178     * (VBOX_DND_GF_XXX), the host replies by replacing the parameter values with
     179     * the host ones (VBOX_DND_HF_XXX).
     180     *
     181     * @retval  VINF_SUCCESS on success.
     182     * @retval  VERR_INVALID_CLIENT_ID
     183     * @retval  VERR_WRONG_PARAMETER_COUNT
     184     * @retval  VERR_WRONG_PARAMETER_TYPE
     185     * @since   6.1.x
     186     */
     187    GUEST_DND_REPORT_FEATURES          = 12,
     188
     189    /** Query the host ones feature masks.
     190     *
     191     * That way the guest (client) can get hold of the features from the host.
     192     * Again, it is prudent to set the 127 bit and observe it being cleared on
     193     * success, as older hosts might return success without doing anything.
     194     *
     195     * @retval  VINF_SUCCESS on success.
     196     * @retval  VERR_INVALID_CLIENT_ID
     197     * @retval  VERR_WRONG_PARAMETER_COUNT
     198     * @retval  VERR_WRONG_PARAMETER_TYPE
     199     * @since   6.1.x
     200     */
     201    GUEST_DND_QUERY_FEATURES           = 13,
     202
    172203    /**
    173204     * The guest waits for a new message the host wants to process
     
    223254};
    224255
     256/** @name VBOX_DND_GF_XXX - Guest features.
     257 * @sa GUEST_DND_REPORT_FEATURES
     258 * @{ */
     259/** No flags set. */
     260#define VBOX_DND_GF_NONE                          0
     261/** Bit that must be set in the 2nd parameter, will be cleared if the host reponds
     262 * correctly (old hosts might not). */
     263#define VBOX_DND_GF_1_MUST_BE_ONE                 RT_BIT_64(63)
     264/** @} */
     265
     266/** @name VBOX_DND_HF_XXX - Host features.
     267 * @sa DND_GUEST_REPORT_FEATURES
     268 * @{ */
     269/** No flags set. */
     270#define VBOX_DND_HF_NONE                          0
     271/** @} */
     272
    225273/**
    226274 * DnD operation progress states.
     
    642690        struct
    643691        {
    644             /** Protocol version to use. */
     692            /** Protocol version to use.
     693             *  Deprecated since VBox 6.1.x. Do not use / rely on it anymore. */
    645694            HGCMFunctionParameter uProtocol;     /* OUT uint32_t */
    646695            /** Connection flags. Optional. */
     
    651700            /** Context ID. Unused at the moment. */
    652701            HGCMFunctionParameter uContext;     /* OUT uint32_t */
    653             /** Protocol version to use. */
     702            /** Protocol version to use.
     703             *  Deprecated since VBox 6.1.x. Do not use / rely on it anymore. */
    654704            HGCMFunctionParameter uProtocol;     /* OUT uint32_t */
    655705            /** Connection flags. Optional. */
     
    900950    /** Callback data header. */
    901951    VBOXDNDCBHEADERDATA         hdr;
     952    /** Protocol version to use.
     953     *  Deprecated since VBox 6.1.x. Do not use / rely on it anymore. */
    902954    uint32_t                    uProtocol;
    903955    uint32_t                    uFlags;
  • trunk/include/VBox/VBoxGuestLib.h

    r85371 r85712  
    11541154    /** The VM's current session ID. */
    11551155    uint64_t uSessionID;
    1156     /** Protocol version to use. */
    1157     uint32_t uProtocol;
     1156    /** Protocol version to use.
     1157     *  Deprecated; do not used / rely on it anymore. */
     1158    uint32_t uProtocolDeprecated;
     1159    /** Host feature flags (VBOX_DND_HF_XXX).
     1160     * This is set by VbglR3DnDConnect(). */
     1161    uint64_t fHostFeatures;
     1162    /** The guest feature flags reported to the host (VBOX_DND_GF_XXX).
     1163     * This is set by VbglR3DnDConnect().  */
     1164    uint64_t fGuestFeatures;
    11581165    /** Number of parameters retrieved for the current command. */
    11591166    uint32_t uNumParms;
     
    12981305VBGLR3DECL(int)     VbglR3DnDDisconnect(PVBGLR3GUESTDNDCMDCTX pCtx);
    12991306
     1307VBGLR3DECL(int)     VbglR3DnDReportFeatures(uint32_t idClient, uint64_t fGuestFeatures, uint64_t *pfHostFeatures);
     1308
    13001309VBGLR3DECL(int)     VbglR3DnDEventGetNext(PVBGLR3GUESTDNDCMDCTX pCtx, PVBGLR3DNDEVENT *ppEvent);
    13011310VBGLR3DECL(void)    VbglR3DnDEventFree(PVBGLR3DNDEVENT pEvent);
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