Changeset 97731 in vbox for trunk/src/VBox/HostServices/DragAndDrop
- Timestamp:
- Dec 2, 2022 3:37:16 PM (2 years ago)
- Location:
- trunk/src/VBox/HostServices/DragAndDrop
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp
r96407 r97731 427 427 { 428 428 RT_NOREF1(pvClient); 429 LogFlowFunc(("idClient=%RU32, u32Function=%RU32, cParms=%RU32\n", idClient, u32Function, cParms)); 429 LogFlowFunc(("idClient=%RU32, u32Function=%s (%#x), cParms=%RU32\n", 430 idClient, DnDGuestMsgToStr(u32Function), u32Function, cParms)); 430 431 431 432 /* Check if we've the right mode set. */ … … 439 440 else 440 441 { 441 Log FlowFunc(("DnD disabled, deferring request\n"));442 LogRel(("DnD: Feature is disabled, ignoring request from guest\n")); 442 443 rc = VINF_HGCM_ASYNC_EXECUTE; 443 444 } … … 471 472 rc = VINF_SUCCESS; 472 473 else 473 Log FlowFunc(("Host -> Guest DnD mode disabled, failing request\n"));474 LogRel(("DnD: Host -> Guest mode disabled, ignoring request from guest\n")); 474 475 break; 475 476 } … … 489 490 else 490 491 #endif 491 Log FlowFunc(("Guest -> Host DnD mode disabled, failing request\n"));492 LogRel(("DnD: Guest -> Host mode disabled, ignoring request from guest\n")); 492 493 break; 493 494 } … … 565 566 case GUEST_DND_FN_GET_NEXT_HOST_MSG: 566 567 { 567 LogFlowFunc(("GUEST_DND_FN_GET_NEXT_HOST_MSG\n"));568 568 if (cParms == 3) 569 569 { … … 612 612 case GUEST_DND_FN_CONNECT: 613 613 { 614 LogFlowFunc(("GUEST_DND_FN_CONNECT\n"));615 616 614 ASSERT_GUEST_BREAK(cParms >= 2); 617 615 … … 648 646 case GUEST_DND_FN_REPORT_FEATURES: 649 647 { 650 LogFlowFunc(("GUEST_DND_FN_REPORT_FEATURES\n"));651 648 rc = clientReportFeatures(pClient, cParms, paParms); 652 649 if (RT_SUCCESS(rc)) … … 667 664 case GUEST_DND_FN_QUERY_FEATURES: 668 665 { 669 LogFlowFunc(("GUEST_DND_FN_QUERY_FEATURES"));670 666 rc = clientQueryFeatures(cParms, paParms); 671 667 break; … … 673 669 case GUEST_DND_FN_HG_ACK_OP: 674 670 { 675 LogFlowFunc(("GUEST_DND_FN_HG_ACK_OP\n"));676 677 671 ASSERT_GUEST_BREAK(cParms >= 2); 678 672 … … 690 684 case GUEST_DND_FN_HG_REQ_DATA: 691 685 { 692 LogFlowFunc(("GUEST_DND_FN_HG_REQ_DATA\n"));693 694 686 VBOXDNDCBHGREQDATADATA data; 695 687 RT_ZERO(data); … … 724 716 case GUEST_DND_FN_HG_EVT_PROGRESS: 725 717 { 726 LogFlowFunc(("GUEST_DND_FN_HG_EVT_PROGRESS\n"));727 728 718 ASSERT_GUEST_BREAK(cParms >= 3); 729 719 … … 746 736 case GUEST_DND_FN_GH_ACK_PENDING: 747 737 { 748 LogFlowFunc(("GUEST_DND_FN_GH_ACK_PENDING\n"));749 750 738 VBOXDNDCBGHACKPENDINGDATA data; 751 739 RT_ZERO(data); … … 788 776 case GUEST_DND_FN_GH_SND_DATA_HDR: 789 777 { 790 LogFlowFunc(("GUEST_DND_FN_GH_SND_DATA_HDR\n"));791 792 778 ASSERT_GUEST_BREAK(cParms == 12); 793 779 … … 824 810 case GUEST_DND_FN_GH_SND_DATA: 825 811 { 826 LogFlowFunc(("GUEST_DND_FN_GH_SND_DATA\n"));827 828 812 switch (pClient->uProtocolVerDeprecated) 829 813 { … … 849 833 850 834 case 2: 835 RT_FALL_THROUGH(); 851 836 default: 852 837 { … … 870 855 case GUEST_DND_FN_GH_SND_DIR: 871 856 { 872 LogFlowFunc(("GUEST_DND_FN_GH_SND_DIR\n"));873 874 857 ASSERT_GUEST_BREAK(cParms >= 3); 875 858 … … 891 874 case GUEST_DND_FN_GH_SND_FILE_HDR: 892 875 { 893 LogFlowFunc(("GUEST_DND_FN_GH_SND_FILE_HDR\n"));894 895 876 ASSERT_GUEST_BREAK(cParms == 6); 896 877 … … 915 896 case GUEST_DND_FN_GH_SND_FILE_DATA: 916 897 { 917 LogFlowFunc(("GUEST_DND_FN_GH_SND_FILE_DATA\n"));918 919 898 switch (pClient->uProtocolVerDeprecated) 920 899 { … … 982 961 case GUEST_DND_FN_GH_EVT_ERROR: 983 962 { 984 LogFlowFunc(("GUEST_DND_FN_GH_EVT_ERROR\n"));985 986 963 ASSERT_GUEST_BREAK(cParms >= 1); 987 964 … … 1001 978 default: 1002 979 { 980 LogFlowFunc(("u32Function=%s (%#x), cParms=%RU32\n", DnDHostMsgToStr(u32Function), u32Function, cParms)); 981 1003 982 /* All other messages are handled by the DnD manager. */ 1004 983 rc = m_pManager->GetNextMsg(u32Function, cParms, paParms); … … 1082 1061 uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT 1083 1062 { 1084 LogFlowFunc(("u32Function=% RU32, cParms=%RU32, cClients=%zu, cQueue=%zu\n",1085 u32Function, cParms, m_clientMap.size(), m_clientQueue.size()));1063 LogFlowFunc(("u32Function=%s (%#x), cParms=%RU32, cClients=%zu, cQueue=%zu\n", 1064 DnDHostMsgToStr(u32Function), u32Function, cParms, m_clientMap.size(), m_clientQueue.size())); 1086 1065 1087 1066 int rc; … … 1216 1195 int rcNext = m_pManager->GetNextMsgInfo(&uMsgNext, &cParmsNext); 1217 1196 1218 LogFlowFunc(("uMsgClient=% RU32, uMsgNext=%RU32, cParmsNext=%RU32, rcNext=%Rrc\n",1219 uMsgClient, uMsgNext, cParmsNext, rcNext));1197 LogFlowFunc(("uMsgClient=%s (%#x), uMsgNext=%s (%#x), cParmsNext=%RU32, rcNext=%Rrc\n", 1198 DnDGuestMsgToStr(uMsgClient), uMsgClient, DnDHostMsgToStr(uMsgNext), uMsgNext, cParmsNext, rcNext)); 1220 1199 1221 1200 if (RT_SUCCESS(rcNext)) -
trunk/src/VBox/HostServices/DragAndDrop/dndmanager.cpp
r96407 r97731 60 60 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); 61 61 62 LogFlowFunc(("uMsg=%RU32, cParms=%RU32, fAppend=%RTbool\n", pMsg->GetType(), pMsg->GetParamCount(), fAppend)); 62 LogFlowFunc(("uMsg=%s (%#x), cParms=%RU32, fAppend=%RTbool\n", 63 DnDHostMsgToStr(pMsg->GetType()), pMsg->GetType(), pMsg->GetParamCount(), fAppend)); 63 64 64 65 if (fAppend) … … 66 67 else 67 68 m_queueMsg.prepend(pMsg); 69 70 #ifdef DEBUG 71 DumpQueue(); 72 #endif 68 73 69 74 /** @todo Catch / handle OOM? */ … … 99 104 } 100 105 106 #ifdef DEBUG 107 void DnDManager::DumpQueue(void) 108 { 109 LogFunc(("Current queue (%zu items, FIFO) is: %s", m_queueMsg.size(), m_queueMsg.isEmpty() ? "<Empty>" : "")); 110 for (size_t i = 0; i < m_queueMsg.size(); ++i) 111 Log(("%s ", DnDHostMsgToStr(m_queueMsg[i]->GetType()))); 112 Log(("\n")); 113 } 114 #endif /* DEBUG */ 115 101 116 /** 102 117 * Retrieves information about the next message in the queue. … … 113 128 int rc; 114 129 130 #ifdef DEBUG 131 DumpQueue(); 132 #endif 133 115 134 if (m_queueMsg.isEmpty()) 116 135 { … … 128 147 } 129 148 130 LogFlowFunc(("Returning puMsg=%RU32, pcParms=%RU32, rc=%Rrc\n", *puType, *pcParms, rc));149 LogFlowFunc(("Returning uMsg=%s (%#x), cParms=%RU32, rc=%Rrc\n", DnDHostMsgToStr(*puType), *puType, *pcParms, rc)); 131 150 return rc; 132 151 } … … 143 162 int DnDManager::GetNextMsg(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 144 163 { 145 LogFlowFunc(("uMsg=% RU32, cParms=%RU32\n", uMsg, cParms));164 LogFlowFunc(("uMsg=%s (%#x), cParms=%RU32\n", DnDHostMsgToStr(uMsg), uMsg, cParms)); 146 165 147 166 /* Check for pending messages in our queue. */ -
trunk/src/VBox/HostServices/DragAndDrop/dndmanager.h
r96407 r97731 106 106 int AddMsg(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fAppend = true); 107 107 108 #ifdef DEBUG 109 void DumpQueue(); 110 #endif 111 108 112 int GetNextMsgInfo(uint32_t *puType, uint32_t *pcParms); 109 113 int GetNextMsg(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
Note:
See TracChangeset
for help on using the changeset viewer.