Changeset 81174 in vbox
- Timestamp:
- Oct 9, 2019 9:06:38 AM (5 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
r80998 r81174 119 119 int ShClSvcImplInit(void) 120 120 { 121 Log(("vboxClipboardInit\n"));122 123 121 g_ctx.fTerminate = false; 124 122 … … 228 226 } 229 227 230 /**231 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.232 *233 * @param pClient Context information about the guest VM.234 * @param pCmdCtx Command context to use for reading the data. Currently unused.235 * @param pData Data block to put read data into.236 * @param pcbActual Where to write the actual size of the written data.237 */238 228 int ShClSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 239 229 PSHCLDATABLOCK pData, uint32_t *pcbActual) … … 254 244 } 255 245 256 /**257 * Called by the HGCM clipboard subsystem when we have requested data and that data arrives.258 *259 *260 * @param pClient Context information about the guest VM.261 * @param pCmdCtx Command context to use for writing the data. Currently unused.262 * @param pData Data block to write to clipboard.263 */264 246 int ShClSvcImplWriteData(PSHCLCLIENT pClient, 265 247 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r80995 r81174 197 197 198 198 # ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 199 int shclSvcTransferStart(PSHCLCLIENT pClient, 200 SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource, 201 PSHCLTRANSFER *ppTransfer); 199 int shclSvcTransferStart(PSHCLCLIENT pClient, SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource, PSHCLTRANSFER *ppTransfer); 202 200 int shclSvcTransferStop(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer); 203 201 bool shclSvcTransferMsgIsAllowed(uint32_t uMode, uint32_t uMsg); 204 # 202 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */ 205 203 206 204 /* 207 205 * Platform-dependent implementations. 208 206 */ 207 /** 208 * Called on initialization. 209 */ 209 210 int ShClSvcImplInit(void); 211 /** 212 * Called on destruction. 213 */ 210 214 void ShClSvcImplDestroy(void); 211 215 /** 216 * Called when a new HGCM client connects. 217 * 218 * @returns VBox status code. 219 * @param pClient Shared Clipboard client context. 220 * @param fHeadless Whether this is a headless connection or not. 221 */ 212 222 int ShClSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless); 223 /** 224 * Called when a HGCM client disconnects. 225 * 226 * @returns VBox status code. 227 * @param pClient Shared Clipboard client context. 228 */ 213 229 int ShClSvcImplDisconnect(PSHCLCLIENT pClient); 230 /** 231 * Called when the guest reported available clipboard formats to the host OS. 232 * 233 * @returns VBox status code. 234 * @param pClient Shared Clipboard client context. 235 * @param pCmdCtx Shared Clipboard command context. 236 * @param pFormats Announced formats from the guest. 237 */ 214 238 int ShClSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats); 215 239 /** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/ 240 /** 241 * Called when the guest wants to read host clipboard data. 242 * 243 * @returns VBox status code. 244 * @param pClient Shared Clipboard client context. 245 * @param pCmdCtx Shared Clipboard command context. 246 * @param pData Where to return the read clipboard data. 247 * @param pcbActual Where to return the amount of bytes read. 248 */ 216 249 int ShClSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual); 250 /** 251 * Called when the guest writes clipboard data to the host. 252 * 253 * @returns VBox status code. 254 * @param pClient Shared Clipboard client context. 255 * @param pCmdCtx Shared Clipboard command context. 256 * @param pData Clipboard data from the guest. 257 */ 217 258 int ShClSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData); 218 259 /** 219 260 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer 220 261 * after a save and restore of the guest. 262 * 263 * @returns VBox status code. 264 * @param pClient Shared Clipboard client context. 221 265 */ 222 266 int ShClSvcImplSync(PSHCLCLIENT pClient); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r81152 r81174 78 78 } 79 79 80 /**81 * Initialise the host side of the shared clipboard.82 * @note Host glue code83 */84 80 int ShClSvcImplInit(void) 85 81 { … … 88 84 } 89 85 90 /**91 * Terminate the host side of the shared clipboard.92 * @note host glue code93 */94 86 void ShClSvcImplDestroy(void) 95 87 { … … 98 90 99 91 /** 100 * Connect a guest to the shared clipboard. 101 * @note on the host, we assume that some other application already owns 92 * @note On the host, we assume that some other application already owns 102 93 * the clipboard and leave ownership to X11. 103 94 */ … … 139 130 } 140 131 141 /**142 * Synchronise the contents of the host clipboard with the guest, called143 * after a save and restore of the guest.144 * @note Host glue code145 */146 132 int ShClSvcImplSync(PSHCLCLIENT pClient) 147 133 { … … 191 177 } 192 178 193 /**194 * VBox is taking possession of the shared clipboard.195 *196 * @param pClient Context data for the guest system.197 * @param pCmdCtx Command context to use.198 * @param pFormats Clipboard formats the guest is offering.199 */200 179 int ShClSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 201 180 PSHCLFORMATDATA pFormats) … … 227 206 228 207 /** 229 * Called when the host service wants to read the X11 clipboard.230 *231 * @returns VINF_SUCCESS on successful completion.232 * @returns VINF_HGCM_ASYNC_EXECUTE if the operation will complete asynchronously.233 * @returns IPRT status code on failure.234 *235 * @param pClient Context information about the guest VM.236 * @param pCmdCtx Command context to use.237 * @param pData Data block to put read data into.238 * @param pcbActual Where to write the actual size of the written data.239 *240 208 * @note We always fail or complete asynchronously. 241 209 * @note On success allocates a CLIPREADCBREQ structure which must be 242 210 * freed in ClipCompleteDataRequestFromX11 when it is called back from 243 211 * the backend code. 244 *245 212 */ 246 213 int ShClSvcImplReadData(PSHCLCLIENT pClient, … … 291 258 } 292 259 293 /**294 * Called when writing guest clipboard data to the host service.295 *296 * @param pClient Context information about the guest VM.297 * @param pCmdCtx Pointer to the clipboard command context.298 * @param pData Data block to write to clipboard.299 */300 260 int ShClSvcImplWriteData(PSHCLCLIENT pClient, 301 261 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)
Note:
See TracChangeset
for help on using the changeset viewer.