Changeset 85371 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Jul 17, 2020 10:02:58 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
r82968 r85371 549 549 int hgMove(uint32_t uPosX, uint32_t uPosY, VBOXDNDACTION dndActionDefault); 550 550 int hgDrop(uint32_t uPosX, uint32_t uPosY, VBOXDNDACTION dndActionDefault); 551 int hgDataReceive(PVBGLR3GUESTDNDMETADATA pMeta Data);551 int hgDataReceive(PVBGLR3GUESTDNDMETADATA pMeta); 552 552 553 553 /* X11 helpers. */ … … 1900 1900 * 1901 1901 * @returns IPRT status code. 1902 * @param pMeta DataPointer to meta data from host.1903 */ 1904 int DragInstance::hgDataReceive(PVBGLR3GUESTDNDMETADATA pMeta Data)1902 * @param pMeta Pointer to meta data from host. 1903 */ 1904 int DragInstance::hgDataReceive(PVBGLR3GUESTDNDMETADATA pMeta) 1905 1905 { 1906 1906 LogFlowThisFunc(("enmMode=%RU32, enmState=%RU32\n", m_enmMode, m_enmState)); 1907 LogFlowThisFunc(("enmMeta DataType=%RU32\n", pMetaData->enmType));1907 LogFlowThisFunc(("enmMetaType=%RU32\n", pMeta->enmType)); 1908 1908 1909 1909 if ( m_enmMode != HG … … 1913 1913 } 1914 1914 1915 if ( pMetaData->pvMeta == NULL 1916 || pMetaData->cbMeta == 0) 1917 { 1918 return VERR_INVALID_PARAMETER; 1919 } 1920 1921 int rc = VINF_SUCCESS; 1922 1923 const void *pvData = pMetaData->pvMeta; 1924 const uint32_t cbData = pMetaData->cbMeta; 1915 void *pvData = NULL; 1916 size_t cbData = 0; 1917 1918 int rc; 1919 1920 switch (pMeta->enmType) 1921 { 1922 case VBGLR3GUESTDNDMETADATATYPE_RAW: 1923 { 1924 AssertBreakStmt(pMeta->u.Raw.pvMeta != NULL, rc = VERR_INVALID_POINTER); 1925 pvData = pMeta->u.Raw.pvMeta; 1926 AssertBreakStmt(pMeta->u.Raw.cbMeta, rc = VERR_INVALID_PARAMETER); 1927 cbData = pMeta->u.Raw.cbMeta; 1928 1929 rc = VINF_SUCCESS; 1930 break; 1931 } 1932 1933 case VBGLR3GUESTDNDMETADATATYPE_URI_LIST: 1934 { 1935 VBClLogInfo(("URI transfer root directory is '%s'\n", DnDTransferListGetRootPathAbs(&pMeta->u.URI.Transfer))); 1936 1937 /* Note: The transfer list already has its root set to a temporary directory, so no need to set/add a new 1938 * path base here. */ 1939 rc = DnDTransferListGetRootsEx(&pMeta->u.URI.Transfer, DNDTRANSFERLISTFMT_NATIVE, NULL /* pszPathBase */, 1940 DND_PATH_SEPARATOR, (char **)&pvData, &cbData); 1941 break; 1942 } 1943 1944 default: 1945 AssertFailedStmt(rc = VERR_NOT_IMPLEMENTED); 1946 break; 1947 } 1948 1949 if (RT_FAILURE(rc)) 1950 return rc; 1925 1951 1926 1952 /* … … 1928 1954 * be on the guest, so proceed working on communicating with the target window. 1929 1955 */ 1930 VBClLogInfo("Received %RU32 bytes of URI listmeta data from host\n", cbData);1956 VBClLogInfo("Received %RU32 bytes of meta data from host\n", cbData); 1931 1957 1932 1958 /* Destroy any old data. */
Note:
See TracChangeset
for help on using the changeset viewer.