VirtualBox

Ignore:
Timestamp:
Jun 19, 2023 9:11:37 AM (18 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Unified root list entry code to also use the generic list entry code, a lot of updates for the cross OS transfer handling code, more updates for HTTP server transfer handling.

This also changed the handling of how that transfers are being initiated, as we needed to have this for X11: Before, transfers were initiated as soon as on side announced the URI list format -- now we postpone initiating the transfer until the receiving side requests the data as URI list.

bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardTransfers.cpp

    r98103 r100204  
    215215    RTTESTI_CHECK_RC_OK(rc);
    216216
     217    SHCLTXPROVIDER Provider;
     218    RTTESTI_CHECK(VBClTransferProviderLocalQueryInterface(&Provider) != NULL);
     219    RTTESTI_CHECK_RC_OK(ShClTransferSetProvider(pTransfer, &Provider));
     220
    217221    char szTestTransferRootsSetDir[RTPATH_MAX];
    218222    rc = testCreateTempDir(hTest, "testTransferRootsSet", szTestTransferRootsSetDir, sizeof(szTestTransferRootsSetDir));
     
    227231    RTTESTI_CHECK_RC_OK_RETV(rc);
    228232
    229     rc = ShClTransferRootsSet(pTransfer, pszRoots, strlen(pszRoots) + 1);
     233    rc = ShClTransferRootsInitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
    230234    RTTESTI_CHECK_RC(rc, rcExpected);
    231235
     
    243247    PSHCLTRANSFER pTransfer;
    244248    int rc = ShClTransferCreate(&pTransfer);
     249    RTTESTI_CHECK_RC_OK(rc);
     250
     251    SHCLTXPROVIDER Provider;
     252    VBClTransferProviderLocalQueryInterface(&Provider);
     253
     254    rc = ShClTransferSetProvider(pTransfer, &Provider);
    245255    RTTESTI_CHECK_RC_OK(rc);
    246256
     
    262272    RTTESTI_CHECK_RC_OK_RETV(rc);
    263273
    264     rc = ShClTransferRootsSet(pTransfer, pszRoots, strlen(pszRoots) + 1);
     274    rc = ShClTransferRootsInitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
    265275    RTTESTI_CHECK_RC_OK(rc);
    266276
     
    303313    rc = ShClTransferDestroy(pTransfer);
    304314    RTTESTI_CHECK_RC_OK(rc);
     315    rc = ShClTransferDestroy(pTransfer); /* Second time, intentional. */
     316    RTTESTI_CHECK_RC_OK(rc);
     317
     318    PSHCLLIST pList = ShClTransferListAlloc();
     319    RTTESTI_CHECK(pList != NULL);
     320    rc = ShClTransferCreate(&pTransfer);
     321    RTTESTI_CHECK_RC_OK(rc);
     322    ShClTransferListFree(pList);
     323    pList = NULL;
     324    ShClTransferListFree(pList); /* Second time, intentional. */
     325
     326    SHCLLISTENTRY Entry;
     327    RTTESTI_CHECK_RC_OK(ShClTransferListEntryInit(&Entry));
     328    ShClTransferListEntryDestroy(&Entry);
     329    ShClTransferListEntryDestroy(&Entry); /* Second time, intentional. */
    305330}
    306331
     
    387412    return RTTestSummaryAndDestroy(hTest);
    388413}
    389 
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