VirtualBox

Changeset 82846 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 24, 2020 9:36:52 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Renaming. bugref:9437

Location:
trunk/src/VBox
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r82689 r82846  
    161161        /* The IDataObject *must* be created on the same thread as our (proxy) window, so post a message to it
    162162         * to do the stuff for us. */
    163         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pTransfer->Events);
    164 
    165         rc = ShClEventRegister(&pTransfer->Events, uEvent);
     163        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pTransfer->Events);
     164
     165        rc = ShClEventRegister(&pTransfer->Events, idEvent);
    166166        if (RT_SUCCESS(rc))
    167167        {
    168168            /* Don't want to rely on SendMessage (synchronous) here, so just post and wait the event getting signalled. */
    169             ::PostMessage(pCtx->Win.hWnd, SHCL_WIN_WM_TRANSFER_START, (WPARAM)pTransfer, (LPARAM)uEvent);
     169            ::PostMessage(pCtx->Win.hWnd, SHCL_WIN_WM_TRANSFER_START, (WPARAM)pTransfer, (LPARAM)idEvent);
    170170
    171171            PSHCLEVENTPAYLOAD pPayload;
    172             rc = ShClEventWait(&pTransfer->Events, uEvent, 30 * 1000 /* Timeout in ms */, &pPayload);
     172            rc = ShClEventWait(&pTransfer->Events, idEvent, 30 * 1000 /* Timeout in ms */, &pPayload);
    173173            if (RT_SUCCESS(rc))
    174174            {
     
    179179            }
    180180
    181             ShClEventUnregister(&pTransfer->Events, uEvent);
     181            ShClEventUnregister(&pTransfer->Events, idEvent);
    182182        }
    183183    }
     
    671671            AssertPtr(pTransfer);
    672672
    673             const SHCLEVENTID uEvent = (SHCLEVENTID)lParam;
     673            const SHCLEVENTID idEvent = (SHCLEVENTID)lParam;
    674674
    675675            Assert(ShClTransferGetSource(pTransfer) == SHCLSOURCE_REMOTE); /* Sanity. */
     
    678678
    679679            PSHCLEVENTPAYLOAD pPayload = NULL;
    680             int rc = ShClPayloadAlloc(uEvent, &rcTransfer, sizeof(rcTransfer), &pPayload);
     680            int rc = ShClPayloadAlloc(idEvent, &rcTransfer, sizeof(rcTransfer), &pPayload);
    681681            if (RT_SUCCESS(rc))
    682682            {
    683                 rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     683                rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    684684                if (RT_FAILURE(rc))
    685685                    ShClPayloadFree(pPayload);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp

    r82527 r82846  
    208208#endif
    209209
    210     return ShClSvcDataReadRequest(pClient, pFormats->Formats, NULL /* puEvent */);
     210    return ShClSvcDataReadRequest(pClient, pFormats->Formats, NULL /* pidEvent */);
    211211}
    212212
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r82527 r82846  
    251251 * @{
    252252 */
    253 int ShClSvcDataReadRequest(PSHCLCLIENT pClient, SHCLFORMAT fFormat, PSHCLEVENTID puEvent);
     253int ShClSvcDataReadRequest(PSHCLCLIENT pClient, SHCLFORMAT fFormat, PSHCLEVENTID pidEvent);
    254254int ShClSvcDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);
    255255int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-transfers.cpp

    r82527 r82846  
    125125    if (pMsgHdr)
    126126    {
    127         SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     127        SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    128128
    129129        HGCMSvcSetU64(&pMsgHdr->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    130                                                                      pCtx->pTransfer->State.uID, uEvent));
     130                                                                     pCtx->pTransfer->State.uID, idEvent));
    131131        HGCMSvcSetU32(&pMsgHdr->paParms[1], 0 /* fRoots */);
    132132
     
    134134        if (RT_SUCCESS(rc))
    135135        {
    136             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     136            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    137137            AssertRC(rc2);
    138138
     
    141141            {
    142142                PSHCLEVENTPAYLOAD pPayloadHdr;
    143                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent,
     143                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent,
    144144                                              pCtx->pTransfer->uTimeoutMs, &pPayloadHdr);
    145145                if (RT_SUCCESS(rc))
     
    165165                                                                               VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY_READ_REQ);
    166166
    167                                     uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     167                                    idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    168168
    169169                                    HGCMSvcSetU64(&pMsgEntry->paParms[0],
    170170                                                  VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uClientID,
    171                                                                                        pCtx->pTransfer->State.uID, uEvent));
     171                                                                                       pCtx->pTransfer->State.uID, idEvent));
    172172                                    HGCMSvcSetU32(&pMsgEntry->paParms[1], 0 /* fRoots */);
    173173                                    HGCMSvcSetU32(&pMsgEntry->paParms[2], i /* uIndex */);
    174174
    175                                     rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     175                                    rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    176176                                    AssertRC(rc2);
    177177
     
    181181
    182182                                    PSHCLEVENTPAYLOAD pPayloadEntry;
    183                                     rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent,
     183                                    rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent,
    184184                                                       pCtx->pTransfer->uTimeoutMs, &pPayloadEntry);
    185185                                    if (RT_FAILURE(rc))
     
    193193                                    ShClPayloadFree(pPayloadEntry);
    194194
    195                                     ShClEventUnregister(&pCtx->pTransfer->Events, uEvent);
     195                                    ShClEventUnregister(&pCtx->pTransfer->Events, idEvent);
    196196
    197197                                    if (RT_FAILURE(rc))
     
    220220            }
    221221
    222             ShClEventUnregister(&pCtx->pTransfer->Events, uEvent);
     222            ShClEventUnregister(&pCtx->pTransfer->Events, idEvent);
    223223        }
    224224    }
     
    244244    if (pMsg)
    245245    {
    246         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     246        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    247247
    248248        pMsg->Ctx.uContextID = VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID, pCtx->pTransfer->State.uID,
    249                                                         uEvent);
     249                                                        idEvent);
    250250
    251251        rc = shClSvcTransferSetListOpen(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, pOpenParms);
     
    255255            if (RT_SUCCESS(rc))
    256256            {
    257                 int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     257                int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    258258                AssertRC(rc2);
    259259
     
    262262                {
    263263                    PSHCLEVENTPAYLOAD pPayload;
    264                     rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     264                    rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    265265                    if (RT_SUCCESS(rc))
    266266                    {
     
    280280                }
    281281
    282                 ShClEventUnregister(&pCtx->pTransfer->Events, uEvent);
     282                ShClEventUnregister(&pCtx->pTransfer->Events, idEvent);
    283283            }
    284284        }
     
    304304    if (pMsg)
    305305    {
    306         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     306        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    307307
    308308        pMsg->Ctx.uContextID = VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID, pCtx->pTransfer->State.uID,
    309                                                         uEvent);
     309                                                        idEvent);
    310310
    311311        rc = shClSvcTransferSetListClose(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, hList);
     
    315315            if (RT_SUCCESS(rc))
    316316            {
    317                 int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     317                int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    318318                AssertRC(rc2);
    319319
     
    322322                {
    323323                    PSHCLEVENTPAYLOAD pPayload;
    324                     rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     324                    rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    325325                    if (RT_SUCCESS(rc))
    326326                        ShClPayloadFree(pPayload);
    327327                }
    328328
    329                 ShClEventUnregister(&pCtx->pTransfer->Events, uEvent);
     329                ShClEventUnregister(&pCtx->pTransfer->Events, idEvent);
    330330            }
    331331        }
     
    352352    if (pMsg)
    353353    {
    354         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     354        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    355355
    356356        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    357                                                                   pCtx->pTransfer->State.uID, uEvent));
     357                                                                  pCtx->pTransfer->State.uID, idEvent));
    358358        HGCMSvcSetU64(&pMsg->paParms[1], hList);
    359359        HGCMSvcSetU32(&pMsg->paParms[2], 0 /* fFlags */);
     
    362362        if (RT_SUCCESS(rc))
    363363        {
    364             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     364            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    365365            AssertRC(rc2);
    366366
     
    369369            {
    370370                PSHCLEVENTPAYLOAD pPayload;
    371                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent,
     371                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent,
    372372                                   pCtx->pTransfer->uTimeoutMs, &pPayload);
    373373                if (RT_SUCCESS(rc))
     
    413413    if (pMsg)
    414414    {
    415         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     415        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    416416
    417417        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    418                                                                   pCtx->pTransfer->State.uID, uEvent));
     418                                                                  pCtx->pTransfer->State.uID, idEvent));
    419419        HGCMSvcSetU64(&pMsg->paParms[1], hList);
    420420        HGCMSvcSetU32(&pMsg->paParms[2], 0 /* fInfo */);
     
    423423        if (RT_SUCCESS(rc))
    424424        {
    425             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     425            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    426426            AssertRC(rc2);
    427427
     
    430430            {
    431431                PSHCLEVENTPAYLOAD pPayload;
    432                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     432                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    433433                if (RT_SUCCESS(rc))
    434434                {
     
    473473    if (pMsg)
    474474    {
    475         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     475        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    476476
    477477        LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pCreateParms->pszPath, pCreateParms->fCreate));
     
    480480
    481481        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    482                                                                   pCtx->pTransfer->State.uID, uEvent));
     482                                                                  pCtx->pTransfer->State.uID, idEvent));
    483483        HGCMSvcSetU64(&pMsg->paParms[1], 0); /* uHandle */
    484484        HGCMSvcSetU32(&pMsg->paParms[2], cbPath);
     
    489489        if (RT_SUCCESS(rc))
    490490        {
    491             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     491            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    492492            AssertRC(rc2);
    493493
     
    496496            {
    497497                PSHCLEVENTPAYLOAD pPayload;
    498                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     498                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    499499                if (RT_SUCCESS(rc))
    500500                {
     
    535535    if (pMsg)
    536536    {
    537         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     537        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    538538
    539539        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    540                                                                   pCtx->pTransfer->State.uID, uEvent));
     540                                                                  pCtx->pTransfer->State.uID, idEvent));
    541541        HGCMSvcSetU64(&pMsg->paParms[1], hObj);
    542542
     
    544544        if (RT_SUCCESS(rc))
    545545        {
    546             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     546            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    547547            AssertRC(rc2);
    548548
     
    551551            {
    552552                PSHCLEVENTPAYLOAD pPayload;
    553                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     553                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    554554                if (RT_SUCCESS(rc))
    555555                {
     
    591591    if (pMsg)
    592592    {
    593         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     593        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    594594
    595595        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    596                                                                   pCtx->pTransfer->State.uID, uEvent));
     596                                                                  pCtx->pTransfer->State.uID, idEvent));
    597597        HGCMSvcSetU64(&pMsg->paParms[1], hObj);
    598598        HGCMSvcSetU32(&pMsg->paParms[2], cbData);
     
    602602        if (RT_SUCCESS(rc))
    603603        {
    604             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     604            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    605605            AssertRC(rc2);
    606606
     
    609609            {
    610610                PSHCLEVENTPAYLOAD pPayload;
    611                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     611                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    612612                if (RT_SUCCESS(rc))
    613613                {
     
    650650    if (pMsg)
    651651    {
    652         const SHCLEVENTID uEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
     652        const SHCLEVENTID idEvent = ShClEventIDGenerate(&pCtx->pTransfer->Events);
    653653
    654654        HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    655                                                                   pCtx->pTransfer->State.uID, uEvent));
     655                                                                  pCtx->pTransfer->State.uID, idEvent));
    656656        HGCMSvcSetU64(&pMsg->paParms[1], hObj);
    657657        HGCMSvcSetU64(&pMsg->paParms[2], cbData);
     
    661661        if (RT_SUCCESS(rc))
    662662        {
    663             int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, uEvent);
     663            int rc2 = ShClEventRegister(&pCtx->pTransfer->Events, idEvent);
    664664            AssertRC(rc2);
    665665
     
    668668            {
    669669                PSHCLEVENTPAYLOAD pPayload;
    670                 rc = ShClEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
     670                rc = ShClEventWait(&pCtx->pTransfer->Events, idEvent, pCtx->pTransfer->uTimeoutMs, &pPayload);
    671671                if (RT_SUCCESS(rc))
    672672                {
     
    12621262                        if (RT_SUCCESS(rc))
    12631263                        {
    1264                             const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    1265 
    1266                             LogFlowFunc(("uCID=%RU64 -> uEvent=%RU32\n", uCID, uEvent));
    1267 
    1268                             rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1264                            const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1265
     1266                            LogFlowFunc(("uCID=%RU64 -> idEvent=%RU32\n", uCID, idEvent));
     1267
     1268                            rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    12691269                        }
    12701270                        break;
     
    14301430                uint32_t cbData = sizeof(SHCLROOTLISTHDR);
    14311431
    1432                 const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1432                const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    14331433
    14341434                PSHCLEVENTPAYLOAD pPayload;
    1435                 rc = ShClPayloadAlloc(uEvent, pvData, cbData, &pPayload);
     1435                rc = ShClPayloadAlloc(idEvent, pvData, cbData, &pPayload);
    14361436                if (RT_SUCCESS(rc))
    14371437                {
    1438                     rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1438                    rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    14391439                    if (RT_FAILURE(rc))
    14401440                        ShClPayloadFree(pPayload);
     
    14751475                uint32_t cbData = sizeof(SHCLROOTLISTENTRY);
    14761476
    1477                 const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1477                const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    14781478
    14791479                PSHCLEVENTPAYLOAD pPayload;
    1480                 rc = ShClPayloadAlloc(uEvent, pvData, cbData, &pPayload);
     1480                rc = ShClPayloadAlloc(idEvent, pvData, cbData, &pPayload);
    14811481                if (RT_SUCCESS(rc))
    14821482                {
    1483                     rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1483                    rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    14841484                    if (RT_FAILURE(rc))
    14851485                        ShClPayloadFree(pPayload);
     
    15501550                    uint32_t cbData = sizeof(SHCLLISTHDR);
    15511551
    1552                     const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1552                    const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    15531553
    15541554                    PSHCLEVENTPAYLOAD pPayload;
    1555                     rc = ShClPayloadAlloc(uEvent, pvData, cbData, &pPayload);
     1555                    rc = ShClPayloadAlloc(idEvent, pvData, cbData, &pPayload);
    15561556                    if (RT_SUCCESS(rc))
    15571557                    {
    1558                         rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1558                        rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    15591559                        if (RT_FAILURE(rc))
    15601560                            ShClPayloadFree(pPayload);
     
    15991599                    uint32_t cbData = sizeof(SHCLLISTENTRY);
    16001600
    1601                     const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1601                    const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    16021602
    16031603                    PSHCLEVENTPAYLOAD pPayload;
    1604                     rc = ShClPayloadAlloc(uEvent, pvData, cbData, &pPayload);
     1604                    rc = ShClPayloadAlloc(idEvent, pvData, cbData, &pPayload);
    16051605                    if (RT_SUCCESS(rc))
    16061606                    {
    1607                         rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1607                        rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    16081608                        if (RT_FAILURE(rc))
    16091609                            ShClPayloadFree(pPayload);
     
    17111711                uint32_t cbData = sizeof(SHCLOBJDATACHUNK);
    17121712
    1713                 const SHCLEVENTID uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
     1713                const SHCLEVENTID idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(uCID);
    17141714
    17151715                PSHCLEVENTPAYLOAD pPayload;
    1716                 rc = ShClPayloadAlloc(uEvent, pvData, cbData, &pPayload);
     1716                rc = ShClPayloadAlloc(idEvent, pvData, cbData, &pPayload);
    17171717                if (RT_SUCCESS(rc))
    17181718                {
    1719                     rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);
     1719                    rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload);
    17201720                    if (RT_FAILURE(rc))
    17211721                        ShClPayloadFree(pPayload);
     
    19771977 * @param   uStatus             Status to report.
    19781978 * @param   rcTransfer          Result code to report. Optional and depending on status.
    1979  * @param   puEvent             Where to store the created wait event. Optional.
     1979 * @param   pidEvent             Where to store the created wait event. Optional.
    19801980 */
    19811981int shClSvcTransferSendStatus(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer, SHCLTRANSFERSTATUS uStatus,
    1982                               int rcTransfer, PSHCLEVENTID puEvent)
     1982                              int rcTransfer, PSHCLEVENTID pidEvent)
    19831983{
    19841984    AssertPtrReturn(pClient,   VERR_INVALID_POINTER);
    19851985    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
    1986     /* puEvent is optional. */
     1986    /* pidEvent is optional. */
    19871987
    19881988    PSHCLCLIENTMSG pMsgReadData = shClSvcMsgAlloc(pClient, VBOX_SHCL_HOST_MSG_TRANSFER_STATUS,
     
    19911991        return VERR_NO_MEMORY;
    19921992
    1993     const SHCLEVENTID uEvent = ShClEventIDGenerate(&pTransfer->Events);
     1993    const SHCLEVENTID idEvent = ShClEventIDGenerate(&pTransfer->Events);
    19941994
    19951995    HGCMSvcSetU64(&pMsgReadData->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID,
    1996                                                                       pTransfer->State.uID, uEvent));
     1996                                                                      pTransfer->State.uID, idEvent));
    19971997    HGCMSvcSetU32(&pMsgReadData->paParms[1], pTransfer->State.enmDir);
    19981998    HGCMSvcSetU32(&pMsgReadData->paParms[2], uStatus);
     
    20032003    if (RT_SUCCESS(rc))
    20042004    {
    2005         rc = ShClEventRegister(&pTransfer->Events, uEvent);
     2005        rc = ShClEventRegister(&pTransfer->Events, idEvent);
    20062006        if (RT_SUCCESS(rc))
    20072007        {
     
    20122012                         ShClTransferStatusToStr(uStatus), rcTransfer, pTransfer->State.uID));
    20132013
    2014                 if (puEvent)
    2015                     *puEvent = uEvent;
     2014                if (pidEvent)
     2015                    *pidEvent = idEvent;
    20162016            }
    20172017            else
    2018                 ShClEventUnregister(&pTransfer->Events, uEvent);
     2018                ShClEventUnregister(&pTransfer->Events, idEvent);
    20192019        }
    20202020    }
     
    21082108                            if (RT_SUCCESS(rc))
    21092109                            {
    2110                                 SHCLEVENTID uEvent;
     2110                                SHCLEVENTID idEvent;
    21112111                                rc = shClSvcTransferSendStatus(pClient, pTransfer,
    21122112                                                               SHCLTRANSFERSTATUS_INITIALIZED, VINF_SUCCESS,
    2113                                                                &uEvent);
     2113                                                               &idEvent);
    21142114                                if (RT_SUCCESS(rc))
    21152115                                {
     
    21182118
    21192119                                    PSHCLEVENTPAYLOAD pPayload;
    2120                                     rc = ShClEventWait(&pTransfer->Events, uEvent, pTransfer->uTimeoutMs, &pPayload);
     2120                                    rc = ShClEventWait(&pTransfer->Events, idEvent, pTransfer->uTimeoutMs, &pPayload);
    21212121                                    if (RT_SUCCESS(rc))
    21222122                                    {
     
    21832183int shClSvcTransferStop(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    21842184{
    2185     SHCLEVENTID uEvent;
     2185    SHCLEVENTID idEvent;
    21862186    int rc = shClSvcTransferSendStatus(pClient, pTransfer,
    21872187                                       SHCLTRANSFERSTATUS_STOPPED, VINF_SUCCESS,
    2188                                        &uEvent);
     2188                                       &idEvent);
    21892189    if (RT_SUCCESS(rc))
    21902190    {
    21912191        LogRel2(("Shared Clipboard: Waiting for stop of transfer %RU32 on guest ...\n", pTransfer->State.uID));
    21922192
    2193         rc = ShClEventWait(&pTransfer->Events, uEvent, pTransfer->uTimeoutMs, NULL);
     2193        rc = ShClEventWait(&pTransfer->Events, idEvent, pTransfer->uTimeoutMs, NULL);
    21942194        if (RT_SUCCESS(rc))
    21952195            LogRel2(("Shared Clipboard: Stopped transfer %RU32 on guest\n", pTransfer->State.uID));
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r82628 r82846  
    178178    }
    179179
    180     SHCLEVENTID uEvent = 0;
    181     int rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &uEvent);
     180    SHCLEVENTID idEvent = 0;
     181    int rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &idEvent);
    182182    if (RT_SUCCESS(rc))
    183183    {
    184184        PSHCLEVENTPAYLOAD pPayload;
    185         rc = ShClEventWait(&pCtx->pClient->EventSrc, uEvent, 30 * 1000, &pPayload);
     185        rc = ShClEventWait(&pCtx->pClient->EventSrc, idEvent, 30 * 1000, &pPayload);
    186186        if (RT_SUCCESS(rc))
    187187        {
     
    190190
    191191            /* Detach the payload, as the caller then will own the data. */
    192             ShClEventPayloadDetach(&pCtx->pClient->EventSrc, uEvent);
     192            ShClEventPayloadDetach(&pCtx->pClient->EventSrc, idEvent);
    193193            /**
    194194             * @todo r=bird: The payload has already been detached,
     
    198198        }
    199199
    200         ShClEventUnregister(&pCtx->pClient->EventSrc, uEvent);
     200        ShClEventUnregister(&pCtx->pClient->EventSrc, idEvent);
    201201    }
    202202
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r82628 r82846  
    167167    uint32_t            *pcbActual;
    168168    /** The request's event ID. */
    169     SHCLEVENTID          uEvent;
     169    SHCLEVENTID          idEvent;
    170170};
    171171
     
    193193        pReq->pcbActual = pcbActual;
    194194        const SHCLEVENTID idEvent = ShClEventIdGenerateAndRegister(&pClient->EventSrc);
    195         pReq->uEvent    = idEvent;
     195        pReq->idEvent    = idEvent;
    196196        if (idEvent)
    197197        {
     
    283283    RT_NOREF(rcCompletion);
    284284
    285     LogFlowFunc(("rcCompletion=%Rrc, pReq=%p, pv=%p, cb=%RU32, uEvent=%RU32\n", rcCompletion, pReq, pv, cb, pReq->uEvent));
     285    LogFlowFunc(("rcCompletion=%Rrc, pReq=%p, pv=%p, cb=%RU32, idEvent=%RU32\n", rcCompletion, pReq, pv, cb, pReq->idEvent));
    286286
    287287    AssertMsgRC(rcCompletion, ("Clipboard data completion from X11 failed with %Rrc\n", rcCompletion));
    288288
    289     if (pReq->uEvent != NIL_SHCLEVENTID)
     289    if (pReq->idEvent != NIL_SHCLEVENTID)
    290290    {
    291291        int rc2;
     
    294294        if (pv && cb)
    295295        {
    296             rc2 = ShClPayloadAlloc(pReq->uEvent, pv, cb, &pPayload);
     296            rc2 = ShClPayloadAlloc(pReq->idEvent, pv, cb, &pPayload);
    297297            AssertRC(rc2);
    298298        }
    299299
    300300        RTCritSectEnter(&pCtx->pClient->CritSect);
    301         rc2 = ShClEventSignal(&pCtx->pClient->EventSrc, pReq->uEvent, pPayload);
     301        rc2 = ShClEventSignal(&pCtx->pClient->EventSrc, pReq->idEvent, pPayload);
    302302        AssertRC(rc2);
    303303        RTCritSectLeave(&pCtx->pClient->CritSect);
     
    340340    {
    341341        /* Request data from the guest. */
    342         SHCLEVENTID uEvent;
    343         rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &uEvent);
     342        SHCLEVENTID idEvent;
     343        rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &idEvent);
    344344        if (RT_SUCCESS(rc))
    345345        {
    346346            PSHCLEVENTPAYLOAD pPayload;
    347             rc = ShClEventWait(&pCtx->pClient->EventSrc, uEvent, 30 * 1000, &pPayload);
     347            rc = ShClEventWait(&pCtx->pClient->EventSrc, idEvent, 30 * 1000, &pPayload);
    348348            if (RT_SUCCESS(rc))
    349349            {
     
    352352
    353353                /* Detach the payload, as the caller then will own the data. */
    354                 ShClEventPayloadDetach(&pCtx->pClient->EventSrc, uEvent);
     354                ShClEventPayloadDetach(&pCtx->pClient->EventSrc, idEvent);
    355355            }
    356356
    357             ShClEventUnregister(&pCtx->pClient->EventSrc, uEvent);
     357            ShClEventUnregister(&pCtx->pClient->EventSrc, idEvent);
    358358        }
    359359    }
     
    389389    LogFlowFuncEnter();
    390390
    391     SHCLEVENTID uEvent = ShClEventIDGenerate(&pClient->EventSrc);
    392 
    393     int rc = ShClEventRegister(&pClient->EventSrc, uEvent);
     391    SHCLEVENTID idEvent = ShClEventIDGenerate(&pClient->EventSrc);
     392
     393    int rc = ShClEventRegister(&pClient->EventSrc, idEvent);
    394394    if (RT_SUCCESS(rc))
    395395    {
     
    397397        if (pReq)
    398398        {
    399             pReq->uEvent = uEvent;
     399            pReq->idEvent = idEvent;
    400400
    401401            rc = ShClX11ReadDataFromX11(&pClient->State.pCtx->X11, VBOX_SHCL_FMT_URI_LIST, pReq);
     
    404404                /* X supplies the data asynchronously, so we need to wait for data to arrive first. */
    405405                PSHCLEVENTPAYLOAD pPayload;
    406                 rc = ShClEventWait(&pClient->EventSrc, uEvent, 30 * 1000, &pPayload);
     406                rc = ShClEventWait(&pClient->EventSrc, idEvent, 30 * 1000, &pPayload);
    407407                if (RT_SUCCESS(rc))
    408408                {
     
    413413        }
    414414
    415         ShClEventUnregister(&pClient->EventSrc, uEvent);
     415        ShClEventUnregister(&pClient->EventSrc, idEvent);
    416416    }
    417417
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r82540 r82846  
    12181218    LogFlowFuncEnter();
    12191219
    1220     SHCLEVENTID uEvent;
     1220    SHCLEVENTID idEvent;
    12211221    if (!(pClient->State.fGuestFeatures0 & VBOX_SHCL_GF_0_CONTEXT_ID)) /* Legacy, Guest Additions < 6.1. */
    12221222    {
    12231223        /* Older Guest Additions (<= VBox 6.0) did not have any context ID handling, so we ASSUME that the last event registered
    12241224         * is the one we want to handle (as this all was a synchronous protocol anyway). */
    1225         uEvent = ShClEventGetLast(&pClient->EventSrc);
     1225        idEvent = ShClEventGetLast(&pClient->EventSrc);
    12261226    }
    12271227    else
    1228         uEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(pCmdCtx->uContextID);
     1228        idEvent = VBOX_SHCL_CONTEXTID_GET_EVENT(pCmdCtx->uContextID);
    12291229
    12301230    int rc = VINF_SUCCESS;
     
    12321232    PSHCLEVENTPAYLOAD pPayload = NULL;
    12331233    if (pData->cbData)
    1234         rc = ShClPayloadAlloc(uEvent, pData->pvData, pData->cbData, &pPayload);
     1234        rc = ShClPayloadAlloc(idEvent, pData->pvData, pData->cbData, &pPayload);
    12351235
    12361236    if (RT_SUCCESS(rc))
    12371237    {
    12381238        RTCritSectEnter(&pClient->CritSect);
    1239         rc = ShClEventSignal(&pClient->EventSrc, uEvent, pPayload);
     1239        rc = ShClEventSignal(&pClient->EventSrc, idEvent, pPayload);
    12401240        RTCritSectLeave(&pClient->CritSect);
    12411241        if (RT_FAILURE(rc))
     
    23922392            /* The service extension wants read data from the guest. */
    23932393            case VBOX_CLIPBOARD_EXT_FN_DATA_READ:
    2394                 rc = ShClSvcDataReadRequest(pClient, u32Format, NULL /* puEvent */);
     2394                rc = ShClSvcDataReadRequest(pClient, u32Format, NULL /* pidEvent */);
    23952395                break;
    23962396
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp

    r82527 r82846  
    130130static void testMsgAddReadData(PSHCLCLIENT pClient, uint32_t fFormat)
    131131{
    132     int rc = ShClSvcDataReadRequest(pClient, fFormat, NULL /* puEvent */);
     132    int rc = ShClSvcDataReadRequest(pClient, fFormat, NULL /* pidEvent */);
    133133    RTTESTI_CHECK_RC_OK(rc);
    134134}
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