VirtualBox

Changeset 104317 in vbox for trunk/src


Ignore:
Timestamp:
Apr 12, 2024 2:11:08 PM (10 months ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: ShClTransferRootsInitFromXXX() -> ShClTransferRootsSetFromXXX(). bugref:9437

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard-x11.cpp

    r103442 r104317  
    8585            if (RT_SUCCESS(rc))
    8686            {
    87                 rc = ShClTransferRootsInitFromStringListEx(pTransfer, (const char *)pvData, cbData,
    88                                                            "\n" /* X11-based Desktop environments separate entries with "\n" */);
     87                rc = ShClTransferRootsSetFromStringListEx(pTransfer, (const char *)pvData, cbData,
     88                                                          "\n" /* X11-based Desktop environments separate entries with "\n" */);
    8989                RTMemFree(pvData);
    9090            }
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp

    r104312 r104317  
    12421242         *         actually has some root entries set, as the other side can query for those at any time then. */
    12431243        if (pTransfer->State.enmDir == SHCLTRANSFERDIR_TO_REMOTE)
    1244             AssertMsgStmt(ShClTransferRootsCount(pTransfer), ("Transfer has no root entries set\n"), rc = VERR_WRONG_ORDER);
     1244            AssertMsgStmt(ShClTransferRootsCount(pTransfer), ("Transfer has no root entries set (yet)\n"), rc = VERR_WRONG_ORDER);
    12451245
    12461246        if (RT_SUCCESS(rc))
     
    18211821
    18221822/**
    1823  * Initializes the root list entries for a given clipboard transfer, extended version.
     1823 * Set the root list entries for a given clipboard transfer, extended version.
    18241824 *
    18251825 * @returns VBox status code.
     
    18321832 * @note    Accepts local paths or URI string lists (absolute only).
    18331833 */
    1834 int ShClTransferRootsInitFromStringListEx(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots, const char *pszSep)
     1834int ShClTransferRootsSetFromStringListEx(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots, const char *pszSep)
    18351835{
    18361836    AssertPtrReturn(pTransfer,      VERR_INVALID_POINTER);
     
    19921992
    19931993/**
    1994  * Initializes the root list entries for a given clipboard transfer.
     1994 * Sets the root list entries for a given clipboard transfer.
    19951995 *
    19961996 * @returns VBox status code.
     
    20022002 * @note    Accepts local paths or URI string lists (absolute only).
    20032003 */
    2004 int ShClTransferRootsInitFromStringList(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots)
    2005 {
    2006     return ShClTransferRootsInitFromStringListEx(pTransfer, pszRoots, cbRoots, SHCL_TRANSFER_URI_LIST_SEP_STR);
    2007 }
    2008 
    2009 /**
    2010  * Initializes the root list entries for a given clipboard transfer, UTF-16 (Unicode) version.
     2004int ShClTransferRootsSetFromStringList(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots)
     2005{
     2006    return ShClTransferRootsSetFromStringListEx(pTransfer, pszRoots, cbRoots, SHCL_TRANSFER_URI_LIST_SEP_STR);
     2007}
     2008
     2009/**
     2010 * Sets the root list entries for a given clipboard transfer, UTF-16 (Unicode) version.
    20112011 *
    20122012 * @returns VBox status code.
     
    20182018 * @note    Accepts local paths or URI string lists (absolute only).
    20192019 */
    2020 int ShClTransferRootsInitFromStringListUnicode(PSHCLTRANSFER pTransfer, PRTUTF16 pwszRoots, size_t cbRoots)
     2020int ShClTransferRootsSetFromStringListUnicode(PSHCLTRANSFER pTransfer, PRTUTF16 pwszRoots, size_t cbRoots)
    20212021{
    20222022    AssertPtrReturn(pwszRoots, VERR_INVALID_POINTER);
     
    20392039            rc = ShClConvUtf16CRLFToUtf8LF(pwszRoots, cwcRoots, pszDst, chDst, &cbActual);
    20402040            if (RT_SUCCESS(rc))
    2041                 rc = ShClTransferRootsInitFromStringList(pTransfer, pszDst, cbActual + 1 /* Include terminator */);
     2041                rc = ShClTransferRootsSetFromStringList(pTransfer, pszDst, cbActual + 1 /* Include terminator */);
    20422042
    20432043            RTStrFree(pszDst);
     
    20512051
    20522052/**
    2053  * Initializes a single path as a transfer root.
     2053 * Sets a single path as a transfer root.
    20542054 *
    20552055 * @returns VBox status code.
     
    20592059 * @note    Convenience function, uses ShClTransferRootsInitFromStringList() internally.
    20602060 */
    2061 int ShClTransferRootsInitFromPath(PSHCLTRANSFER pTransfer, const char *pszPath)
     2061int ShClTransferRootsSetFromPath(PSHCLTRANSFER pTransfer, const char *pszPath)
    20622062{
    20632063    AssertPtrReturn(pTransfer, VERR_INVALID_POINTER);
     
    20692069    rc = RTStrAAppend(&pszRoots, SHCL_TRANSFER_URI_LIST_SEP_STR);
    20702070    AssertRCReturn(rc, rc);
    2071     rc =  ShClTransferRootsInitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1 /* Include terminator */);
     2071    rc =  ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1 /* Include terminator */);
    20722072    RTStrFree(pszRoots);
    20732073    return rc;
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp

    r103631 r104317  
    13171317                if (RT_SUCCESS(rc))
    13181318                {
    1319                     rc = ShClTransferRootsInitFromStringList(pTransfer, pszList, cbList);
     1319                    rc = ShClTransferRootsSetFromStringList(pTransfer, pszList, cbList);
    13201320                    RTStrFree(pszList);
    13211321                }
  • trunk/src/VBox/GuestHost/SharedClipboard/testcase/tstClipboardHttpServer.cpp

    r104309 r104317  
    106106    RTTEST_CHECK_RC_OK(hTest, ShClTransferCreate(SHCLTRANSFERDIR_TO_REMOTE, SHCLSOURCE_LOCAL, NULL /* Callbacks */, &pTx));
    107107    RTTEST_CHECK_RC_OK(hTest, ShClTransferSetProvider(pTx, pProvider));
    108     RTTEST_CHECK_RC_OK(hTest, ShClTransferRootsInitFromPath(pTx, pszPath));
     108    RTTEST_CHECK_RC_OK(hTest, ShClTransferRootsSetFromPath(pTx, pszPath));
    109109    RTTEST_CHECK_RC_OK(hTest, ShClTransferInit(pTx));
    110110    RTTEST_CHECK_RC_OK(hTest, ShClTransferCtxRegister(pTransferCtx, pTx, NULL));
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r103630 r104317  
    674674    if (RT_SUCCESS(rc))
    675675    {
    676         rc = ShClTransferRootsInitFromStringList(pCtx->pTransfer, (const char *)pvData, cbData);
     676        rc = ShClTransferRootsSetFromStringList(pCtx->pTransfer, (const char *)pvData, cbData);
    677677        if (RT_SUCCESS(rc))
    678678            LogRel2(("Shared Clipboard: Host reported %RU64 X11 root entries for transfer to guest\n",
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardTransfers.cpp

    r104311 r104317  
    231231    RTTESTI_CHECK_RC_OK_RETV(rc);
    232232
    233     rc = ShClTransferRootsInitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
     233    rc = ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
    234234    RTTESTI_CHECK_RC(rc, rcExpected);
    235235
     
    267267    RTTESTI_CHECK_RC_OK_RETV(rc);
    268268
    269     rc = ShClTransferRootsInitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
     269    rc = ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);
    270270    RTTESTI_CHECK_RC_OK(rc);
    271271
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