VirtualBox

Ignore:
Timestamp:
Aug 12, 2020 5:34:49 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139869
Message:

DnD: Added wire protocol support for querying and reporting guest / host features in host service and VbglR3. Follow-up for r139856.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp

    r85714 r85722  
    605605                ASSERT_GUEST_BREAK(cParms >= 2);
    606606
    607                 VBOXDNDCBCONNECTMSGDATA data;
     607                VBOXDNDCBCONNECTDATA data;
    608608                RT_ZERO(data);
     609                data.hdr.uMagic = CB_MAGIC_DND_CONNECT;
    609610
    610611                rc = HGCMSvcGetU32(&paParms[idxParm++], &data.hdr.uContextID); \
    611612                ASSERT_GUEST_RC_BREAK(rc);
    612                 rc = HGCMSvcGetU32(&paParms[idxParm++], &data.uProtocol);
    613                 ASSERT_GUEST_RC_BREAK(rc);
    614                 rc = HGCMSvcGetU32(&paParms[idxParm], &data.uFlags);
     613                rc = HGCMSvcGetU32(&paParms[idxParm++], &data.uProtocolVersion);
     614                ASSERT_GUEST_RC_BREAK(rc);
     615                rc = HGCMSvcGetU32(&paParms[idxParm], &data.fFlags);
    615616                ASSERT_GUEST_RC_BREAK(rc);
    616617
     
    618619
    619620                /* Make sure we're only setting a protocl version we're supporting on the host. */
    620                 if (data.uProtocol > uProtocolVer)
    621                     data.uProtocol = uProtocolVer;
    622 
    623                 pClient->uProtocolVerDeprecated = data.uProtocol;
     621                if (data.uProtocolVersion > uProtocolVer)
     622                    data.uProtocolVersion = uProtocolVer;
     623
     624                pClient->uProtocolVerDeprecated = data.uProtocolVersion;
    624625
    625626                /* Return the highest protocol version we're supporting. */
    626627                AssertBreak(idxParm);
    627628                ASSERT_GUEST_BREAK(idxParm);
    628                 paParms[idxParm - 1].u.uint32 = data.uProtocol;
     629                paParms[idxParm - 1].u.uint32 = data.uProtocolVersion;
    629630
    630631                LogFlowFunc(("Client %RU32 is now using protocol v%RU32\n",
     
    638639                LogFlowFunc(("GUEST_DND_REPORT_FEATURES\n"));
    639640                rc = clientReportFeatures(pClient, callHandle, cParms, paParms);
     641                if (RT_SUCCESS(rc))
     642                {
     643                    VBOXDNDCBREPORTFEATURESDATA data;
     644                    RT_ZERO(data);
     645                    data.hdr.uMagic = CB_MAGIC_DND_REPORT_FEATURES;
     646
     647                    data.fGuestFeatures0 = pClient->fGuestFeatures0;
     648                    /* fGuestFeatures1 is not used yet. */
     649
     650                    /* Don't touch initial rc. */
     651                    int rc2 = m_SvcCtx.pfnHostCallback(m_SvcCtx.pvHostData, u32Function, &data, sizeof(data));
     652                    AssertRC(rc2);
     653                }
    640654                break;
    641655            }
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