Changeset 80664 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Sep 9, 2019 10:00:04 AM (5 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
r80662 r80664 54 54 55 55 /** 56 * Checks if something is present on the clipboard and calls vboxSvcClipboardReportMsg.56 * Checks if something is present on the clipboard and calls sharedClipboardSvcReportMsg. 57 57 * 58 58 * @returns IPRT status code (ignored). … … 76 76 formatData.uFormats = fFormats; 77 77 78 rc = vboxSvcClipboardFormatsReport(pCtx->pClient, &formatData);78 rc = sharedClipboardSvcFormatsReport(pCtx->pClient, &formatData); 79 79 } 80 80 … … 117 117 118 118 119 int VBoxClipboardSvcImplInit(void)119 int SharedClipboardSvcImplInit(void) 120 120 { 121 121 Log(("vboxClipboardInit\n")); … … 137 137 } 138 138 139 void VBoxClipboardSvcImplDestroy(void)139 void SharedClipboardSvcImplDestroy(void) 140 140 { 141 141 /* … … 156 156 } 157 157 158 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)158 int SharedClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 159 159 { 160 160 RT_NOREF(fHeadless); … … 172 172 173 173 /* Initially sync the host clipboard content with the client. */ 174 int rc = VBoxClipboardSvcImplSync(pClient);175 176 VBoxSvcClipboardUnlock(); 177 return rc; 178 } 179 180 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)174 int rc = SharedClipboardSvcImplSync(pClient); 175 176 VBoxSvcClipboardUnlock(); 177 return rc; 178 } 179 180 int SharedClipboardSvcImplSync(PSHCLCLIENT pClient) 181 181 { 182 182 /* Sync the host clipboard content with the client. */ … … 190 190 } 191 191 192 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)192 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 193 193 { 194 194 VBoxSvcClipboardLock(); … … 201 201 } 202 202 203 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient,203 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, 204 204 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats) 205 205 { … … 225 225 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 226 226 227 return vboxSvcClipboardDataReadRequest(pClient, &dataReq, NULL /* puEvent */);227 return sharedClipboardSvcDataReadRequest(pClient, &dataReq, NULL /* puEvent */); 228 228 } 229 229 … … 236 236 * @param pcbActual Where to write the actual size of the written data. 237 237 */ 238 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,238 int SharedClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 239 239 PSHCLDATABLOCK pData, uint32_t *pcbActual) 240 240 { … … 262 262 * @param pData Data block to write to clipboard. 263 263 */ 264 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient,264 int SharedClipboardSvcImplWriteData(PSHCLCLIENT pClient, 265 265 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 266 266 { … … 277 277 278 278 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 279 int VBoxClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)279 int SharedClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 280 280 { 281 281 RT_NOREF(pClient, pDirData); … … 283 283 } 284 284 285 int VBoxClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)285 int SharedClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 286 286 { 287 287 RT_NOREF(pClient, pDirData); … … 289 289 } 290 290 291 int VBoxClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)291 int SharedClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 292 292 { 293 293 RT_NOREF(pClient, pFileHdr); … … 295 295 } 296 296 297 int VBoxClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)297 int SharedClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 298 298 { 299 299 RT_NOREF(pClient, pFileHdr); … … 301 301 } 302 302 303 int VBoxClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)303 int SharedClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 304 304 { 305 305 RT_NOREF(pClient, pFileData); … … 307 307 } 308 308 309 int VBoxClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)309 int SharedClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 310 310 { 311 311 RT_NOREF(pClient, pFileData); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r80662 r80664 46 46 * Structure for keeping a Shared Clipboard HGCM message context. 47 47 */ 48 typedef struct _ VBOXSHCLMSGCTX48 typedef struct _SHCLMSGCTX 49 49 { 50 50 /** Context ID. */ 51 51 uint32_t uContextID; 52 } VBOXSHCLMSGCTX, *PVBOXSHCLMSGCTX;52 } SHCLMSGCTX, *PSHCLMSGCTX; 53 53 54 54 /** … … 64 64 PVBOXHGCMSVCPARM m_paParms; 65 65 /** Message context. */ 66 VBOXSHCLMSGCTXm_Ctx;66 SHCLMSGCTX m_Ctx; 67 67 } SHCLCLIENTMSG, *PSHCLCLIENTMSG; 68 68 … … 178 178 * The service functions. Locking is between the service thread and the platform-dependent (window) thread. 179 179 */ 180 int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, PSHCLEVENTID puEvent);181 int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);182 int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats);183 184 uint32_t vboxSvcClipboardGetMode(void);185 int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource);186 187 void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient);188 PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms);189 void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg);190 void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms);191 int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend);192 int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait);193 int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);194 195 int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient);180 int sharedClipboardSvcDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, PSHCLEVENTID puEvent); 181 int sharedClipboardSvcDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData); 182 int sharedClipboardSvcFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats); 183 184 uint32_t sharedClipboardSvcGetMode(void); 185 int sharedClipboardSvcSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource); 186 187 void sharedClipboardSvcMsgQueueReset(PSHCLCLIENT pClient); 188 PSHCLCLIENTMSG sharedClipboardSvcMsgAlloc(uint32_t uMsg, uint32_t cParms); 189 void sharedClipboardSvcMsgFree(PSHCLCLIENTMSG pMsg); 190 void sharedClipboardSvcMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms); 191 int sharedClipboardSvcMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend); 192 int sharedClipboardSvcMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait); 193 int sharedClipboardSvcMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 194 195 int sharedClipboardSvcClientWakeup(PSHCLCLIENT pClient); 196 196 197 197 # ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 198 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient,198 int sharedClipboardSvcURITransferStart(PSHCLCLIENT pClient, 199 199 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 200 200 PSHCLURITRANSFER *ppTransfer); 201 bool vboxSvcClipboardURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg);201 bool sharedClipboardSvcURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg); 202 202 # endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 203 203 … … 205 205 * Platform-dependent implementations. 206 206 */ 207 int VBoxClipboardSvcImplInit(void);208 void VBoxClipboardSvcImplDestroy(void);209 210 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless);211 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient);212 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats);207 int SharedClipboardSvcImplInit(void); 208 void SharedClipboardSvcImplDestroy(void); 209 210 int SharedClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless); 211 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT pClient); 212 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats); 213 213 /** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/ 214 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual);215 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData);214 int SharedClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual); 215 int SharedClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData); 216 216 /** 217 217 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer 218 218 * after a save and restore of the guest. 219 219 */ 220 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient);220 int SharedClipboardSvcImplSync(PSHCLCLIENT pClient); 221 221 222 222 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 223 int vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx);224 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx);225 226 int vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList);227 228 int vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx,223 int sharedClipboardSvcURITransferOpen(PSHCLPROVIDERCTX pCtx); 224 DECLCALLBACK(int) sharedClipboardSvcURITransferClose(PSHCLPROVIDERCTX pCtx); 225 226 int sharedClipboardSvcURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList); 227 228 int sharedClipboardSvcURIListOpen(PSHCLPROVIDERCTX pCtx, 229 229 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList); 230 int vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList);231 int vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,230 int sharedClipboardSvcURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList); 231 int sharedClipboardSvcURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 232 232 PSHCLLISTHDR pListHdr); 233 int vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,233 int sharedClipboardSvcURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 234 234 PSHCLLISTHDR pListHdr); 235 int vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,235 int sharedClipboardSvcURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 236 236 PSHCLLISTENTRY pListEntry); 237 int vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList,237 int sharedClipboardSvcURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 238 238 PSHCLLISTENTRY pListEntry); 239 239 240 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,240 int sharedClipboardSvcURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 241 241 PSHCLOBJHANDLE phObj); 242 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj);243 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,242 int sharedClipboardSvcURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj); 243 int sharedClipboardSvcURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 244 244 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead); 245 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,245 int sharedClipboardSvcURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 246 246 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten); 247 247 … … 253 253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 254 254 255 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);256 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);255 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 256 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 257 257 #endif /*VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 258 258 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp
r80662 r80664 48 48 * Prototypes * 49 49 *********************************************************************************************************************************/ 50 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],51 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms);52 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],53 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList);50 static int sharedClipboardSvcURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 51 PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms); 52 static int sharedClipboardSvcURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 53 PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList); 54 54 55 55 … … 58 58 *********************************************************************************************************************************/ 59 59 60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx)60 DECLCALLBACK(int) sharedClipboardSvcURITransferOpen(PSHCLPROVIDERCTX pCtx) 61 61 { 62 62 RT_NOREF(pCtx); … … 66 66 } 67 67 68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx)68 DECLCALLBACK(int) sharedClipboardSvcURITransferClose(PSHCLPROVIDERCTX pCtx) 69 69 { 70 70 RT_NOREF(pCtx); … … 74 74 } 75 75 76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList)76 DECLCALLBACK(int) sharedClipboardSvcURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList) 77 77 { 78 78 LogFlowFuncEnter(); … … 83 83 int rc; 84 84 85 PSHCLCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ,85 PSHCLCLIENTMSG pMsgHdr = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ, 86 86 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_HDR_READ); 87 87 if (pMsgHdr) … … 92 92 HGCMSvcSetU32(&pMsgHdr->m_paParms[1], 0 /* fRoots */); 93 93 94 rc = vboxSvcClipboardMsgAdd(pClient, pMsgHdr, true /* fAppend */);94 rc = sharedClipboardSvcMsgAdd(pClient, pMsgHdr, true /* fAppend */); 95 95 if (RT_SUCCESS(rc)) 96 96 { … … 98 98 AssertRC(rc2); 99 99 100 rc = vboxSvcClipboardClientWakeup(pClient);100 rc = sharedClipboardSvcClientWakeup(pClient); 101 101 if (RT_SUCCESS(rc)) 102 102 { … … 123 123 for (uint32_t i = 0; i < pSrcRootListHdr->cRoots; i++) 124 124 { 125 PSHCLCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,125 PSHCLCLIENTMSG pMsgEntry = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ, 126 126 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_ENTRY_READ_REQ); 127 127 … … 136 136 AssertRC(rc2); 137 137 138 rc = vboxSvcClipboardMsgAdd(pClient, pMsgEntry, true /* fAppend */);138 rc = sharedClipboardSvcMsgAdd(pClient, pMsgEntry, true /* fAppend */); 139 139 if (RT_FAILURE(rc)) 140 140 break; … … 190 190 } 191 191 192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx,193 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList)192 DECLCALLBACK(int) sharedClipboardSvcURIListOpen(PSHCLPROVIDERCTX pCtx, 193 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList) 194 194 { 195 195 LogFlowFuncEnter(); … … 200 200 int rc; 201 201 202 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN,203 202 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN, 203 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_OPEN); 204 204 if (pMsg) 205 205 { … … 208 208 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); 209 209 210 rc = vboxSvcClipboardURISetListOpen(pMsg->m_cParms, pMsg->m_paParms, &pMsg->m_Ctx, pOpenParms);211 if (RT_SUCCESS(rc)) 212 { 213 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);210 rc = sharedClipboardSvcURISetListOpen(pMsg->m_cParms, pMsg->m_paParms, &pMsg->m_Ctx, pOpenParms); 211 if (RT_SUCCESS(rc)) 212 { 213 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 214 214 if (RT_SUCCESS(rc)) 215 215 { … … 217 217 AssertRC(rc2); 218 218 219 rc = vboxSvcClipboardClientWakeup(pClient);219 rc = sharedClipboardSvcClientWakeup(pClient); 220 220 if (RT_SUCCESS(rc)) 221 221 { … … 248 248 } 249 249 250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList)250 DECLCALLBACK(int) sharedClipboardSvcURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList) 251 251 { 252 252 LogFlowFuncEnter(); … … 257 257 int rc; 258 258 259 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE,259 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE, 260 260 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_CLOSE); 261 261 if (pMsg) … … 265 265 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); 266 266 267 rc = vboxSvcClipboardURISetListClose(pMsg->m_cParms, pMsg->m_paParms, &pMsg->m_Ctx, hList);268 if (RT_SUCCESS(rc)) 269 { 270 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);267 rc = sharedClipboardSvcURISetListClose(pMsg->m_cParms, pMsg->m_paParms, &pMsg->m_Ctx, hList); 268 if (RT_SUCCESS(rc)) 269 { 270 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 271 271 if (RT_SUCCESS(rc)) 272 272 { … … 274 274 AssertRC(rc2); 275 275 276 rc = vboxSvcClipboardClientWakeup(pClient);276 rc = sharedClipboardSvcClientWakeup(pClient); 277 277 if (RT_SUCCESS(rc)) 278 278 { … … 294 294 } 295 295 296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx,297 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)296 DECLCALLBACK(int) sharedClipboardSvcURIListHdrRead(PSHCLPROVIDERCTX pCtx, 297 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 298 298 { 299 299 LogFlowFuncEnter(); … … 304 304 int rc; 305 305 306 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ,307 306 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ, 307 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_HDR_READ_REQ); 308 308 if (pMsg) 309 309 { … … 314 314 HGCMSvcSetU32(&pMsg->m_paParms[2], 0 /* fFlags */); 315 315 316 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);316 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 317 317 if (RT_SUCCESS(rc)) 318 318 { … … 320 320 AssertRC(rc2); 321 321 322 rc = vboxSvcClipboardClientWakeup(pClient);322 rc = sharedClipboardSvcClientWakeup(pClient); 323 323 if (RT_SUCCESS(rc)) 324 324 { … … 344 344 } 345 345 346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx,347 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)346 DECLCALLBACK(int) sharedClipboardSvcURIListHdrWrite(PSHCLPROVIDERCTX pCtx, 347 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 348 348 { 349 349 RT_NOREF(pCtx, hList, pListHdr); … … 354 354 } 355 355 356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx,357 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)356 DECLCALLBACK(int) sharedClipboardSvcURIListEntryRead(PSHCLPROVIDERCTX pCtx, 357 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 358 358 { 359 359 LogFlowFuncEnter(); … … 364 364 int rc; 365 365 366 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ,367 366 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ, 367 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_ENTRY_READ); 368 368 if (pMsg) 369 369 { … … 374 374 HGCMSvcSetU32(&pMsg->m_paParms[2], 0 /* fInfo */); 375 375 376 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);376 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 377 377 if (RT_SUCCESS(rc)) 378 378 { … … 380 380 AssertRC(rc2); 381 381 382 rc = vboxSvcClipboardClientWakeup(pClient);382 rc = sharedClipboardSvcClientWakeup(pClient); 383 383 if (RT_SUCCESS(rc)) 384 384 { … … 403 403 } 404 404 405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx,406 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)405 DECLCALLBACK(int) sharedClipboardSvcURIListEntryWrite(PSHCLPROVIDERCTX pCtx, 406 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 407 407 { 408 408 RT_NOREF(pCtx, hList, pListEntry); … … 413 413 } 414 414 415 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,416 PSHCLOBJHANDLE phObj)415 int sharedClipboardSvcURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 416 PSHCLOBJHANDLE phObj) 417 417 { 418 418 LogFlowFuncEnter(); … … 423 423 int rc; 424 424 425 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN,426 425 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN, 426 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_OPEN); 427 427 if (pMsg) 428 428 { … … 439 439 HGCMSvcSetU32(&pMsg->m_paParms[4], pCreateParms->fCreate); 440 440 441 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);441 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 442 442 if (RT_SUCCESS(rc)) 443 443 { … … 445 445 AssertRC(rc2); 446 446 447 rc = vboxSvcClipboardClientWakeup(pClient);447 rc = sharedClipboardSvcClientWakeup(pClient); 448 448 if (RT_SUCCESS(rc)) 449 449 { … … 473 473 } 474 474 475 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj)475 int sharedClipboardSvcURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj) 476 476 { 477 477 LogFlowFuncEnter(); … … 482 482 int rc; 483 483 484 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE,484 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE, 485 485 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_CLOSE); 486 486 if (pMsg) … … 491 491 HGCMSvcSetU64(&pMsg->m_paParms[1], hObj); 492 492 493 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);493 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 494 494 if (RT_SUCCESS(rc)) 495 495 { … … 497 497 AssertRC(rc2); 498 498 499 rc = vboxSvcClipboardClientWakeup(pClient);499 rc = sharedClipboardSvcClientWakeup(pClient); 500 500 if (RT_SUCCESS(rc)) 501 501 { … … 525 525 } 526 526 527 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,528 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)527 int sharedClipboardSvcURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 528 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead) 529 529 { 530 530 LogFlowFuncEnter(); … … 535 535 int rc; 536 536 537 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ,537 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ, 538 538 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_READ_REQ); 539 539 if (pMsg) … … 546 546 HGCMSvcSetU32(&pMsg->m_paParms[3], fFlags); 547 547 548 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);548 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 549 549 if (RT_SUCCESS(rc)) 550 550 { … … 552 552 AssertRC(rc2); 553 553 554 rc = vboxSvcClipboardClientWakeup(pClient);554 rc = sharedClipboardSvcClientWakeup(pClient); 555 555 if (RT_SUCCESS(rc)) 556 556 { … … 583 583 } 584 584 585 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,586 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)585 int sharedClipboardSvcURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 586 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten) 587 587 { 588 588 LogFlowFuncEnter(); … … 593 593 int rc; 594 594 595 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE,595 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE, 596 596 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_WRITE); 597 597 if (pMsg) … … 604 604 HGCMSvcSetU64(&pMsg->m_paParms[3], fFlags); 605 605 606 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);606 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 607 607 if (RT_SUCCESS(rc)) 608 608 { … … 610 610 AssertRC(rc2); 611 611 612 rc = vboxSvcClipboardClientWakeup(pClient);612 rc = sharedClipboardSvcClientWakeup(pClient); 613 613 if (RT_SUCCESS(rc)) 614 614 { … … 688 688 * @param pReply Where to store the reply. 689 689 */ 690 static int vboxSvcClipboardURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[],691 PSHCLREPLY pReply)690 static int sharedClipboardSvcURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 691 PSHCLREPLY pReply) 692 692 { 693 693 int rc; … … 756 756 * @param pRootLstHdr Where to store the URI root list header on success. 757 757 */ 758 static int vboxSvcClipboardURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],759 PSHCLROOTLISTHDR pRootLstHdr)758 static int sharedClipboardSvcURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 759 PSHCLROOTLISTHDR pRootLstHdr) 760 760 { 761 761 int rc; … … 782 782 * @param pListEntry Where to store the root list entry. 783 783 */ 784 static int vboxSvcClipboardURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],785 PSHCLROOTLISTENTRY pListEntry)784 static int sharedClipboardSvcURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 785 PSHCLROOTLISTENTRY pListEntry) 786 786 { 787 787 int rc; … … 819 819 * @param pOpenParms Where to store the open parameters of the request. 820 820 */ 821 static int vboxSvcClipboardURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],822 PSHCLLISTOPENPARMS pOpenParms)821 static int sharedClipboardSvcURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 822 PSHCLLISTOPENPARMS pOpenParms) 823 823 { 824 824 int rc; … … 866 866 * @param pOpenParms List open parameters to set. 867 867 */ 868 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],869 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms)868 static int sharedClipboardSvcURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 869 PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms) 870 870 { 871 871 int rc; … … 899 899 * @param hList Handle of list to close. 900 900 */ 901 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],902 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList)901 static int sharedClipboardSvcURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 902 PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList) 903 903 { 904 904 int rc; … … 927 927 * @param pListHdr Where to store the list header. 928 928 */ 929 static int vboxSvcClipboardURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],930 PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr)929 static int sharedClipboardSvcURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 930 PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr) 931 931 { 932 932 int rc; … … 966 966 * @param pListHdr Pointer to data to set to the HGCM parameters. 967 967 */ 968 static int vboxSvcClipboardURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],969 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr)968 static int sharedClipboardSvcURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 969 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr) 970 970 { 971 971 int rc; … … 1001 1001 * @param pListEntry Where to store the list entry. 1002 1002 */ 1003 static int vboxSvcClipboardURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],1004 PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry)1003 static int sharedClipboardSvcURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1004 PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry) 1005 1005 { 1006 1006 int rc; … … 1047 1047 * @param pListEntry Pointer to data to set to the HGCM parameters. 1048 1048 */ 1049 static int vboxSvcClipboardURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],1049 static int sharedClipboardSvcURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1050 1050 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry) 1051 1051 { … … 1079 1079 * @param pDataChunk Where to store the object data chunk data. 1080 1080 */ 1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk)1081 static int sharedClipboardSvcURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk) 1082 1082 { 1083 1083 AssertPtrReturn(paParms, VERR_INVALID_PARAMETER); … … 1117 1117 * @param pRc Where to store the received error code. 1118 1118 */ 1119 static int vboxSvcClipboardURIGetError(uint32_t cParms, VBOXHGCMSVCPARM paParms[], int *pRc)1119 static int sharedClipboardSvcURIGetError(uint32_t cParms, VBOXHGCMSVCPARM paParms[], int *pRc) 1120 1120 { 1121 1121 AssertPtrReturn(paParms, VERR_INVALID_PARAMETER); … … 1144 1144 * @param paParms Array function parameters supplied. 1145 1145 */ 1146 static int vboxSvcClipboardURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer,1147 uint32_t cParms, VBOXHGCMSVCPARM paParms[])1146 static int sharedClipboardSvcURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer, 1147 uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 1148 1148 { 1149 1149 RT_NOREF(pClient); … … 1155 1155 if (pReply) 1156 1156 { 1157 rc = vboxSvcClipboardURIGetReply(cParms, paParms, pReply);1157 rc = sharedClipboardSvcURIGetReply(cParms, paParms, pReply); 1158 1158 if (RT_SUCCESS(rc)) 1159 1159 { … … 1227 1227 * @param tsArrival Timestamp of arrival. 1228 1228 */ 1229 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient,1230 VBOXHGCMCALLHANDLE callHandle,1231 uint32_t u32Function,1232 uint32_t cParms,1233 VBOXHGCMSVCPARM paParms[],1234 uint64_t tsArrival)1229 int sharedClipboardSvcURIHandler(PSHCLCLIENT pClient, 1230 VBOXHGCMCALLHANDLE callHandle, 1231 uint32_t u32Function, 1232 uint32_t cParms, 1233 VBOXHGCMSVCPARM paParms[], 1234 uint64_t tsArrival) 1235 1235 { 1236 1236 RT_NOREF(paParms, tsArrival); … … 1240 1240 1241 1241 /* Check if we've the right mode set. */ 1242 if (! vboxSvcClipboardURIMsgIsAllowed(vboxSvcClipboardGetMode(), u32Function))1242 if (!sharedClipboardSvcURIMsgIsAllowed(sharedClipboardSvcGetMode(), u32Function)) 1243 1243 { 1244 1244 LogFunc(("Wrong clipboard mode, denying access\n")); … … 1325 1325 if (RT_SUCCESS(rc)) 1326 1326 { 1327 rc = vboxSvcClipboardURIAreaRegister(&pClient->State, pTransfer);1327 rc = sharedClipboardSvcURIAreaRegister(&pClient->State, pTransfer); 1328 1328 if (RT_SUCCESS(rc)) 1329 1329 { … … 1333 1333 creationCtx.enmSource = pClient->State.enmSource; 1334 1334 1335 creationCtx.Interface.pfnTransferOpen = vboxSvcClipboardURITransferOpen;1336 creationCtx.Interface.pfnTransferClose = vboxSvcClipboardURITransferClose;1337 creationCtx.Interface.pfnListOpen = vboxSvcClipboardURIListOpen;1338 creationCtx.Interface.pfnListClose = vboxSvcClipboardURIListClose;1339 creationCtx.Interface.pfnObjOpen = vboxSvcClipboardURIObjOpen;1340 creationCtx.Interface.pfnObjClose = vboxSvcClipboardURIObjClose;1335 creationCtx.Interface.pfnTransferOpen = sharedClipboardSvcURITransferOpen; 1336 creationCtx.Interface.pfnTransferClose = sharedClipboardSvcURITransferClose; 1337 creationCtx.Interface.pfnListOpen = sharedClipboardSvcURIListOpen; 1338 creationCtx.Interface.pfnListClose = sharedClipboardSvcURIListClose; 1339 creationCtx.Interface.pfnObjOpen = sharedClipboardSvcURIObjOpen; 1340 creationCtx.Interface.pfnObjClose = sharedClipboardSvcURIObjClose; 1341 1341 1342 1342 if (enmDir == SHCLURITRANSFERDIR_READ) 1343 1343 { 1344 creationCtx.Interface.pfnGetRoots = vboxSvcClipboardURIGetRoots;1345 creationCtx.Interface.pfnListHdrRead = vboxSvcClipboardURIListHdrRead;1346 creationCtx.Interface.pfnListEntryRead = vboxSvcClipboardURIListEntryRead;1347 creationCtx.Interface.pfnObjRead = vboxSvcClipboardURIObjRead;1344 creationCtx.Interface.pfnGetRoots = sharedClipboardSvcURIGetRoots; 1345 creationCtx.Interface.pfnListHdrRead = sharedClipboardSvcURIListHdrRead; 1346 creationCtx.Interface.pfnListEntryRead = sharedClipboardSvcURIListEntryRead; 1347 creationCtx.Interface.pfnObjRead = sharedClipboardSvcURIObjRead; 1348 1348 } 1349 1349 else … … 1374 1374 if (RT_SUCCESS(rc)) 1375 1375 { 1376 rc = VBoxClipboardSvcImplURITransferCreate(pClient, pTransfer);1376 rc = SharedClipboardSvcImplURITransferCreate(pClient, pTransfer); 1377 1377 if (RT_SUCCESS(rc)) 1378 rc = VBoxClipboardSvcImplFormatAnnounce(pClient, VBOX_SHARED_CLIPBOARD_FMT_URI_LIST);1378 rc = SharedClipboardSvcImplFormatAnnounce(pClient, VBOX_SHARED_CLIPBOARD_FMT_URI_LIST); 1379 1379 } 1380 1380 1381 1381 if (RT_FAILURE(rc)) 1382 1382 { 1383 VBoxClipboardSvcImplURITransferDestroy(pClient, pTransfer);1383 SharedClipboardSvcImplURITransferDestroy(pClient, pTransfer); 1384 1384 SharedClipboardURITransferDestroy(pTransfer); 1385 1385 } … … 1398 1398 case VBOX_SHARED_CLIPBOARD_GUEST_FN_REPLY: 1399 1399 { 1400 rc = vboxSvcClipboardURITransferHandleReply(pClient, pTransfer, cParms, paParms);1400 rc = sharedClipboardSvcURITransferHandleReply(pClient, pTransfer, cParms, paParms); 1401 1401 break; 1402 1402 } … … 1410 1410 { 1411 1411 SHCLROOTLISTHDR lstHdr; 1412 rc = vboxSvcClipboardURIGetRootListHdr(cParms, paParms, &lstHdr);1412 rc = sharedClipboardSvcURIGetRootListHdr(cParms, paParms, &lstHdr); 1413 1413 if (RT_SUCCESS(rc)) 1414 1414 { … … 1459 1459 { 1460 1460 SHCLROOTLISTENTRY lstEntry; 1461 rc = vboxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry);1461 rc = sharedClipboardSvcURIGetRootListEntry(cParms, paParms, &lstEntry); 1462 1462 if (RT_SUCCESS(rc)) 1463 1463 { … … 1487 1487 { 1488 1488 SHCLLISTOPENPARMS listOpenParms; 1489 rc = vboxSvcClipboardURIGetListOpen(cParms, paParms, &listOpenParms);1489 rc = sharedClipboardSvcURIGetListOpen(cParms, paParms, &listOpenParms); 1490 1490 if (RT_SUCCESS(rc)) 1491 1491 { … … 1527 1527 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 1528 1528 /*if (RT_SUCCESS(rc)) 1529 rc = vboxSvcClipboardURISetListHdr(cParms, paParms, &hdrList);*/1529 rc = sharedClipboardSvcURISetListHdr(cParms, paParms, &hdrList);*/ 1530 1530 } 1531 1531 break; … … 1539 1539 { 1540 1540 SHCLLISTHANDLE hList; 1541 rc = vboxSvcClipboardURIGetListHdr(cParms, paParms, &hList, &hdrList);1541 rc = sharedClipboardSvcURIGetListHdr(cParms, paParms, &hList, &hdrList); 1542 1542 if (RT_SUCCESS(rc)) 1543 1543 { … … 1587 1587 { 1588 1588 SHCLLISTHANDLE hList; 1589 rc = vboxSvcClipboardURIGetListEntry(cParms, paParms, &hList, &entryList);1589 rc = sharedClipboardSvcURIGetListEntry(cParms, paParms, &hList, &entryList); 1590 1590 if (RT_SUCCESS(rc)) 1591 1591 { … … 1633 1633 { 1634 1634 SHCLOBJDATACHUNK dataChunk; 1635 rc = vboxSvcClipboardURIGetObjDataChunk(cParms, paParms, &dataChunk);1635 rc = sharedClipboardSvcURIGetObjDataChunk(cParms, paParms, &dataChunk); 1636 1636 if (RT_SUCCESS(rc)) 1637 1637 { … … 1838 1838 { 1839 1839 int rcGuest; 1840 rc = vboxSvcClipboardURIGetError(cParms,paParms, &rcGuest);1840 rc = sharedClipboardSvcURIGetError(cParms,paParms, &rcGuest); 1841 1841 if (RT_SUCCESS(rc)) 1842 1842 LogRel(("Shared Clipboard: Transfer error: %Rrc\n", rcGuest)); … … 1869 1869 * @param paParms Array function parameters supplied. 1870 1870 */ 1871 int vboxSvcClipboardURIHostHandler(uint32_t u32Function,1871 int sharedClipboardSvcURIHostHandler(uint32_t u32Function, 1872 1872 uint32_t cParms, 1873 1873 VBOXHGCMSVCPARM paParms[]) … … 1901 1901 * @param pTransfer URI transfer to register a clipboard area for. 1902 1902 */ 1903 int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)1903 int sharedClipboardSvcURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1904 1904 { 1905 1905 RT_NOREF(pClientState); … … 1950 1950 * @param pTransfer URI transfer to unregister a clipboard area from. 1951 1951 */ 1952 int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)1952 int sharedClipboardSvcURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1953 1953 { 1954 1954 RT_NOREF(pClientState); … … 1998 1998 * @param uID ID of clipboard area to to attach to. Specify 0 to attach to the most recent one. 1999 1999 */ 2000 int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer,2000 int sharedClipboardSvcURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, 2001 2001 SHCLAREAID uID) 2002 2002 { … … 2046 2046 * @param pTransfer URI transfer to detach a clipboard area from. 2047 2047 */ 2048 int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)2048 int sharedClipboardSvcURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 2049 2049 { 2050 2050 RT_NOREF(pClientState); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.h
r80662 r80664 22 22 #endif 23 23 24 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);25 int vboxSvcClipboardURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);24 int sharedClipboardSvcURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival); 25 int sharedClipboardSvcURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 26 26 27 int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);28 int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);29 int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, SHCLAREAID uID);30 int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);27 int sharedClipboardSvcURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 28 int sharedClipboardSvcURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 29 int sharedClipboardSvcURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, SHCLAREAID uID); 30 int sharedClipboardSvcURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer); 31 31 32 32 #endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_uri_h */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp
r80662 r80664 107 107 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_TRANSFER_START\n")); 108 108 109 if ( vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST110 && vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL)109 if ( sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST 110 && sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL) 111 111 { 112 112 LogFlowFunc(("Wrong clipboard mode, skipping\n")); … … 130 130 } 131 131 132 bool vboxSvcClipboardURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])132 bool sharedClipboardSvcURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 133 133 { 134 134 RT_NOREF(pClient, cParms, paParms); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r80662 r80664 73 73 74 74 if ( u32Format == VBOX_SHARED_CLIPBOARD_FMT_HTML 75 && VBoxClipboardWinIsCFHTML((const char *)pvSrc))75 && SharedClipboardWinIsCFHTML((const char *)pvSrc)) 76 76 { 77 77 /** @todo r=bird: Why the double conversion? */ 78 78 char *pszBuf = NULL; 79 79 uint32_t cbBuf = 0; 80 int rc = VBoxClipboardWinConvertCFHTMLToMIME((const char *)pvSrc, cbSrc, &pszBuf, &cbBuf);80 int rc = SharedClipboardWinConvertCFHTMLToMIME((const char *)pvSrc, cbSrc, &pszBuf, &cbBuf); 81 81 if (RT_SUCCESS(rc)) 82 82 { … … 175 175 RT_ZERO(dataReq); 176 176 177 dataReq.uFmt = VBoxClipboardWinClipboardFormatToVBox(cfFormat);177 dataReq.uFmt = SharedClipboardWinClipboardFormatToVBox(cfFormat); 178 178 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 179 179 180 180 SHCLEVENTID uEvent = 0; 181 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent);181 int rc = sharedClipboardSvcDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 182 182 if (RT_SUCCESS(rc)) 183 183 { … … 222 222 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 223 223 if (RT_SUCCESS(rc)) 224 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);224 sharedClipboardSvcSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 225 225 } 226 226 … … 231 231 { 232 232 LogFunc(("WM_CHANGECBCHAIN\n")); 233 lresultRc = VBoxClipboardWinHandleWMChangeCBChain(pWinCtx, hWnd, uMsg, wParam, lParam);233 lresultRc = SharedClipboardWinHandleWMChangeCBChain(pWinCtx, hWnd, uMsg, wParam, lParam); 234 234 break; 235 235 } … … 244 244 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 245 245 if (RT_SUCCESS(rc)) 246 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);247 } 248 249 lresultRc = VBoxClipboardWinChainPassToNext(pWinCtx, uMsg, wParam, lParam);246 sharedClipboardSvcSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 247 } 248 249 lresultRc = SharedClipboardWinChainPassToNext(pWinCtx, uMsg, wParam, lParam); 250 250 break; 251 251 } … … 253 253 case WM_TIMER: 254 254 { 255 int rc = VBoxClipboardWinHandleWMTimer(pWinCtx);255 int rc = SharedClipboardWinHandleWMTimer(pWinCtx); 256 256 AssertRC(rc); 257 257 … … 266 266 const UINT cfFormat = (UINT)wParam; 267 267 268 const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);268 const SHCLFORMAT fFormat = SharedClipboardWinClipboardFormatToVBox(cfFormat); 269 269 270 270 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); … … 275 275 /* Unsupported clipboard format is requested. */ 276 276 LogFunc(("WM_RENDERFORMAT unsupported format requested or client is not active\n")); 277 VBoxClipboardWinClear();277 SharedClipboardWinClear(); 278 278 } 279 279 else … … 293 293 294 294 if (RT_FAILURE(rc)) 295 VBoxClipboardWinClear();295 SharedClipboardWinClear(); 296 296 } 297 297 … … 303 303 LogFunc(("WM_RENDERALLFORMATS\n")); 304 304 305 int rc = VBoxClipboardWinHandleWMRenderAllFormats(pWinCtx, hWnd);305 int rc = SharedClipboardWinHandleWMRenderAllFormats(pWinCtx, hWnd); 306 306 AssertRC(rc); 307 307 … … 309 309 } 310 310 311 case VBOX_CLIPBOARD_WM_REPORT_FORMATS:311 case SHCL_WIN_WM_REPORT_FORMATS: 312 312 { 313 313 LogFunc(("VBOX_CLIPBOARD_WM_REPORT_FORMATS\n")); … … 317 317 if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */ 318 318 { 319 int rc = VBoxClipboardWinOpen(hWnd);319 int rc = SharedClipboardWinOpen(hWnd); 320 320 if (RT_SUCCESS(rc)) 321 321 { 322 VBoxClipboardWinClear();323 324 rc = VBoxClipboardWinAnnounceFormats(pWinCtx, fFormats);325 326 VBoxClipboardWinClose();322 SharedClipboardWinClear(); 323 324 rc = SharedClipboardWinAnnounceFormats(pWinCtx, fFormats); 325 326 SharedClipboardWinClose(); 327 327 } 328 328 … … 337 337 LogFunc(("WM_DESTROY\n")); 338 338 339 int rc = VBoxClipboardWinHandleWMDestroy(pWinCtx);339 int rc = SharedClipboardWinHandleWMDestroy(pWinCtx); 340 340 AssertRC(rc); 341 341 … … 416 416 char szWndClassName[32]; 417 417 RTStrPrintf2(szWndClassName, sizeof(szWndClassName), 418 "%s-%RU64", VBOX_CLIPBOARD_WNDCLASS_NAME, RTThreadGetNative(hThreadSelf));418 "%s-%RU64", SHCL_WIN_WNDCLASS_NAME, RTThreadGetNative(hThreadSelf)); 419 419 wc.lpszClassName = szWndClassName; 420 420 … … 444 444 SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE); 445 445 446 rc = VBoxClipboardWinChainAdd(&pCtx->Win);446 rc = SharedClipboardWinChainAdd(&pCtx->Win); 447 447 if (RT_SUCCESS(rc)) 448 448 { 449 if (! VBoxClipboardWinIsNewAPI(&pWinCtx->newAPI))449 if (!SharedClipboardWinIsNewAPI(&pWinCtx->newAPI)) 450 450 pWinCtx->oldAPI.timerRefresh = SetTimer(pWinCtx->hWnd, 0, 10 * 1000, NULL); 451 451 } … … 530 530 RT_ZERO(Formats); 531 531 532 rc = VBoxClipboardWinGetFormats(&pCtx->Win, &Formats);532 rc = SharedClipboardWinGetFormats(&pCtx->Win, &Formats); 533 533 if ( RT_SUCCESS(rc) 534 534 && Formats.uFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) 535 535 { 536 rc = vboxSvcClipboardFormatsReport(pCtx->pClient, &Formats);536 rc = sharedClipboardSvcFormatsReport(pCtx->pClient, &Formats); 537 537 } 538 538 } … … 548 548 */ 549 549 550 int VBoxClipboardSvcImplInit(void)551 { 552 /* Initialization is done in VBoxClipboardSvcImplConnect(). */550 int SharedClipboardSvcImplInit(void) 551 { 552 /* Initialization is done in SharedClipboardSvcImplConnect(). */ 553 553 return VINF_SUCCESS; 554 554 } 555 555 556 void VBoxClipboardSvcImplDestroy(void)557 { 558 /* Destruction is done in VBoxClipboardSvcImplDisconnect(). */559 } 560 561 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)556 void SharedClipboardSvcImplDestroy(void) 557 { 558 /* Destruction is done in SharedClipboardSvcImplDisconnect(). */ 559 } 560 561 int SharedClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 562 562 { 563 563 RT_NOREF(fHeadless); … … 571 571 { 572 572 /* Check that new Clipboard API is available. */ 573 rc = VBoxClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI);573 rc = SharedClipboardWinCheckAndInitNewAPI(&pCtx->Win.newAPI); 574 574 if (RT_SUCCESS(rc)) 575 575 { … … 587 587 588 588 /* Sync the host clipboard content with the client. */ 589 rc = VBoxClipboardSvcImplSync(pClient);589 rc = SharedClipboardSvcImplSync(pClient); 590 590 } 591 591 else … … 596 596 } 597 597 598 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)598 int SharedClipboardSvcImplSync(PSHCLCLIENT pClient) 599 599 { 600 600 /* Sync the host clipboard content with the client. */ … … 602 602 } 603 603 604 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)604 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 605 605 { 606 606 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 641 641 } 642 642 643 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,644 PSHCLFORMATDATA pFormats)643 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 644 PSHCLFORMATDATA pFormats) 645 645 { 646 646 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 658 658 { 659 659 PSHCLURITRANSFER pTransfer; 660 rc = vboxSvcClipboardURITransferStart(pClient,661 SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE,662 &pTransfer);660 rc = sharedClipboardSvcURITransferStart(pClient, 661 SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE, 662 &pTransfer); 663 663 if (RT_SUCCESS(rc)) 664 664 { 665 665 /* Create the IDataObject implementation the host OS needs and assign 666 666 * the newly created transfer to this object. */ 667 rc = VBoxClipboardWinURITransferCreate(&pCtx->Win, pTransfer);667 rc = SharedClipboardWinURITransferCreate(&pCtx->Win, pTransfer); 668 668 669 669 /* Note: The actual requesting + retrieving of data will be done in the IDataObject implementation … … 678 678 * The guest announced formats. Forward to the window thread. 679 679 */ 680 PostMessage(pCtx->Win.hWnd, VBOX_CLIPBOARD_WM_REPORT_FORMATS,680 PostMessage(pCtx->Win.hWnd, SHCL_WIN_WM_REPORT_FORMATS, 681 681 0 /* wParam */, pFormats->uFormats /* lParam */); 682 682 … … 691 691 } 692 692 693 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,694 PSHCLDATABLOCK pData, uint32_t *pcbActual)693 int SharedClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 694 PSHCLDATABLOCK pData, uint32_t *pcbActual) 695 695 { 696 696 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 707 707 * The guest wants to read data in the given format. 708 708 */ 709 int rc = VBoxClipboardWinOpen(pWinCtx->hWnd);709 int rc = SharedClipboardWinOpen(pWinCtx->hWnd); 710 710 if (RT_SUCCESS(rc)) 711 711 { … … 758 758 else if (pData->uFormat & VBOX_SHARED_CLIPBOARD_FMT_HTML) 759 759 { 760 UINT format = RegisterClipboardFormat( VBOX_CLIPBOARD_WIN_REGFMT_HTML);760 UINT format = RegisterClipboardFormat(SHCL_WIN_REGFMT_HTML); 761 761 if (format != 0) 762 762 { … … 789 789 } 790 790 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 791 VBoxClipboardWinClose();791 SharedClipboardWinClose(); 792 792 } 793 793 … … 802 802 } 803 803 804 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,805 PSHCLDATABLOCK pData)804 int SharedClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 805 PSHCLDATABLOCK pData) 806 806 { 807 807 LogFlowFuncEnter(); 808 808 809 int rc = vboxSvcClipboardDataReadSignal(pClient, pCmdCtx, pData);809 int rc = sharedClipboardSvcDataReadSignal(pClient, pCmdCtx, pData); 810 810 811 811 LogFlowFuncLeaveRC(rc); … … 814 814 815 815 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 816 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)816 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 817 817 { 818 818 RT_NOREF(pClient, pTransfer); … … 823 823 } 824 824 825 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)825 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 826 826 { 827 827 LogFlowFuncEnter(); 828 828 829 VBoxClipboardWinURITransferDestroy(&pClient->State.pCtx->Win, pTransfer);829 SharedClipboardWinURITransferDestroy(&pClient->State.pCtx->Win, pTransfer); 830 830 831 831 return VINF_SUCCESS; -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp
r80662 r80664 69 69 * after a save and restore of the guest. 70 70 */ 71 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)71 int SharedClipboardSvcImplSync(PSHCLCLIENT pClient) 72 72 { 73 73 RT_NOREF(pClient); … … 81 81 * @param pClient Structure containing context information about the guest system 82 82 */ 83 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)83 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 84 84 { 85 85 RT_NOREF(pClient); … … 95 95 * @param pFormats Clipboard formats the guest is offering. 96 96 */ 97 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,97 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 98 98 PSHCLFORMATDATA pFormats) 99 99 { … … 110 110 * @param pcbActual Where to store the actual amount of data available. 111 111 */ 112 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,112 int SharedClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 113 113 PSHCLDATABLOCK pData, uint32_t *pcbActual) 114 114 { … … 121 121 } 122 122 123 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,123 int SharedClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 124 124 PSHCLDATABLOCK pData) 125 125 { -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r80662 r80664 72 72 formatData.uFormats = u32Formats; 73 73 74 int rc2 = vboxSvcClipboardFormatsReport(pCtx->pClient, &formatData);74 int rc2 = sharedClipboardSvcFormatsReport(pCtx->pClient, &formatData); 75 75 AssertRC(rc2); 76 76 } … … 80 80 * @note Host glue code 81 81 */ 82 int VBoxClipboardSvcImplInit(void)82 int SharedClipboardSvcImplInit(void) 83 83 { 84 84 LogFlowFuncEnter(); … … 90 90 * @note host glue code 91 91 */ 92 void VBoxClipboardSvcImplDestroy(void)92 void SharedClipboardSvcImplDestroy(void) 93 93 { 94 94 LogFlowFuncEnter(); … … 100 100 * the clipboard and leave ownership to X11. 101 101 */ 102 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless)102 int SharedClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 103 103 { 104 104 int rc = VINF_SUCCESS; … … 142 142 * @note Host glue code 143 143 */ 144 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient)144 int SharedClipboardSvcImplSync(PSHCLCLIENT pClient) 145 145 { 146 146 LogFlowFuncEnter(); … … 154 154 formatData.uFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE; 155 155 156 return vboxSvcClipboardFormatsReport(pClient, &formatData);156 return sharedClipboardSvcFormatsReport(pClient, &formatData); 157 157 } 158 158 … … 161 161 * @note Host glue code 162 162 */ 163 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient)163 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 164 164 { 165 165 LogFlowFuncEnter(); … … 174 174 /* If there is a currently pending request, release it immediately. */ 175 175 SHCLDATABLOCK dataBlock = { 0, NULL, 0 }; 176 VBoxClipboardSvcImplWriteData(pClient, NULL, &dataBlock);176 SharedClipboardSvcImplWriteData(pClient, NULL, &dataBlock); 177 177 178 178 int rc = ClipStopX11(pCtx->pBackend); … … 199 199 * @param pFormats Clipboard formats the guest is offering. 200 200 */ 201 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,202 PSHCLFORMATDATA pFormats)201 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 202 PSHCLFORMATDATA pFormats) 203 203 { 204 204 RT_NOREF(pCmdCtx); … … 245 245 * 246 246 */ 247 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient,248 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual)247 int SharedClipboardSvcImplReadData(PSHCLCLIENT pClient, 248 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual) 249 249 { 250 250 RT_NOREF(pCmdCtx); … … 299 299 * @param pData Data block to write to clipboard. 300 300 */ 301 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient,302 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData)301 int SharedClipboardSvcImplWriteData(PSHCLCLIENT pClient, 302 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 303 303 { 304 304 LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n", 305 305 pClient, pData->pvData, pData->cbData, pData->uFormat)); 306 306 307 int rc = vboxSvcClipboardDataReadSignal(pClient, pCmdCtx, pData);307 int rc = sharedClipboardSvcDataReadSignal(pClient, pCmdCtx, pData); 308 308 309 309 LogFlowFuncLeaveRC(rc); … … 368 368 369 369 SHCLEVENTID uEvent; 370 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent);370 int rc = sharedClipboardSvcDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 371 371 if (RT_SUCCESS(rc)) 372 372 { … … 390 390 391 391 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 392 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)392 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 393 393 { 394 394 RT_NOREF(pClient, pTransfer); … … 396 396 } 397 397 398 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)398 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 399 399 { 400 400 RT_NOREF(pClient, pTransfer); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r80662 r80664 224 224 * Prototypes * 225 225 *********************************************************************************************************************************/ 226 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID);227 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState);228 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState);226 static int sharedClipboardSvcClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID); 227 static int sharedClipboardSvcClientStateDestroy(PSHCLCLIENTSTATE pClientState); 228 static void sharedClipboardSvcClientStateReset(PSHCLCLIENTSTATE pClientState); 229 229 230 230 … … 260 260 * @param puID Where to store the created event source ID on success. 261 261 */ 262 int vboxSvcClipboardEventSourceCreateID(PSHCLEVENTSOURCEID puID)262 int sharedClipboardSvcEventSourceCreateID(PSHCLEVENTSOURCEID puID) 263 263 { 264 264 AssertPtrReturn(puID, VERR_INVALID_POINTER); … … 277 277 } 278 278 279 uint32_t vboxSvcClipboardGetMode(void)279 uint32_t sharedClipboardSvcGetMode(void) 280 280 { 281 281 return g_uMode; … … 286 286 uint32_t TestClipSvcGetMode(void) 287 287 { 288 return vboxSvcClipboardGetMode();288 return sharedClipboardSvcGetMode(); 289 289 } 290 290 #endif … … 296 296 } 297 297 298 static int vboxSvcClipboardModeSet(uint32_t uMode)298 static int sharedClipboardSvcModeSet(uint32_t uMode) 299 299 { 300 300 int rc = VERR_NOT_SUPPORTED; … … 343 343 * @param pClient Pointer to the client data structure to reset message queue for. 344 344 */ 345 void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient)345 void sharedClipboardSvcMsgQueueReset(PSHCLCLIENT pClient) 346 346 { 347 347 LogFlowFuncEnter(); … … 361 361 * @param cParms Number of HGCM parameters to allocate. 362 362 */ 363 PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms)363 PSHCLCLIENTMSG sharedClipboardSvcMsgAlloc(uint32_t uMsg, uint32_t cParms) 364 364 { 365 365 PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG)); … … 386 386 * The pointer will be invalid after calling this function. 387 387 */ 388 void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg)388 void sharedClipboardSvcMsgFree(PSHCLCLIENTMSG pMsg) 389 389 { 390 390 if (!pMsg) … … 407 407 * @remarks ASSUMES the parameters has been cleared by clientMsgPeek. 408 408 */ 409 void vboxSvcClipboardMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)409 void sharedClipboardSvcMsgSetPeekReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms) 410 410 { 411 411 Assert(cDstParms >= 2); … … 437 437 * @param cDstParms The number of peek parameters (at least two). 438 438 */ 439 int vboxSvcClipboardMsgSetGetHostMsgOldReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)439 int sharedClipboardSvcMsgSetGetHostMsgOldReturn(PSHCLCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms) 440 440 { 441 441 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); … … 494 494 * @param fAppend Whether to append or prepend the message to the queue. 495 495 */ 496 int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend)496 int sharedClipboardSvcMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend) 497 497 { 498 498 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); … … 527 527 * immediately. 528 528 */ 529 int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[],530 bool fWait)529 int sharedClipboardSvcMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], 530 bool fWait) 531 531 { 532 532 /* … … 574 574 if (pFirstMsg) 575 575 { 576 vboxSvcClipboardMsgSetPeekReturn(pFirstMsg, paParms, cParms);576 sharedClipboardSvcMsgSetPeekReturn(pFirstMsg, paParms, cParms); 577 577 LogFlowFunc(("[Client %RU32] VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_PEEK_XXX -> VINF_SUCCESS (idMsg=%u (%s), cParms=%u)\n", 578 578 pClient->uClientID, pFirstMsg->m_uMsg, VBoxClipboardHostMsgToStr(pFirstMsg->m_uMsg), … … 616 616 * @param paParms Array of parameters. 617 617 */ 618 int vboxSvcClipboardMsgGetOld(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])618 int sharedClipboardSvcMsgGetOld(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 619 619 { 620 620 int rc; … … 640 640 pFirstMsg->m_cParms)); 641 641 642 rc = vboxSvcClipboardMsgSetGetHostMsgOldReturn(pFirstMsg, paParms, cParms);642 rc = sharedClipboardSvcMsgSetGetHostMsgOldReturn(pFirstMsg, paParms, cParms); 643 643 if (RT_SUCCESS(rc)) 644 644 { … … 648 648 { 649 649 pClient->queueMsg.removeFirst(); 650 vboxSvcClipboardMsgFree(pFirstMsg);650 sharedClipboardSvcMsgFree(pFirstMsg); 651 651 652 652 rc = VINF_HGCM_ASYNC_EXECUTE; /* The caller must not complete it. */ … … 692 692 * @param paParms Array of parameters. 693 693 */ 694 int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])694 int sharedClipboardSvcMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 695 695 { 696 696 /* … … 782 782 { 783 783 pClient->queueMsg.removeFirst(); 784 vboxSvcClipboardMsgFree(pFirstMsg);784 sharedClipboardSvcMsgFree(pFirstMsg); 785 785 } 786 786 … … 807 807 * @param pClient Client to wake up. 808 808 */ 809 int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient)809 int sharedClipboardSvcClientWakeup(PSHCLCLIENT pClient) 810 810 { 811 811 int rc = VINF_NO_CHANGE; … … 830 830 if (pClient->Pending.uType == VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_PEEK_WAIT) 831 831 { 832 vboxSvcClipboardMsgSetPeekReturn(pFirstMsg, pClient->Pending.paParms, pClient->Pending.cParms);832 sharedClipboardSvcMsgSetPeekReturn(pFirstMsg, pClient->Pending.paParms, pClient->Pending.cParms); 833 833 fDonePending = true; 834 834 } 835 835 else if (pClient->Pending.uType == VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG_OLD) /* Legacy */ 836 836 { 837 rc = vboxSvcClipboardMsgSetGetHostMsgOldReturn(pFirstMsg, pClient->Pending.paParms, pClient->Pending.cParms);837 rc = sharedClipboardSvcMsgSetGetHostMsgOldReturn(pFirstMsg, pClient->Pending.paParms, pClient->Pending.cParms); 838 838 if (RT_SUCCESS(rc)) 839 839 { … … 841 841 * remove the actual message from our queue right now. */ 842 842 pClient->queueMsg.removeFirst(); 843 vboxSvcClipboardMsgFree(pFirstMsg);843 sharedClipboardSvcMsgFree(pFirstMsg); 844 844 845 845 fDonePending = true; … … 879 879 * @param puEvent Event ID for waiting for new data. Optional. 880 880 */ 881 int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq,882 PSHCLEVENTID puEvent)881 int sharedClipboardSvcDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, 882 PSHCLEVENTID puEvent) 883 883 { 884 884 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 888 888 int rc; 889 889 890 PSHCLCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,891 890 PSHCLCLIENTMSG pMsgReadData = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 891 VBOX_SHARED_CLIPBOARD_CPARMS_READ_DATA); 892 892 if (pMsgReadData) 893 893 { … … 898 898 HGCMSvcSetU32(&pMsgReadData->m_paParms[2], pClient->State.cbChunkSize); 899 899 900 rc = vboxSvcClipboardMsgAdd(pClient, pMsgReadData, true /* fAppend */);900 rc = sharedClipboardSvcMsgAdd(pClient, pMsgReadData, true /* fAppend */); 901 901 if (RT_SUCCESS(rc)) 902 902 { … … 904 904 if (RT_SUCCESS(rc)) 905 905 { 906 rc = vboxSvcClipboardClientWakeup(pClient);906 rc = sharedClipboardSvcClientWakeup(pClient); 907 907 if (RT_SUCCESS(rc)) 908 908 { … … 922 922 } 923 923 924 int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,925 PSHCLDATABLOCK pData)924 int sharedClipboardSvcDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 925 PSHCLDATABLOCK pData) 926 926 { 927 927 SHCLEVENTID uEvent; … … 952 952 } 953 953 954 int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats)954 int sharedClipboardSvcFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats) 955 955 { 956 956 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 959 959 int rc; 960 960 961 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3);961 PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3); 962 962 if (pMsg) 963 963 { … … 968 968 HGCMSvcSetU32(&pMsg->m_paParms[2], 0 /* fFlags */); 969 969 970 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);970 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 971 971 if (RT_SUCCESS(rc)) 972 rc = vboxSvcClipboardClientWakeup(pClient);972 rc = sharedClipboardSvcClientWakeup(pClient); 973 973 } 974 974 else … … 979 979 } 980 980 981 int vboxSvcClipboardGetDataWrite(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])981 int sharedClipboardSvcGetDataWrite(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 982 982 { 983 983 LogFlowFuncEnter(); 984 984 985 if ( vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST986 && vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL)985 if ( sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST 986 && sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL) 987 987 { 988 988 return VERR_NOT_SUPPORTED; … … 1054 1054 } 1055 1055 1056 rc = VBoxClipboardSvcImplWriteData(pClient, &cmdCtx, &dataBlock);1056 rc = SharedClipboardSvcImplWriteData(pClient, &cmdCtx, &dataBlock); 1057 1057 } 1058 1058 … … 1061 1061 } 1062 1062 1063 int vboxSvcClipboardSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource)1063 int sharedClipboardSvcSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource) 1064 1064 { 1065 1065 if (!pClient) /* If no client connected (anymore), bail out. */ … … 1082 1082 1083 1083 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1084 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient,1084 int sharedClipboardSvcURITransferStart(PSHCLCLIENT pClient, 1085 1085 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1086 1086 PSHCLURITRANSFER *ppTransfer) … … 1103 1103 if (enmDir == SHCLURITRANSFERDIR_READ) 1104 1104 { 1105 rc = vboxSvcClipboardURIAreaRegister(&pClient->State, pTransfer);1105 rc = sharedClipboardSvcURIAreaRegister(&pClient->State, pTransfer); 1106 1106 if (RT_SUCCESS(rc)) 1107 1107 { 1108 1108 creationCtx.enmSource = pClient->State.enmSource; 1109 1109 1110 creationCtx.Interface.pfnTransferOpen = vboxSvcClipboardURITransferOpen;1111 creationCtx.Interface.pfnTransferClose = vboxSvcClipboardURITransferClose;1112 creationCtx.Interface.pfnListOpen = vboxSvcClipboardURIListOpen;1113 creationCtx.Interface.pfnListClose = vboxSvcClipboardURIListClose;1114 creationCtx.Interface.pfnObjOpen = vboxSvcClipboardURIObjOpen;1115 creationCtx.Interface.pfnObjClose = vboxSvcClipboardURIObjClose;1116 1117 creationCtx.Interface.pfnGetRoots = vboxSvcClipboardURIGetRoots;1118 creationCtx.Interface.pfnListHdrRead = vboxSvcClipboardURIListHdrRead;1119 creationCtx.Interface.pfnListEntryRead = vboxSvcClipboardURIListEntryRead;1120 creationCtx.Interface.pfnObjRead = vboxSvcClipboardURIObjRead;1110 creationCtx.Interface.pfnTransferOpen = sharedClipboardSvcURITransferOpen; 1111 creationCtx.Interface.pfnTransferClose = sharedClipboardSvcURITransferClose; 1112 creationCtx.Interface.pfnListOpen = sharedClipboardSvcURIListOpen; 1113 creationCtx.Interface.pfnListClose = sharedClipboardSvcURIListClose; 1114 creationCtx.Interface.pfnObjOpen = sharedClipboardSvcURIObjOpen; 1115 creationCtx.Interface.pfnObjClose = sharedClipboardSvcURIObjClose; 1116 1117 creationCtx.Interface.pfnGetRoots = sharedClipboardSvcURIGetRoots; 1118 creationCtx.Interface.pfnListHdrRead = sharedClipboardSvcURIListHdrRead; 1119 creationCtx.Interface.pfnListEntryRead = sharedClipboardSvcURIListEntryRead; 1120 creationCtx.Interface.pfnObjRead = sharedClipboardSvcURIObjRead; 1121 1121 1122 1122 creationCtx.pvUser = pClient; … … 1146 1146 rc = SharedClipboardURICtxTransferAdd(&pClient->URI, pTransfer); 1147 1147 if (RT_SUCCESS(rc)) 1148 rc = VBoxClipboardSvcImplURITransferCreate(pClient, pTransfer);1148 rc = SharedClipboardSvcImplURITransferCreate(pClient, pTransfer); 1149 1149 1150 1150 if (RT_FAILURE(rc)) 1151 VBoxClipboardSvcImplURITransferDestroy(pClient, pTransfer);1151 SharedClipboardSvcImplURITransferDestroy(pClient, pTransfer); 1152 1152 } 1153 1153 … … 1177 1177 if (RT_SUCCESS(rc)) 1178 1178 { 1179 vboxSvcClipboardModeSet(VBOX_SHARED_CLIPBOARD_MODE_OFF);1180 1181 rc = VBoxClipboardSvcImplInit();1179 sharedClipboardSvcModeSet(VBOX_SHARED_CLIPBOARD_MODE_OFF); 1180 1181 rc = SharedClipboardSvcImplInit(); 1182 1182 1183 1183 /* Clean up on failure, because 'svnUnload' will not be called … … 1197 1197 LogFlowFuncEnter(); 1198 1198 1199 VBoxClipboardSvcImplDestroy();1199 SharedClipboardSvcImplDestroy(); 1200 1200 1201 1201 RTCritSectDelete(&g_CritSect); … … 1216 1216 PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/); 1217 1217 if (pTransfer) 1218 vboxSvcClipboardURIAreaDetach(&pClient->State, pTransfer);1218 sharedClipboardSvcURIAreaDetach(&pClient->State, pTransfer); 1219 1219 1220 1220 SharedClipboardURICtxDestroy(&pClient->URI); 1221 1221 #endif 1222 1222 1223 VBoxClipboardSvcImplDisconnect(pClient);1224 1225 vboxSvcClipboardClientStateReset(&pClient->State);1226 vboxSvcClipboardClientStateDestroy(&pClient->State);1223 SharedClipboardSvcImplDisconnect(pClient); 1224 1225 sharedClipboardSvcClientStateReset(&pClient->State); 1226 sharedClipboardSvcClientStateDestroy(&pClient->State); 1227 1227 1228 1228 SharedClipboardEventSourceDestroy(&pClient->Events); … … 1251 1251 /* Create the client's own event source. */ 1252 1252 SHCLEVENTSOURCEID uEventSourceID; 1253 int rc = vboxSvcClipboardEventSourceCreateID(&uEventSourceID);1253 int rc = sharedClipboardSvcEventSourceCreateID(&uEventSourceID); 1254 1254 if (RT_SUCCESS(rc)) 1255 1255 rc = SharedClipboardEventSourceCreate(&pClient->Events, uEventSourceID); … … 1259 1259 1260 1260 /* Reset the client state. */ 1261 vboxSvcClipboardClientStateReset(&pClient->State);1261 sharedClipboardSvcClientStateReset(&pClient->State); 1262 1262 1263 1263 /* (Re-)initialize the client state. */ 1264 rc = vboxSvcClipboardClientStateInit(&pClient->State, u32ClientID);1264 rc = sharedClipboardSvcClientStateInit(&pClient->State, u32ClientID); 1265 1265 if (RT_SUCCESS(rc)) 1266 1266 { 1267 rc = VBoxClipboardSvcImplConnect(pClient, VBoxSvcClipboardGetHeadless());1267 rc = SharedClipboardSvcImplConnect(pClient, VBoxSvcClipboardGetHeadless()); 1268 1268 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1269 1269 if (RT_SUCCESS(rc)) … … 1324 1324 case VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG_OLD: 1325 1325 { 1326 rc = vboxSvcClipboardMsgGetOld(pClient, callHandle, cParms, paParms);1326 rc = sharedClipboardSvcMsgGetOld(pClient, callHandle, cParms, paParms); 1327 1327 if (rc == VINF_HGCM_ASYNC_EXECUTE) 1328 1328 fDoCallComplete = false; … … 1344 1344 rc = VERR_INVALID_PARAMETER; 1345 1345 } 1346 else if ( vboxSvcClipboardGetMode() == VBOX_SHARED_CLIPBOARD_MODE_OFF)1346 else if (sharedClipboardSvcGetMode() == VBOX_SHARED_CLIPBOARD_MODE_OFF) 1347 1347 { 1348 1348 rc = VERR_ACCESS_DENIED; … … 1369 1369 case VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_PEEK_NOWAIT: 1370 1370 { 1371 rc = vboxSvcClipboardMsgPeek(pClient, callHandle, cParms, paParms, false /*fWait*/);1371 rc = sharedClipboardSvcMsgPeek(pClient, callHandle, cParms, paParms, false /*fWait*/); 1372 1372 break; 1373 1373 } … … 1375 1375 case VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_PEEK_WAIT: 1376 1376 { 1377 rc = vboxSvcClipboardMsgPeek(pClient, callHandle, cParms, paParms, true /*fWait*/);1377 rc = sharedClipboardSvcMsgPeek(pClient, callHandle, cParms, paParms, true /*fWait*/); 1378 1378 if (rc == VINF_HGCM_ASYNC_EXECUTE) 1379 1379 fDoCallComplete = false; … … 1383 1383 case VBOX_SHARED_CLIPBOARD_GUEST_FN_MSG_GET: 1384 1384 { 1385 rc = vboxSvcClipboardMsgGet(pClient, callHandle, cParms, paParms);1385 rc = sharedClipboardSvcMsgGet(pClient, callHandle, cParms, paParms); 1386 1386 if (rc == VINF_HGCM_ASYNC_EXECUTE) 1387 1387 fDoCallComplete = false; … … 1430 1430 if (RT_SUCCESS(rc)) 1431 1431 { 1432 if ( vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST1433 && vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL)1432 if ( sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_GUEST_TO_HOST 1433 && sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL) 1434 1434 { 1435 1435 rc = VERR_ACCESS_DENIED; … … 1437 1437 else 1438 1438 { 1439 rc = vboxSvcClipboardSetSource(pClient, SHCLSOURCE_REMOTE);1439 rc = sharedClipboardSvcSetSource(pClient, SHCLSOURCE_REMOTE); 1440 1440 if (RT_SUCCESS(rc)) 1441 1441 { … … 1458 1458 formatData.uFormats = uFormats; 1459 1459 1460 rc = VBoxClipboardSvcImplFormatAnnounce(pClient, &cmdCtx, &formatData);1460 rc = SharedClipboardSvcImplFormatAnnounce(pClient, &cmdCtx, &formatData); 1461 1461 } 1462 1462 } … … 1481 1481 else 1482 1482 { 1483 if ( vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST1484 && vboxSvcClipboardGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL)1483 if ( sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_HOST_TO_GUEST 1484 && sharedClipboardSvcGetMode() != VBOX_SHARED_CLIPBOARD_MODE_BIDIRECTIONAL) 1485 1485 { 1486 1486 rc = VERR_ACCESS_DENIED; … … 1506 1506 { 1507 1507 /* Attach to the most recent clipboard area. */ 1508 rc = vboxSvcClipboardURIAreaAttach(&pClient->State, pTransfer, 0 /* Area ID */);1508 rc = sharedClipboardSvcURIAreaAttach(&pClient->State, pTransfer, 0 /* Area ID */); 1509 1509 if (RT_SUCCESS(rc)) 1510 1510 { … … 1516 1516 RT_ZERO(creationCtx.Interface); 1517 1517 1518 creationCtx.Interface.pfnListHdrWrite = vboxSvcClipboardURIListHdrWrite;1519 creationCtx.Interface.pfnListEntryWrite = vboxSvcClipboardURIListEntryWrite;1520 creationCtx.Interface.pfnObjWrite = vboxSvcClipboardURIObjWrite;1518 creationCtx.Interface.pfnListHdrWrite = sharedClipboardSvcURIListHdrWrite; 1519 creationCtx.Interface.pfnListEntryWrite = sharedClipboardSvcURIListEntryWrite; 1520 creationCtx.Interface.pfnObjWrite = sharedClipboardSvcURIObjWrite; 1521 1521 1522 1522 creationCtx.pvUser = pClient; … … 1529 1529 if (RT_SUCCESS(rc)) 1530 1530 { 1531 rc = VBoxClipboardSvcImplURITransferCreate(pClient, pTransfer);1531 rc = SharedClipboardSvcImplURITransferCreate(pClient, pTransfer); 1532 1532 } 1533 1533 else 1534 1534 { 1535 VBoxClipboardSvcImplURITransferDestroy(pClient, pTransfer);1535 SharedClipboardSvcImplURITransferDestroy(pClient, pTransfer); 1536 1536 SharedClipboardURITransferDestroy(pTransfer); 1537 1537 } … … 1582 1582 formatData.uFormats = g_ExtState.uDelayedFormats; 1583 1583 1584 int rc2 = vboxSvcClipboardFormatsReport(pClient, &formatData);1584 int rc2 = sharedClipboardSvcFormatsReport(pClient, &formatData); 1585 1585 AssertRC(rc2); 1586 1586 … … 1614 1614 dataBlock.uFormat = uFormat; 1615 1615 1616 rc = VBoxClipboardSvcImplReadData(pClient, &cmdCtx, &dataBlock, &cbActual);1616 rc = SharedClipboardSvcImplReadData(pClient, &cmdCtx, &dataBlock, &cbActual); 1617 1617 if (RT_SUCCESS(rc)) 1618 1618 HGCMSvcSetU32(&paParms[2], cbActual); … … 1630 1630 case VBOX_SHARED_CLIPBOARD_GUEST_FN_DATA_WRITE: 1631 1631 { 1632 rc = vboxSvcClipboardGetDataWrite(pClient, cParms, paParms);1632 rc = sharedClipboardSvcGetDataWrite(pClient, cParms, paParms); 1633 1633 break; 1634 1634 } … … 1637 1637 { 1638 1638 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1639 rc = vboxSvcClipboardURIHandler(pClient, callHandle, u32Function, cParms, paParms, tsArrival);1639 rc = sharedClipboardSvcURIHandler(pClient, callHandle, u32Function, cParms, paParms, tsArrival); 1640 1640 #else 1641 1641 rc = VERR_NOT_IMPLEMENTED; … … 1660 1660 * @param uClientID Client ID (HGCM) to use for this client state. 1661 1661 */ 1662 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID)1662 static int sharedClipboardSvcClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID) 1663 1663 { 1664 1664 LogFlowFuncEnter(); 1665 1665 1666 vboxSvcClipboardClientStateReset(pClientState);1666 sharedClipboardSvcClientStateReset(pClientState); 1667 1667 1668 1668 /* Register the client. … … 1680 1680 * @param pClientState Client state to destroy. 1681 1681 */ 1682 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState)1682 static int sharedClipboardSvcClientStateDestroy(PSHCLCLIENTSTATE pClientState) 1683 1683 { 1684 1684 RT_NOREF(pClientState); … … 1694 1694 * @param pClientState Client state to reset. 1695 1695 */ 1696 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState)1696 static void sharedClipboardSvcClientStateReset(PSHCLCLIENTSTATE pClientState) 1697 1697 { 1698 1698 LogFlowFuncEnter(); … … 1732 1732 rc = HGCMSvcGetU32(&paParms[0], &u32Mode); 1733 1733 if (RT_SUCCESS(rc)) 1734 rc = vboxSvcClipboardModeSet(u32Mode);1734 rc = sharedClipboardSvcModeSet(u32Mode); 1735 1735 } 1736 1736 … … 1760 1760 { 1761 1761 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1762 rc = vboxSvcClipboardURIHostHandler(u32Function, cParms, paParms);1762 rc = sharedClipboardSvcURIHostHandler(u32Function, cParms, paParms); 1763 1763 #else 1764 1764 rc = VERR_NOT_IMPLEMENTED; … … 1809 1809 static SSMFIELD const s_aShClSSMClientMsgCtx[] = 1810 1810 { 1811 SSMFIELD_ENTRY( VBOXSHCLMSGCTX, uContextID),1811 SSMFIELD_ENTRY(SHCLMSGCTX, uContextID), 1812 1812 SSMFIELD_ENTRY_TERM() 1813 1813 }; … … 1851 1851 AssertRCReturn(rc, rc); 1852 1852 1853 rc = SSMR3PutStructEx(pSSM, &pMsg->m_Ctx, sizeof( VBOXSHCLMSGCTX), 0 /*fFlags*/, &s_aShClSSMClientMsgCtx[0], NULL);1853 rc = SSMR3PutStructEx(pSSM, &pMsg->m_Ctx, sizeof(SHCLMSGCTX), 0 /*fFlags*/, &s_aShClSSMClientMsgCtx[0], NULL); 1854 1854 AssertRCReturn(rc, rc); 1855 1855 … … 1941 1941 AssertRCReturn(rc, rc); 1942 1942 1943 rc = SSMR3GetStructEx(pSSM, &pMsg->m_Ctx, sizeof( VBOXSHCLMSGCTX), 0 /*fFlags*/, &s_aShClSSMClientMsgCtx[0], NULL);1943 rc = SSMR3GetStructEx(pSSM, &pMsg->m_Ctx, sizeof(SHCLMSGCTX), 0 /*fFlags*/, &s_aShClSSMClientMsgCtx[0], NULL); 1944 1944 AssertRCReturn(rc, rc); 1945 1945 … … 1953 1953 } 1954 1954 1955 rc = vboxSvcClipboardMsgAdd(pClient, pMsg, true /* fAppend */);1955 rc = sharedClipboardSvcMsgAdd(pClient, pMsg, true /* fAppend */); 1956 1956 AssertRCReturn(rc, rc); 1957 1957 } … … 1964 1964 1965 1965 /* Actual host data are to be reported to guest (SYNC). */ 1966 VBoxClipboardSvcImplSync(pClient);1966 SharedClipboardSvcImplSync(pClient); 1967 1967 1968 1968 #else /* UNIT_TEST */ … … 2005 2005 formatData.uFormats = u32Format; 2006 2006 2007 rc = vboxSvcClipboardFormatsReport(pClient, &formatData);2007 rc = sharedClipboardSvcFormatsReport(pClient, &formatData); 2008 2008 } 2009 2009 … … 2020 2020 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 2021 2021 2022 rc = vboxSvcClipboardDataReadRequest(pClient, &dataReq, NULL /* puEvent */);2022 rc = sharedClipboardSvcDataReadRequest(pClient, &dataReq, NULL /* puEvent */); 2023 2023 break; 2024 2024 } -
trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
r80662 r80664 123 123 2, parms, 0); 124 124 RTTESTI_CHECK_RC(call.rc, VERR_TRY_AGAIN); /* This should get updated only when the guest call completes. */ 125 vboxSvcClipboardOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,126 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT);125 sharedClipboardSvcOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 126 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT); 127 127 RTTESTI_CHECK(parms[0].u.uint32 == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA); 128 128 RTTESTI_CHECK(parms[1].u.uint32 == VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT); … … 135 135 RTTestISub("Testing FN_GET_HOST_MSG, one format, no waiting guest calls."); 136 136 RT_ZERO(g_Client.State); 137 vboxSvcClipboardOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,138 VBOX_SHARED_CLIPBOARD_FMT_HTML);137 sharedClipboardSvcOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 138 VBOX_SHARED_CLIPBOARD_FMT_HTML); 139 139 HGCMSvcSetU32(&parms[0], 0); 140 140 HGCMSvcSetU32(&parms[1], 0); … … 158 158 2, parms, 0); 159 159 RTTESTI_CHECK_RC(call.rc, VERR_TRY_AGAIN); /* This should get updated only when the guest call completes. */ 160 vboxSvcClipboardOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,161 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT | VBOX_SHARED_CLIPBOARD_FMT_HTML);160 sharedClipboardSvcOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 161 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT | VBOX_SHARED_CLIPBOARD_FMT_HTML); 162 162 RTTESTI_CHECK(parms[0].u.uint32 == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA); 163 163 RTTESTI_CHECK(parms[1].u.uint32 == VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT); … … 176 176 RTTestISub("Testing FN_GET_HOST_MSG, two formats, no waiting guest calls."); 177 177 RT_ZERO(g_Client.State); 178 vboxSvcClipboardOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,179 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT | VBOX_SHARED_CLIPBOARD_FMT_HTML);178 sharedClipboardSvcOldReportMsg(&g_Client, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 179 VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT | VBOX_SHARED_CLIPBOARD_FMT_HTML); 180 180 HGCMSvcSetU32(&parms[0], 0); 181 181 HGCMSvcSetU32(&parms[1], 0); … … 277 277 } 278 278 279 int VBoxClipboardSvcImplInit() { return VINF_SUCCESS; }280 void VBoxClipboardSvcImplDestroy() { }281 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT)279 int SharedClipboardSvcImplInit() { return VINF_SUCCESS; } 280 void SharedClipboardSvcImplDestroy() { } 281 int SharedClipboardSvcImplDisconnect(PSHCLCLIENT) 282 282 { return VINF_SUCCESS; } 283 int VBoxClipboardSvcImplConnect(PSHCLCLIENT, bool)283 int SharedClipboardSvcImplConnect(PSHCLCLIENT, bool) 284 284 { return VINF_SUCCESS; } 285 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLFORMATDATA)285 int SharedClipboardSvcImplFormatAnnounce(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLFORMATDATA) 286 286 { AssertFailed(); return VINF_SUCCESS; } 287 int VBoxClipboardSvcImplReadData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK, unsigned int *)287 int SharedClipboardSvcImplReadData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK, unsigned int *) 288 288 { AssertFailed(); return VERR_WRONG_ORDER; } 289 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK)289 int SharedClipboardSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK) 290 290 { AssertFailed(); return VINF_SUCCESS; } 291 int VBoxClipboardSvcImplSync(PSHCLCLIENT)291 int SharedClipboardSvcImplSync(PSHCLCLIENT) 292 292 { AssertFailed(); return VERR_WRONG_ORDER; } 293 293
Note:
See TracChangeset
for help on using the changeset viewer.