Changeset 87566 in vbox for trunk/src/VBox/HostServices/SharedClipboard
- Timestamp:
- Feb 3, 2021 1:48:48 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142593
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r87452 r87566 308 308 */ 309 309 int ShClBackendInit(void); 310 310 311 /** 311 312 * Called on destruction. 312 313 */ 313 314 void ShClBackendDestroy(void); 315 314 316 /** 315 317 * Called when a new HGCM client connects. … … 320 322 */ 321 323 int ShClBackendConnect(PSHCLCLIENT pClient, bool fHeadless); 324 322 325 /** 323 326 * Called when a HGCM client disconnects. … … 327 330 */ 328 331 int ShClBackendDisconnect(PSHCLCLIENT pClient); 332 329 333 /** 330 334 * Called when the guest reported available clipboard formats to the host OS. … … 336 340 */ 337 341 int ShClBackendFormatAnnounce(PSHCLCLIENT pClient, SHCLFORMATS fFormats); 338 /** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/ 342 339 343 /** 340 344 * Called when the guest wants to read host clipboard data. … … 347 351 * @param cbData Size (in bytes) of buffer where to return the clipboard data. 348 352 * @param pcbActual Where to return the amount of bytes read. 349 */ 350 int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData, uint32_t *pcbActual); 353 * 354 * @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read 355 * data 356 */ 357 int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, 358 void *pvData, uint32_t cbData, uint32_t *pcbActual); 359 351 360 /** 352 361 * Called when the guest writes clipboard data to the host. … … 360 369 */ 361 370 int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData); 371 362 372 /** 363 373 * Called when synchronization of the clipboard contents of the host clipboard with the guest is needed. -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp
r84142 r87566 38 38 39 39 40 /** Initialise the host side of the shared clipboard - called by the hgcm layer. */ 40 /* 41 * Initialise the host side of the shared clipboard - called by the hgcm layer. 42 */ 41 43 int ShClBackendInit(void) 42 44 { … … 45 47 } 46 48 47 /** Terminate the host side of the shared clipboard - called by the hgcm layer. */ 49 /* 50 * Terminate the host side of the shared clipboard - called by the hgcm layer. 51 */ 48 52 void ShClBackendDestroy(void) 49 53 { … … 51 55 } 52 56 53 /**54 * Enable the shared clipboard - called by the hgcm clipboard subsystem.55 *56 * @returns RT status code57 * @param pClient Structure containing context information about the guest system58 * @param fHeadless Whether headless.59 */60 57 int ShClBackendConnect(PSHCLCLIENT pClient, bool fHeadless) 61 58 { … … 65 62 } 66 63 67 /* *64 /* 68 65 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer 69 66 * after a save and restore of the guest. … … 76 73 } 77 74 78 /**79 * Shut down the shared clipboard subsystem and "disconnect" the guest.80 *81 * @param pClient Structure containing context information about the guest system82 */83 75 int ShClBackendDisconnect(PSHCLCLIENT pClient) 84 76 { … … 87 79 } 88 80 89 /** 90 * The guest is taking possession of the shared clipboard. Called by the HGCM clipboard 91 * subsystem. 92 * 93 * @param pClient Context data for the guest system. 94 * @param fFormats Clipboard formats the guest is offering. 81 /* 82 * The guest is taking possession of the shared clipboard. 83 * Called by the HGCM clipboard subsystem. 95 84 */ 96 85 int ShClBackendFormatAnnounce(PSHCLCLIENT pClient, SHCLFORMATS fFormats) … … 100 89 } 101 90 102 /* *91 /* 103 92 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard. 104 *105 * @param pClient Context information about the guest VM106 * @param pCmdCtx Command context to use.107 * @param uFormat Clipboard format to read.108 * @param pvData Where to return the read clipboard data.109 * @param cbData Size (in bytes) of buffer where to return the clipboard data.110 * @param pcbActual Where to store the actual amount of data available.111 93 */ 112 94 int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r87452 r87566 116 116 } 117 117 118 /* *118 /* 119 119 * Shut down the shared clipboard service and "disconnect" the guest. 120 * @noteHost glue code120 * Note! Host glue code 121 121 */ 122 122 int ShClBackendDisconnect(PSHCLCLIENT pClient) … … 173 173 * the backend code. 174 174 */ 175 int ShClBackendReadData(PSHCLCLIENT pClient, 176 PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat,void *pvData, uint32_t cbData, uint32_t *pcbActual)175 int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, 176 void *pvData, uint32_t cbData, uint32_t *pcbActual) 177 177 { 178 178 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 237 237 } 238 238 239 int ShClBackendWriteData(PSHCLCLIENT pClient, 240 PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData) 239 int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData) 241 240 { 242 241 RT_NOREF(pClient, pCmdCtx, uFormat, pvData, cbData); … … 250 249 } 251 250 252 /** @copydoc ShClX11ReportFormatsCallback */253 251 DECLCALLBACK(void) ShClX11ReportFormatsCallback(PSHCLCONTEXT pCtx, uint32_t fFormats) 254 252 { … … 272 270 } 273 271 274 /** @copydoc ShClX11RequestFromX11CompleteCallback */275 272 DECLCALLBACK(void) ShClX11RequestFromX11CompleteCallback(PSHCLCONTEXT pCtx, int rcCompletion, 276 273 CLIPREADCBREQ *pReq, void *pv, uint32_t cb) … … 309 306 } 310 307 311 /** @copydoc ShClX11RequestDataForX11Callback */312 308 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT uFmt, void **ppv, uint32_t *pcb) 313 309 { -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r87452 r87566 1695 1695 rc = ShClBackendReadData(pClient, &cmdCtx, uFormat, pvData, cbData, &cbActual); 1696 1696 if (RT_SUCCESS(rc)) 1697 {1698 1697 LogRel2(("Shared Clipboard: Read host clipboard data (max %RU32 bytes), got %RU32 bytes\n", cbData, cbActual)); 1699 }1700 1698 else 1701 1699 LogRel(("Shared Clipboard: Reading host clipboard data failed with %Rrc\n", rc));
Note:
See TracChangeset
for help on using the changeset viewer.