- Timestamp:
- Apr 12, 2024 2:11:08 PM (10 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard-x11.cpp
r103442 r104317 85 85 if (RT_SUCCESS(rc)) 86 86 { 87 rc = ShClTransferRoots InitFromStringListEx(pTransfer, (const char *)pvData, cbData,88 87 rc = ShClTransferRootsSetFromStringListEx(pTransfer, (const char *)pvData, cbData, 88 "\n" /* X11-based Desktop environments separate entries with "\n" */); 89 89 RTMemFree(pvData); 90 90 } -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r104312 r104317 1242 1242 * actually has some root entries set, as the other side can query for those at any time then. */ 1243 1243 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); 1245 1245 1246 1246 if (RT_SUCCESS(rc)) … … 1821 1821 1822 1822 /** 1823 * Initializesthe root list entries for a given clipboard transfer, extended version.1823 * Set the root list entries for a given clipboard transfer, extended version. 1824 1824 * 1825 1825 * @returns VBox status code. … … 1832 1832 * @note Accepts local paths or URI string lists (absolute only). 1833 1833 */ 1834 int ShClTransferRoots InitFromStringListEx(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots, const char *pszSep)1834 int ShClTransferRootsSetFromStringListEx(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots, const char *pszSep) 1835 1835 { 1836 1836 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1992 1992 1993 1993 /** 1994 * Initializes the root list entries for a given clipboard transfer.1994 * Sets the root list entries for a given clipboard transfer. 1995 1995 * 1996 1996 * @returns VBox status code. … … 2002 2002 * @note Accepts local paths or URI string lists (absolute only). 2003 2003 */ 2004 int ShClTransferRoots InitFromStringList(PSHCLTRANSFER pTransfer, const char *pszRoots, size_t cbRoots)2005 { 2006 return ShClTransferRoots InitFromStringListEx(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.2004 int 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. 2011 2011 * 2012 2012 * @returns VBox status code. … … 2018 2018 * @note Accepts local paths or URI string lists (absolute only). 2019 2019 */ 2020 int ShClTransferRoots InitFromStringListUnicode(PSHCLTRANSFER pTransfer, PRTUTF16 pwszRoots, size_t cbRoots)2020 int ShClTransferRootsSetFromStringListUnicode(PSHCLTRANSFER pTransfer, PRTUTF16 pwszRoots, size_t cbRoots) 2021 2021 { 2022 2022 AssertPtrReturn(pwszRoots, VERR_INVALID_POINTER); … … 2039 2039 rc = ShClConvUtf16CRLFToUtf8LF(pwszRoots, cwcRoots, pszDst, chDst, &cbActual); 2040 2040 if (RT_SUCCESS(rc)) 2041 rc = ShClTransferRoots InitFromStringList(pTransfer, pszDst, cbActual + 1 /* Include terminator */);2041 rc = ShClTransferRootsSetFromStringList(pTransfer, pszDst, cbActual + 1 /* Include terminator */); 2042 2042 2043 2043 RTStrFree(pszDst); … … 2051 2051 2052 2052 /** 2053 * Initializes a single path as a transfer root.2053 * Sets a single path as a transfer root. 2054 2054 * 2055 2055 * @returns VBox status code. … … 2059 2059 * @note Convenience function, uses ShClTransferRootsInitFromStringList() internally. 2060 2060 */ 2061 int ShClTransferRoots InitFromPath(PSHCLTRANSFER pTransfer, const char *pszPath)2061 int ShClTransferRootsSetFromPath(PSHCLTRANSFER pTransfer, const char *pszPath) 2062 2062 { 2063 2063 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2069 2069 rc = RTStrAAppend(&pszRoots, SHCL_TRANSFER_URI_LIST_SEP_STR); 2070 2070 AssertRCReturn(rc, rc); 2071 rc = ShClTransferRoots InitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1 /* Include terminator */);2071 rc = ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1 /* Include terminator */); 2072 2072 RTStrFree(pszRoots); 2073 2073 return rc; -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r103631 r104317 1317 1317 if (RT_SUCCESS(rc)) 1318 1318 { 1319 rc = ShClTransferRoots InitFromStringList(pTransfer, pszList, cbList);1319 rc = ShClTransferRootsSetFromStringList(pTransfer, pszList, cbList); 1320 1320 RTStrFree(pszList); 1321 1321 } -
trunk/src/VBox/GuestHost/SharedClipboard/testcase/tstClipboardHttpServer.cpp
r104309 r104317 106 106 RTTEST_CHECK_RC_OK(hTest, ShClTransferCreate(SHCLTRANSFERDIR_TO_REMOTE, SHCLSOURCE_LOCAL, NULL /* Callbacks */, &pTx)); 107 107 RTTEST_CHECK_RC_OK(hTest, ShClTransferSetProvider(pTx, pProvider)); 108 RTTEST_CHECK_RC_OK(hTest, ShClTransferRoots InitFromPath(pTx, pszPath));108 RTTEST_CHECK_RC_OK(hTest, ShClTransferRootsSetFromPath(pTx, pszPath)); 109 109 RTTEST_CHECK_RC_OK(hTest, ShClTransferInit(pTx)); 110 110 RTTEST_CHECK_RC_OK(hTest, ShClTransferCtxRegister(pTransferCtx, pTx, NULL)); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r103630 r104317 674 674 if (RT_SUCCESS(rc)) 675 675 { 676 rc = ShClTransferRoots InitFromStringList(pCtx->pTransfer, (const char *)pvData, cbData);676 rc = ShClTransferRootsSetFromStringList(pCtx->pTransfer, (const char *)pvData, cbData); 677 677 if (RT_SUCCESS(rc)) 678 678 LogRel2(("Shared Clipboard: Host reported %RU64 X11 root entries for transfer to guest\n", -
trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardTransfers.cpp
r104311 r104317 231 231 RTTESTI_CHECK_RC_OK_RETV(rc); 232 232 233 rc = ShClTransferRoots InitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);233 rc = ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1); 234 234 RTTESTI_CHECK_RC(rc, rcExpected); 235 235 … … 267 267 RTTESTI_CHECK_RC_OK_RETV(rc); 268 268 269 rc = ShClTransferRoots InitFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1);269 rc = ShClTransferRootsSetFromStringList(pTransfer, pszRoots, strlen(pszRoots) + 1); 270 270 RTTESTI_CHECK_RC_OK(rc); 271 271
Note:
See TracChangeset
for help on using the changeset viewer.