Changeset 100619 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Jul 18, 2023 8:06:24 AM (17 months ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r100374 r100619 265 265 typedef struct _SHCLEXTSTATE 266 266 { 267 /** Pointer to the actual service extension handle. */ 267 /** Pointer to the actual service extension handle. 268 * 269 * Must return VERR_NOT_SUPPORTED if the extension didn't handle the requested function. 270 * This will invoke the regular backend then. 271 */ 268 272 PFNHGCMSVCEXT pfnExtension; 269 273 /** Opaque pointer to extension-provided data. Don't touch. */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r100613 r100619 1617 1617 SHCLEXTPARMS parms; 1618 1618 RT_ZERO(parms); 1619 1619 1620 parms.u.ReportFormats.uFormats = fFormats; 1620 1621 1621 g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE, &parms, sizeof(parms));1622 rc = g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE, &parms, sizeof(parms)); 1622 1623 } 1623 1624 else 1625 rc = VERR_NOT_SUPPORTED; 1626 1627 /* Let the backend implementation know if the extension above didn't handle the format(s). */ 1628 if (rc == VERR_NOT_SUPPORTED) 1624 1629 { 1625 1630 #ifdef LOG_ENABLED … … 1783 1788 } 1784 1789 else 1790 rc = VERR_NOT_SUPPORTED; 1791 1792 /* Try reading from the backend if the extension above didn't handle the read. */ 1793 if (rc == VERR_NOT_SUPPORTED) 1785 1794 { 1786 1795 rc = ShClBackendReadData(&g_ShClBackend, pClient, &cmdCtx, uFormat, pvData, cbData, &cbActual); … … 1949 1958 SHCLEXTPARMS parms; 1950 1959 RT_ZERO(parms); 1960 1951 1961 parms.u.ReadWriteData.uFormat = uFormat; 1952 1962 parms.u.ReadWriteData.pvData = pvData; 1953 1963 parms.u.ReadWriteData.cbData = cbData; 1954 1964 1955 g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_DATA_WRITE, &parms, sizeof(parms)); 1956 rc = VINF_SUCCESS; 1965 rc = g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_DATA_WRITE, &parms, sizeof(parms)); 1957 1966 } 1958 1967 else 1959 { 1960 /* Let the backend implementation know. */ 1968 rc = VERR_NOT_SUPPORTED; 1969 1970 /* Let the backend implementation know if the extension above didn't handle the write. */ 1971 if (rc == VERR_NOT_SUPPORTED) 1972 { 1961 1973 rc = ShClBackendWriteData(&g_ShClBackend, pClient, &cmdCtx, uFormat, pvData, cbData); 1962 1974 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.