Changeset 79174 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/ClipboardProvider-HostService.cpp
- Timestamp:
- Jun 17, 2019 10:30:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardProvider-HostService.cpp
r79120 r79174 100 100 } 101 101 102 /** 103 * Returns the event's (raw) data (mutable). 104 * 105 * @returns Pointer to the event's raw data. 106 */ 102 107 void *SharedClipboardProviderHostService::Event::DataRaw() 103 108 { … … 105 110 } 106 111 112 /** 113 * Returns the event's data size (in bytes). 114 * 115 * @returns Data size (in bytes). 116 */ 107 117 uint32_t SharedClipboardProviderHostService::Event::DataSize() 108 118 { … … 125 135 int rc; 126 136 127 Event *pEvent = eventGet(VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DATA_HDR); 128 if (pEvent) 129 { 130 rc = pEvent->Wait(m_uTimeoutMs); 131 if (RT_SUCCESS(rc)) 132 memcpy(pDataHdr, pEvent->DataRaw(), pEvent->DataSize()); 137 if (m_Callbacks.pfnReadDataHdr) 138 { 139 SHAREDCLIPBOARDPROVIDERCALLBACKDATA data = { this, m_Callbacks.pvUser }; 140 rc = m_Callbacks.pfnReadDataHdr(&data); 133 141 } 134 142 else 135 rc = VERR_NOT_FOUND; 143 rc = VERR_NOT_SUPPORTED; 144 145 if (RT_SUCCESS(rc)) 146 { 147 Event *pEvent = eventGet(VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DATA_HDR); 148 if (pEvent) 149 { 150 rc = pEvent->Wait(m_uTimeoutMs); 151 if (RT_SUCCESS(rc)) 152 memcpy(pDataHdr, pEvent->DataRaw(), pEvent->DataSize()); 153 } 154 else 155 rc = VERR_NOT_FOUND; 156 } 136 157 137 158 LogFlowFuncLeaveRC(rc); … … 277 298 Event *pEvent = eventGet(pParms->u.HostService.uMsg); 278 299 if (pEvent) 279 {280 300 rc = pEvent->SetData(&dataHdr, sizeof(dataHdr)); 281 }282 301 } 283 302 break;
Note:
See TracChangeset
for help on using the changeset viewer.