Changeset 50265 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Jan 29, 2014 11:12:44 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91898
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r49930 r50265 882 882 break; 883 883 } 884 #ifdef VBOX_WITH_DRAG_AND_DROP_GH885 884 case DragAndDropSvc::HOST_DND_GH_REQ_PENDING: 886 885 { … … 905 904 break; 906 905 } 907 #endif /* VBOX_WITH_DRAG_AND_DROP_GH */908 906 default: 909 AssertMsgFailedReturn(("Message %u isn't expected in this context", uMsg), 910 VERR_INVALID_PARAMETER); 907 rc = VERR_NOT_SUPPORTED; 911 908 break; 912 909 } … … 944 941 Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_HG_REQ_DATA; 945 942 Msg.hdr.cParms = 1; 943 /* Initialize parameter */ 944 Msg.pFormat.SetPtr((void*)pcszFormat, (uint32_t)strlen(pcszFormat) + 1); 946 945 /* Do request */ 947 Msg.pFormat.SetPtr((void*)pcszFormat, (uint32_t)strlen(pcszFormat) + 1);948 946 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 949 947 if (RT_SUCCESS(rc)) … … 968 966 Msg.uDefAction.SetUInt32(uDefAction); 969 967 Msg.uAllActions.SetUInt32(uAllActions); 970 Msg.pFormat.SetPtr((void*)pcszFormat, static_cast<uint32_t>(strlen(pcszFormat) + 1));968 Msg.pFormat.SetPtr((void*)pcszFormat, (uint32_t)strlen(pcszFormat) + 1); 971 969 /* Do request */ 972 970 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 982 980 AssertReturn(cbData, VERR_INVALID_PARAMETER); 983 981 984 /* Todo:URI support. Currently only data is send over to the host. For URI985 * support basically the same as in the H->G case (see986 * HostServices/DragAndDrop/dndmanager.h/cpp) has to be done:987 * 1. Parse the urilist988 * 2. Recursively send "create dir" and "transfer file" msg to the host989 * 3. Patch the urilist by removing all base dirnames990 * 4. On the host all needs to received and the urilist patched afterwards991 * to point to the new location982 /** @todo Add URI support. Currently only data is send over to the host. For URI 983 * support basically the same as in the H->G case (see 984 * HostServices/DragAndDrop/dndmanager.h/cpp) has to be done: 985 * 1. Parse the urilist 986 * 2. Recursively send "create dir" and "transfer file" msg to the host 987 * 3. Patch the urilist by removing all base dirnames 988 * 4. On the host all needs to received and the urilist patched afterwards 989 * to point to the new location 992 990 */ 993 991 … … 999 997 Msg.hdr.cParms = 2; 1000 998 Msg.uSize.SetUInt32(cbData); 999 1001 1000 int rc = VINF_SUCCESS; 1002 uint32_t cbMax = _1M; 1003 uint32_t cbSend = 0; 1004 while(cbSend < cbData) 1001 uint32_t cbMax = _1M; /** @todo Remove 1 MB limit. */ 1002 uint32_t cbSent = 0; 1003 1004 while (cbSent < cbData) 1005 1005 { 1006 1006 /* Initialize parameter */ 1007 uint32_t cbToSend = RT_MIN(cbData - cbSen d, cbMax);1008 Msg.pData.SetPtr(static_cast<uint8_t*>(pvData) + cbSen d, cbToSend);1007 uint32_t cbToSend = RT_MIN(cbData - cbSent, cbMax); 1008 Msg.pData.SetPtr(static_cast<uint8_t*>(pvData) + cbSent, cbToSend); 1009 1009 /* Do request */ 1010 1010 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); … … 1018 1018 else 1019 1019 break; 1020 cbSen d+= cbToSend;1020 cbSent += cbToSend; 1021 1021 // RTThreadSleep(500); 1022 1022 }
Note:
See TracChangeset
for help on using the changeset viewer.