Changeset 81960 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Nov 18, 2019 7:00:50 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134757
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r81843 r81960 1193 1193 } 1194 1194 1195 /** 1196 * Reports available VBox clipboard formats to the guest. 1197 * 1198 * @returns VBox status code. 1199 * @param pClient Client to request to read data form. 1200 * @param pFormats Formats to report. 1201 */ 1195 1202 int ShClSvcFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats) 1196 1203 { … … 1200 1207 LogFlowFuncEnter(); 1201 1208 1209 uint32_t fFormats = pFormats->Formats; 1210 uint32_t fFlags = pFormats->fFlags; 1211 1212 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 1213 /* If transfer mode is set to disabled, don't report the URI list format to the guest. */ 1214 if (!(g_fTransferMode & VBOX_SHCL_TRANSFER_MODE_ENABLED)) 1215 fFormats &= ~VBOX_SHCL_FMT_URI_LIST; 1216 #endif 1217 1218 LogFlowFunc(("fFormats=0x%x -> 0x%x\n", pFormats->Formats, fFormats)); 1219 1220 /* Nothing to report? Bail out early. */ 1221 if (fFormats == VBOX_SHCL_FMT_NONE) 1222 return VINF_SUCCESS; 1223 1224 LogRel2(("Shared Clipboard: Reporting formats 0x%x to guest\n", fFormats)); 1225 1202 1226 int rc; 1203 1227 … … 1209 1233 HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID, 1210 1234 pClient->Events.uID, uEvent)); 1211 HGCMSvcSetU32(&pMsg->paParms[1], pFormats->Formats);1212 HGCMSvcSetU32(&pMsg->paParms[2], 0 /* fFlags */);1235 HGCMSvcSetU32(&pMsg->paParms[1], fFormats); 1236 HGCMSvcSetU32(&pMsg->paParms[2], fFlags); 1213 1237 1214 1238 rc = shClSvcMsgAdd(pClient, pMsg, true /* fAppend */); … … 1216 1240 { 1217 1241 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 1218 /* If this isan URI list, create a transfer locally and also tell the guest to create1242 /* If we announce an URI list, create a transfer locally and also tell the guest to create 1219 1243 * a transfer on the guest side. */ 1220 if ( pFormats->Formats & VBOX_SHCL_FMT_URI_LIST)1244 if (fFormats & VBOX_SHCL_FMT_URI_LIST) 1221 1245 { 1222 1246 rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_WRITE, SHCLSOURCE_LOCAL,
Note:
See TracChangeset
for help on using the changeset viewer.