VirtualBox

Changeset 19841 in vbox


Ignore:
Timestamp:
May 19, 2009 7:27:30 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47502
Message:

HostServices/SharedClipboard: added asynchronous processing for reading the host clipboard

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h

    r18633 r19841  
    5151
    5252    struct {
     53        VBOXHGCMCALLHANDLE callHandle;
     54        VBOXHGCMSVCPARM *paParms;
     55    } asyncRead;
     56
     57    struct {
    5358         void *pv;
    5459         uint32_t cb;
     
    6873
    6974void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats);
     75
     76/** Complete a request from the guest for clipboard data that we decided
     77 * to handle asynchronously. */
     78void vboxSvcClipboardCompleteReadData(VBOXHGCMCALLHANDLE callHandle, VBOXHGCMSVCPARM *paParms, int rc, uint32_t cbActual);
    7079
    7180
  • trunk/src/VBox/HostServices/SharedClipboard/service.cpp

    r13860 r19841  
    495495                        else
    496496                        {
     497                            pClient->asyncRead.callHandle = callHandle;
     498                            pClient->asyncRead.paParms = paParms;
    497499                            rc = vboxClipboardReadData (pClient, u32Format, pv, cb, &cbActual);
    498500                        }
    499501
    500                         if (RT_SUCCESS (rc))
     502                        if (rc == VINF_HGCM_ASYNC_EXECUTE)
     503                            fAsynchronousProcessing = true;
     504                        else if (RT_SUCCESS (rc))
    501505                        {
    502506                            VBoxHGCMParmUInt32Set (&paParms[2], cbActual);
     
    574578        g_pHelpers->pfnCallComplete (callHandle, rc);
    575579    }
     580}
     581
     582void vboxSvcClipboardCompleteReadData(VBOXHGCMCALLHANDLE callHandle, VBOXHGCMSVCPARM *paParms, int rc, uint32_t cbActual)
     583{
     584    VBoxHGCMParmUInt32Set (&paParms[2], cbActual);
     585    g_pHelpers->pfnCallComplete (callHandle, rc);
    576586}
    577587
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