Changeset 80662 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Sep 9, 2019 8:43:14 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133193
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
r80623 r80662 35 35 *********************************************************************************************************************************/ 36 36 /** Global clipboard context information */ 37 struct _ VBOXCLIPBOARDCONTEXT37 struct _SHCLCONTEXT 38 38 { 39 39 /** We have a separate thread to poll for new clipboard content */ … … 42 42 /** The reference to the current pasteboard */ 43 43 PasteboardRef pasteboard; 44 P VBOXCLIPBOARDCLIENT pClient;44 PSHCLCLIENT pClient; 45 45 }; 46 46 … … 50 50 *********************************************************************************************************************************/ 51 51 /** Only one client is supported. There seems to be no need for more clients. */ 52 static VBOXCLIPBOARDCONTEXT g_ctx;52 static SHCLCONTEXT g_ctx; 53 53 54 54 … … 59 59 * @param pCtx The context. 60 60 */ 61 static int vboxClipboardChanged( VBOXCLIPBOARDCONTEXT *pCtx)61 static int vboxClipboardChanged(SHCLCONTEXT *pCtx) 62 62 { 63 63 if (pCtx->pClient == NULL) … … 71 71 && fChanged) 72 72 { 73 SH AREDCLIPBOARDFORMATDATA formatData;73 SHCLFORMATDATA formatData; 74 74 RT_ZERO(formatData); 75 75 … … 90 90 * @returns VINF_SUCCESS (not used). 91 91 * @param ThreadSelf Our thread handle. 92 * @param pvUser Pointer to the VBOXCLIPBOARDCONTEXT structure.92 * @param pvUser Pointer to the SHCLCONTEXT structure. 93 93 * 94 94 */ … … 98 98 99 99 AssertPtrReturn(pvUser, VERR_INVALID_PARAMETER); 100 VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pvUser;100 SHCLCONTEXT *pCtx = (SHCLCONTEXT *)pvUser; 101 101 102 102 while (!pCtx->fTerminate) … … 156 156 } 157 157 158 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)158 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 159 159 { 160 160 RT_NOREF(fHeadless); … … 178 178 } 179 179 180 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)180 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 181 181 { 182 182 /* Sync the host clipboard content with the client. */ … … 190 190 } 191 191 192 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)192 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 193 193 { 194 194 VBoxSvcClipboardLock(); … … 201 201 } 202 202 203 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient,204 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)203 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, 204 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats) 205 205 { 206 206 RT_NOREF(pCmdCtx); … … 219 219 #endif 220 220 221 SH AREDCLIPBOARDDATAREQ dataReq;221 SHCLDATAREQ dataReq; 222 222 RT_ZERO(dataReq); 223 223 … … 236 236 * @param pcbActual Where to write the actual size of the written data. 237 237 */ 238 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,239 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)238 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 239 PSHCLDATABLOCK pData, uint32_t *pcbActual) 240 240 { 241 241 RT_NOREF(pCmdCtx); … … 262 262 * @param pData Data block to write to clipboard. 263 263 */ 264 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient,265 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)264 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, 265 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 266 266 { 267 267 RT_NOREF(pCmdCtx); … … 277 277 278 278 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 279 int VBoxClipboardSvcImplURIReadDir(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)279 int VBoxClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 280 280 { 281 281 RT_NOREF(pClient, pDirData); … … 283 283 } 284 284 285 int VBoxClipboardSvcImplURIWriteDir(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDDIRDATA pDirData)285 int VBoxClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData) 286 286 { 287 287 RT_NOREF(pClient, pDirData); … … 289 289 } 290 290 291 int VBoxClipboardSvcImplURIReadFileHdr(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)291 int VBoxClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 292 292 { 293 293 RT_NOREF(pClient, pFileHdr); … … 295 295 } 296 296 297 int VBoxClipboardSvcImplURIWriteFileHdr(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEHDR pFileHdr)297 int VBoxClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr) 298 298 { 299 299 RT_NOREF(pClient, pFileHdr); … … 301 301 } 302 302 303 int VBoxClipboardSvcImplURIReadFileData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)303 int VBoxClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 304 304 { 305 305 RT_NOREF(pClient, pFileData); … … 307 307 } 308 308 309 int VBoxClipboardSvcImplURIWriteFileData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDFILEDATA pFileData)309 int VBoxClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData) 310 310 { 311 311 RT_NOREF(pClient, pFileData); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r80638 r80662 40 40 41 41 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 42 struct VBOXCLIPBOARDCLIENTSTATE;42 struct SHCLCLIENTSTATE; 43 43 #endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 44 44 … … 55 55 * Structure for keeping a single HGCM message. 56 56 */ 57 typedef struct _ VBOXCLIPBOARDCLIENTMSG57 typedef struct _SHCLCLIENTMSG 58 58 { 59 59 /** Stored message type. */ … … 65 65 /** Message context. */ 66 66 VBOXSHCLMSGCTX m_Ctx; 67 } VBOXCLIPBOARDCLIENTMSG, *PVBOXCLIPBOARDCLIENTMSG;68 69 typedef struct VBOXCLIPBOARDCLIENTURISTATE67 } SHCLCLIENTMSG, *PSHCLCLIENTMSG; 68 69 typedef struct SHCLCLIENTURISTATE 70 70 { 71 71 /** Directory of the transfer to start. */ 72 SH AREDCLIPBOARDURITRANSFERDIR enmTransferDir;73 } VBOXCLIPBOARDCLIENTURISTATE, *PVBOXCLIPBOARDCLIENTURISTATE;72 SHCLURITRANSFERDIR enmTransferDir; 73 } SHCLCLIENTURISTATE, *PSHCLCLIENTURISTATE; 74 74 75 75 /** … … 77 77 * This structure needs to be serializable by SSM (must be a POD type). 78 78 */ 79 typedef struct VBOXCLIPBOARDCLIENTSTATE80 { 81 struct VBOXCLIPBOARDCLIENTSTATE *pNext;82 struct VBOXCLIPBOARDCLIENTSTATE *pPrev;83 84 VBOXCLIPBOARDCONTEXT *pCtx;79 typedef struct SHCLCLIENTSTATE 80 { 81 struct SHCLCLIENTSTATE *pNext; 82 struct SHCLCLIENTSTATE *pPrev; 83 84 SHCLCONTEXT *pCtx; 85 85 86 86 /** The client's HGCM ID. */ … … 90 90 /** Maximum chunk size to use for data transfers. Set to _64K by default. */ 91 91 uint32_t cbChunkSize; 92 SH AREDCLIPBOARDSOURCE enmSource;92 SHCLSOURCE enmSource; 93 93 /** The client's URI state. */ 94 VBOXCLIPBOARDCLIENTURISTATE URI;95 } VBOXCLIPBOARDCLIENTSTATE, *PVBOXCLIPBOARDCLIENTSTATE;96 97 typedef struct _ VBOXCLIPBOARDCLIENTCMDCTX94 SHCLCLIENTURISTATE URI; 95 } SHCLCLIENTSTATE, *PSHCLCLIENTSTATE; 96 97 typedef struct _SHCLCLIENTCMDCTX 98 98 { 99 99 uint32_t uContextID; 100 } VBOXCLIPBOARDCLIENTCMDCTX, *PVBOXCLIPBOARDCLIENTCMDCTX;101 102 typedef struct _ VBOXCLIPBOARDCLIENT100 } SHCLCLIENTCMDCTX, *PSHCLCLIENTCMDCTX; 101 102 typedef struct _SHCLCLIENT 103 103 { 104 104 /** The client's HGCM client ID. */ 105 105 uint32_t uClientID; 106 106 /** General client state data. */ 107 VBOXCLIPBOARDCLIENTSTATE State;107 SHCLCLIENTSTATE State; 108 108 /** The client's message queue (FIFO). */ 109 RTCList< VBOXCLIPBOARDCLIENTMSG *> queueMsg;109 RTCList<SHCLCLIENTMSG *> queueMsg; 110 110 /** The client's own event source. */ 111 SH AREDCLIPBOARDEVENTSOURCE Events;111 SHCLEVENTSOURCE Events; 112 112 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 113 113 /** URI context data. */ 114 SH AREDCLIPBOARDURICTX URI;114 SHCLURICTX URI; 115 115 #endif 116 116 /** Structure for keeping the client's pending (deferred return) state. … … 130 130 PVBOXHGCMSVCPARM paParms; 131 131 } Pending; 132 } VBOXCLIPBOARDCLIENT, *PVBOXCLIPBOARDCLIENT;132 } SHCLCLIENT, *PSHCLCLIENT; 133 133 134 134 /** … … 136 136 * Currently empty. 137 137 */ 138 typedef struct _ VBOXCLIPBOARDEVENTSOURCEMAPENTRY139 { 140 } VBOXCLIPBOARDEVENTSOURCEMAPENTRY;138 typedef struct _SHCLEVENTSOURCEMAPENTRY 139 { 140 } SHCLEVENTSOURCEMAPENTRY; 141 141 142 142 /** Map holding information about connected HGCM clients. Key is the (unique) HGCM client ID. 143 * The value is a weak pointer to P VBOXCLIPBOARDCLIENT, which is owned by HGCM. */144 typedef std::map<uint32_t, P VBOXCLIPBOARDCLIENT> ClipboardClientMap;143 * The value is a weak pointer to PSHCLCLIENT, which is owned by HGCM. */ 144 typedef std::map<uint32_t, PSHCLCLIENT> ClipboardClientMap; 145 145 146 146 /** Map holding information about event sources. Key is the (unique) event source ID. */ 147 typedef std::map< VBOXCLIPBOARDEVENTSOURCEID, VBOXCLIPBOARDEVENTSOURCEMAPENTRY> ClipboardEventSourceMap;147 typedef std::map<SHCLEVENTSOURCEID, SHCLEVENTSOURCEMAPENTRY> ClipboardEventSourceMap; 148 148 149 149 /** Simple queue (list) which holds deferred (waiting) clients. */ … … 156 156 * to communicate with the Shared Clipboard host service. 157 157 */ 158 typedef struct _ VBOXCLIPBOARDEXTSTATE158 typedef struct _SHCLEXTSTATE 159 159 { 160 160 /** Pointer to the actual service extension handle. */ … … 173 173 * is reading clipboard data from the extension. */ 174 174 uint32_t uDelayedFormats; 175 } VBOXCLIPBOARDEXTSTATE, *PVBOXCLIPBOARDEXTSTATE;175 } SHCLEXTSTATE, *PSHCLEXTSTATE; 176 176 177 177 /* 178 178 * The service functions. Locking is between the service thread and the platform-dependent (window) thread. 179 179 */ 180 int vboxSvcClipboardDataReadRequest(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq, PVBOXCLIPBOARDEVENTID puEvent);181 int vboxSvcClipboardDataReadSignal(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);182 int vboxSvcClipboardFormatsReport(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats);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 183 184 184 uint32_t vboxSvcClipboardGetMode(void); 185 int vboxSvcClipboardSetSource(P VBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource);186 187 void vboxSvcClipboardMsgQueueReset(P VBOXCLIPBOARDCLIENT pClient);188 P VBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms);189 void vboxSvcClipboardMsgFree(P VBOXCLIPBOARDCLIENTMSG pMsg);190 void vboxSvcClipboardMsgSetPeekReturn(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms);191 int vboxSvcClipboardMsgAdd(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend);192 int vboxSvcClipboardMsgPeek(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fWait);193 int vboxSvcClipboardMsgGet(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);194 195 int vboxSvcClipboardClientWakeup(P VBOXCLIPBOARDCLIENT pClient);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); 196 196 197 197 # ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 198 int vboxSvcClipboardURITransferStart(P VBOXCLIPBOARDCLIENT pClient,199 SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,200 PSH AREDCLIPBOARDURITRANSFER *ppTransfer);198 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient, 199 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 200 PSHCLURITRANSFER *ppTransfer); 201 201 bool vboxSvcClipboardURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg); 202 202 # endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ … … 208 208 void VBoxClipboardSvcImplDestroy(void); 209 209 210 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless);211 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient);212 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDFORMATDATA pFormats);210 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless); 211 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient); 212 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLFORMATDATA pFormats); 213 213 /** @todo Document: Can return VINF_HGCM_ASYNC_EXECUTE to defer returning read data.*/ 214 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual);215 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData);214 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual); 215 int VBoxClipboardSvcImplWriteData(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(P VBOXCLIPBOARDCLIENT pClient);220 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient); 221 221 222 222 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 223 int vboxSvcClipboardURITransferOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx);224 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx);225 226 int vboxSvcClipboardURIGetRoots(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList);227 228 int vboxSvcClipboardURIListOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx,229 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList);230 int vboxSvcClipboardURIListClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList);231 int vboxSvcClipboardURIListHdrRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,232 P VBOXCLIPBOARDLISTHDR pListHdr);233 int vboxSvcClipboardURIListHdrWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,234 P VBOXCLIPBOARDLISTHDR pListHdr);235 int vboxSvcClipboardURIListEntryRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,236 P VBOXCLIPBOARDLISTENTRY pListEntry);237 int vboxSvcClipboardURIListEntryWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList,238 P VBOXCLIPBOARDLISTENTRY pListEntry);239 240 int vboxSvcClipboardURIObjOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,241 PSH AREDCLIPBOARDOBJHANDLE phObj);242 int vboxSvcClipboardURIObjClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj);243 int vboxSvcClipboardURIObjRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,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, 229 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList); 230 int vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList); 231 int vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 232 PSHCLLISTHDR pListHdr); 233 int vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 234 PSHCLLISTHDR pListHdr); 235 int vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 236 PSHCLLISTENTRY pListEntry); 237 int vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, 238 PSHCLLISTENTRY pListEntry); 239 240 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 241 PSHCLOBJHANDLE phObj); 242 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj); 243 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 244 244 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead); 245 int vboxSvcClipboardURIObjWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,245 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 246 246 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten); 247 247 248 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);249 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);250 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);251 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);252 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData);253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc);254 255 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);256 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer);248 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData); 249 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData); 250 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData); 251 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 252 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData); 253 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc); 254 255 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 256 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer); 257 257 #endif /*VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */ 258 258 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp
r80557 r80662 40 40 * Externals * 41 41 *********************************************************************************************************************************/ 42 extern VBOXCLIPBOARDEXTSTATE g_ExtState;42 extern SHCLEXTSTATE g_ExtState; 43 43 extern PVBOXHGCMSVCHELPERS g_pHelpers; 44 44 extern ClipboardClientQueue g_listClientsDeferred; … … 49 49 *********************************************************************************************************************************/ 50 50 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 51 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms);51 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms); 52 52 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 53 PVBOXSHCLMSGCTX pMsgCtx, SH AREDCLIPBOARDLISTHANDLE hList);53 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList); 54 54 55 55 … … 58 58 *********************************************************************************************************************************/ 59 59 60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx)60 DECLCALLBACK(int) vboxSvcClipboardURITransferOpen(PSHCLPROVIDERCTX pCtx) 61 61 { 62 62 RT_NOREF(pCtx); … … 66 66 } 67 67 68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx)68 DECLCALLBACK(int) vboxSvcClipboardURITransferClose(PSHCLPROVIDERCTX pCtx) 69 69 { 70 70 RT_NOREF(pCtx); … … 74 74 } 75 75 76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDROOTLIST *ppRootList)76 DECLCALLBACK(int) vboxSvcClipboardURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList) 77 77 { 78 78 LogFlowFuncEnter(); 79 79 80 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;80 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 81 81 AssertPtr(pClient); 82 82 83 83 int rc; 84 84 85 P VBOXCLIPBOARDCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ,85 PSHCLCLIENTMSG pMsgHdr = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_HDR_READ, 86 86 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_HDR_READ); 87 87 if (pMsgHdr) 88 88 { 89 VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);89 SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 90 90 91 91 HGCMSvcSetU32(&pMsgHdr->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 101 101 if (RT_SUCCESS(rc)) 102 102 { 103 PSH AREDCLIPBOARDEVENTPAYLOAD pPayloadHdr;103 PSHCLEVENTPAYLOAD pPayloadHdr; 104 104 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 105 105 pCtx->pTransfer->uTimeoutMs, &pPayloadHdr); 106 106 if (RT_SUCCESS(rc)) 107 107 { 108 P VBOXCLIPBOARDROOTLISTHDR pSrcRootListHdr = (PVBOXCLIPBOARDROOTLISTHDR)pPayloadHdr->pvData;109 Assert(pPayloadHdr->cbData == sizeof( VBOXCLIPBOARDROOTLISTHDR));108 PSHCLROOTLISTHDR pSrcRootListHdr = (PSHCLROOTLISTHDR)pPayloadHdr->pvData; 109 Assert(pPayloadHdr->cbData == sizeof(SHCLROOTLISTHDR)); 110 110 111 111 LogFlowFunc(("cRoots=%RU32, fRoots=0x%x\n", pSrcRootListHdr->cRoots, pSrcRootListHdr->fRoots)); 112 112 113 P VBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();113 PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc(); 114 114 if (pRootList) 115 115 { … … 117 117 { 118 118 pRootList->paEntries = 119 (P VBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));119 (PSHCLROOTLISTENTRY)RTMemAllocZ(pSrcRootListHdr->cRoots * sizeof(SHCLROOTLISTENTRY)); 120 120 121 121 if (pRootList->paEntries) … … 123 123 for (uint32_t i = 0; i < pSrcRootListHdr->cRoots; i++) 124 124 { 125 P VBOXCLIPBOARDCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,125 PSHCLCLIENTMSG pMsgEntry = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_ROOT_LIST_ENTRY_READ, 126 126 VBOX_SHARED_CLIPBOARD_CPARMS_ROOT_LIST_ENTRY_READ_REQ); 127 127 … … 140 140 break; 141 141 142 PSH AREDCLIPBOARDEVENTPAYLOAD pPayloadEntry;142 PSHCLEVENTPAYLOAD pPayloadEntry; 143 143 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 144 144 pCtx->pTransfer->uTimeoutMs, &pPayloadEntry); … … 146 146 break; 147 147 148 P VBOXCLIPBOARDROOTLISTENTRY pSrcRootListEntry = (PVBOXCLIPBOARDROOTLISTENTRY)pPayloadEntry->pvData;149 Assert(pPayloadEntry->cbData == sizeof( VBOXCLIPBOARDROOTLISTENTRY));148 PSHCLROOTLISTENTRY pSrcRootListEntry = (PSHCLROOTLISTENTRY)pPayloadEntry->pvData; 149 Assert(pPayloadEntry->cbData == sizeof(SHCLROOTLISTENTRY)); 150 150 151 151 rc = SharedClipboardURIListEntryCopy(&pRootList->paEntries[i], pSrcRootListEntry); … … 190 190 } 191 191 192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx,193 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms, PSHAREDCLIPBOARDLISTHANDLE phList)192 DECLCALLBACK(int) vboxSvcClipboardURIListOpen(PSHCLPROVIDERCTX pCtx, 193 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList) 194 194 { 195 195 LogFlowFuncEnter(); 196 196 197 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;197 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 198 198 AssertPtr(pClient); 199 199 200 200 int rc; 201 201 202 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN,202 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_OPEN, 203 203 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_OPEN); 204 204 if (pMsg) 205 205 { 206 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);206 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 207 207 208 208 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); … … 220 220 if (RT_SUCCESS(rc)) 221 221 { 222 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;222 PSHCLEVENTPAYLOAD pPayload; 223 223 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 224 224 if (RT_SUCCESS(rc)) 225 225 { 226 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));227 228 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;226 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 227 228 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 229 229 AssertPtr(pReply); 230 230 231 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN);231 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN); 232 232 233 233 *phList = pReply->u.ListOpen.uHandle; … … 248 248 } 249 249 250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDLISTHANDLE hList)250 DECLCALLBACK(int) vboxSvcClipboardURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList) 251 251 { 252 252 LogFlowFuncEnter(); 253 253 254 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;254 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 255 255 AssertPtr(pClient); 256 256 257 257 int rc; 258 258 259 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE,259 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_CLOSE, 260 260 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_CLOSE); 261 261 if (pMsg) 262 262 { 263 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);263 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 264 264 265 265 pMsg->m_Ctx.uContextID = VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent); … … 277 277 if (RT_SUCCESS(rc)) 278 278 { 279 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;279 PSHCLEVENTPAYLOAD pPayload; 280 280 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 281 281 if (RT_SUCCESS(rc)) … … 294 294 } 295 295 296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx,297 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)296 DECLCALLBACK(int) vboxSvcClipboardURIListHdrRead(PSHCLPROVIDERCTX pCtx, 297 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 298 298 { 299 299 LogFlowFuncEnter(); 300 300 301 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;301 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 302 302 AssertPtr(pClient); 303 303 304 304 int rc; 305 305 306 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ,306 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_HDR_READ, 307 307 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_HDR_READ_REQ); 308 308 if (pMsg) 309 309 { 310 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);310 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 311 311 312 312 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 323 323 if (RT_SUCCESS(rc)) 324 324 { 325 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;325 PSHCLEVENTPAYLOAD pPayload; 326 326 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, 327 327 pCtx->pTransfer->uTimeoutMs, &pPayload); 328 328 if (RT_SUCCESS(rc)) 329 329 { 330 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDLISTHDR));331 332 *pListHdr = *(P VBOXCLIPBOARDLISTHDR)pPayload->pvData;330 Assert(pPayload->cbData == sizeof(SHCLLISTHDR)); 331 332 *pListHdr = *(PSHCLLISTHDR)pPayload->pvData; 333 333 334 334 SharedClipboardPayloadFree(pPayload); … … 344 344 } 345 345 346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx,347 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTHDR pListHdr)346 DECLCALLBACK(int) vboxSvcClipboardURIListHdrWrite(PSHCLPROVIDERCTX pCtx, 347 SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr) 348 348 { 349 349 RT_NOREF(pCtx, hList, pListHdr); … … 354 354 } 355 355 356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx,357 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)356 DECLCALLBACK(int) vboxSvcClipboardURIListEntryRead(PSHCLPROVIDERCTX pCtx, 357 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 358 358 { 359 359 LogFlowFuncEnter(); 360 360 361 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;361 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 362 362 AssertPtr(pClient); 363 363 364 364 int rc; 365 365 366 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ,366 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_LIST_ENTRY_READ, 367 367 VBOX_SHARED_CLIPBOARD_CPARMS_LIST_ENTRY_READ); 368 368 if (pMsg) 369 369 { 370 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);370 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 371 371 372 372 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 383 383 if (RT_SUCCESS(rc)) 384 384 { 385 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;385 PSHCLEVENTPAYLOAD pPayload; 386 386 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 387 387 if (RT_SUCCESS(rc)) 388 388 { 389 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDLISTENTRY));390 391 rc = SharedClipboardURIListEntryCopy(pListEntry, (P VBOXCLIPBOARDLISTENTRY)pPayload->pvData);389 Assert(pPayload->cbData == sizeof(SHCLLISTENTRY)); 390 391 rc = SharedClipboardURIListEntryCopy(pListEntry, (PSHCLLISTENTRY)pPayload->pvData); 392 392 393 393 SharedClipboardPayloadFree(pPayload); … … 403 403 } 404 404 405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx,406 SH AREDCLIPBOARDLISTHANDLE hList, PVBOXCLIPBOARDLISTENTRY pListEntry)405 DECLCALLBACK(int) vboxSvcClipboardURIListEntryWrite(PSHCLPROVIDERCTX pCtx, 406 SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry) 407 407 { 408 408 RT_NOREF(pCtx, hList, pListEntry); … … 413 413 } 414 414 415 int vboxSvcClipboardURIObjOpen(PSH AREDCLIPBOARDPROVIDERCTX pCtx, PVBOXCLIPBOARDOBJOPENCREATEPARMS pCreateParms,416 PSH AREDCLIPBOARDOBJHANDLE phObj)415 int vboxSvcClipboardURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms, 416 PSHCLOBJHANDLE phObj) 417 417 { 418 418 LogFlowFuncEnter(); 419 419 420 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;420 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 421 421 AssertPtr(pClient); 422 422 423 423 int rc; 424 424 425 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN,425 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_OPEN, 426 426 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_OPEN); 427 427 if (pMsg) 428 428 { 429 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);429 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 430 430 431 431 LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pCreateParms->pszPath, pCreateParms->fCreate)); … … 448 448 if (RT_SUCCESS(rc)) 449 449 { 450 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;450 PSHCLEVENTPAYLOAD pPayload; 451 451 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 452 452 if (RT_SUCCESS(rc)) 453 453 { 454 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));455 456 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;454 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 455 456 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 457 457 AssertPtr(pReply); 458 458 459 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN);459 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN); 460 460 461 461 *phObj = pReply->u.ObjOpen.uHandle; … … 473 473 } 474 474 475 int vboxSvcClipboardURIObjClose(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj)475 int vboxSvcClipboardURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj) 476 476 { 477 477 LogFlowFuncEnter(); 478 478 479 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;479 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 480 480 AssertPtr(pClient); 481 481 482 482 int rc; 483 483 484 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE,484 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_CLOSE, 485 485 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_CLOSE); 486 486 if (pMsg) 487 487 { 488 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);488 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 489 489 490 490 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 500 500 if (RT_SUCCESS(rc)) 501 501 { 502 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;502 PSHCLEVENTPAYLOAD pPayload; 503 503 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 504 504 if (RT_SUCCESS(rc)) 505 505 { 506 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDREPLY));506 Assert(pPayload->cbData == sizeof(SHCLREPLY)); 507 507 508 508 #ifdef VBOX_STRICT 509 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)pPayload->pvData;509 PSHCLREPLY pReply = (PSHCLREPLY)pPayload->pvData; 510 510 AssertPtr(pReply); 511 511 512 Assert(pReply->uType == VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE);512 Assert(pReply->uType == VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE); 513 513 #endif 514 514 … … 525 525 } 526 526 527 int vboxSvcClipboardURIObjRead(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,527 int vboxSvcClipboardURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 528 528 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead) 529 529 { 530 530 LogFlowFuncEnter(); 531 531 532 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;532 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 533 533 AssertPtr(pClient); 534 534 535 535 int rc; 536 536 537 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ,537 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_READ, 538 538 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_READ_REQ); 539 539 if (pMsg) 540 540 { 541 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);541 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 542 542 543 543 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 555 555 if (RT_SUCCESS(rc)) 556 556 { 557 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;557 PSHCLEVENTPAYLOAD pPayload; 558 558 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 559 559 if (RT_SUCCESS(rc)) 560 560 { 561 Assert(pPayload->cbData == sizeof( VBOXCLIPBOARDOBJDATACHUNK));562 563 P VBOXCLIPBOARDOBJDATACHUNK pDataChunk = (PVBOXCLIPBOARDOBJDATACHUNK)pPayload->pvData;561 Assert(pPayload->cbData == sizeof(SHCLOBJDATACHUNK)); 562 563 PSHCLOBJDATACHUNK pDataChunk = (PSHCLOBJDATACHUNK)pPayload->pvData; 564 564 AssertPtr(pDataChunk); 565 565 … … 583 583 } 584 584 585 int vboxSvcClipboardURIObjWrite(PSH AREDCLIPBOARDPROVIDERCTX pCtx, SHAREDCLIPBOARDOBJHANDLE hObj,585 int vboxSvcClipboardURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj, 586 586 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten) 587 587 { 588 588 LogFlowFuncEnter(); 589 589 590 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pCtx->pvUser;590 PSHCLCLIENT pClient = (PSHCLCLIENT)pCtx->pvUser; 591 591 AssertPtr(pClient); 592 592 593 593 int rc; 594 594 595 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE,595 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_OBJ_WRITE, 596 596 VBOX_SHARED_CLIPBOARD_CPARMS_OBJ_WRITE); 597 597 if (pMsg) 598 598 { 599 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events);599 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pCtx->pTransfer->Events); 600 600 601 601 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pCtx->pTransfer->State.uID, uEvent)); … … 613 613 if (RT_SUCCESS(rc)) 614 614 { 615 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;615 PSHCLEVENTPAYLOAD pPayload; 616 616 rc = SharedClipboardEventWait(&pCtx->pTransfer->Events, uEvent, pCtx->pTransfer->uTimeoutMs, &pPayload); 617 617 if (RT_SUCCESS(rc)) … … 641 641 *********************************************************************************************************************************/ 642 642 643 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData)643 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData) 644 644 { 645 645 RT_NOREF(pData); … … 648 648 } 649 649 650 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)650 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 651 651 { 652 652 RT_NOREF(pData, rc); … … 657 657 } 658 658 659 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData)659 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData) 660 660 { 661 661 LogFlowFuncEnter(); … … 666 666 } 667 667 668 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSH AREDCLIPBOARDURITRANSFERCALLBACKDATA pData, int rc)668 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc) 669 669 { 670 670 LogFlowFuncEnter(); … … 689 689 */ 690 690 static int vboxSvcClipboardURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 691 P VBOXCLIPBOARDREPLY pReply)691 PSHCLREPLY pReply) 692 692 { 693 693 int rc; … … 714 714 switch (pReply->uType) 715 715 { 716 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:716 case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN: 717 717 { 718 718 if (cParms >= 6) … … 721 721 } 722 722 723 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:723 case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN: 724 724 { 725 725 if (cParms >= 6) … … 728 728 } 729 729 730 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:730 case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE: 731 731 { 732 732 if (cParms >= 6) … … 757 757 */ 758 758 static int vboxSvcClipboardURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 759 P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)759 PSHCLROOTLISTHDR pRootLstHdr) 760 760 { 761 761 int rc; … … 783 783 */ 784 784 static int vboxSvcClipboardURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 785 P VBOXCLIPBOARDROOTLISTENTRY pListEntry)785 PSHCLROOTLISTENTRY pListEntry) 786 786 { 787 787 int rc; … … 820 820 */ 821 821 static int vboxSvcClipboardURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 822 P VBOXCLIPBOARDLISTOPENPARMS pOpenParms)822 PSHCLLISTOPENPARMS pOpenParms) 823 823 { 824 824 int rc; … … 867 867 */ 868 868 static int vboxSvcClipboardURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 869 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTOPENPARMS pOpenParms)869 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms) 870 870 { 871 871 int rc; … … 900 900 */ 901 901 static int vboxSvcClipboardURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 902 PVBOXSHCLMSGCTX pMsgCtx, SH AREDCLIPBOARDLISTHANDLE hList)902 PVBOXSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList) 903 903 { 904 904 int rc; … … 928 928 */ 929 929 static int vboxSvcClipboardURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 930 PSH AREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTHDR pListHdr)930 PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr) 931 931 { 932 932 int rc; … … 967 967 */ 968 968 static int vboxSvcClipboardURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 969 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTHDR pListHdr)969 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr) 970 970 { 971 971 int rc; … … 1002 1002 */ 1003 1003 static int vboxSvcClipboardURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1004 PSH AREDCLIPBOARDLISTHANDLE phList, PVBOXCLIPBOARDLISTENTRY pListEntry)1004 PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry) 1005 1005 { 1006 1006 int rc; … … 1048 1048 */ 1049 1049 static int vboxSvcClipboardURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[], 1050 PVBOXSHCLMSGCTX pMsgCtx, P VBOXCLIPBOARDLISTENTRY pListEntry)1050 PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry) 1051 1051 { 1052 1052 int rc; … … 1079 1079 * @param pDataChunk Where to store the object data chunk data. 1080 1080 */ 1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1081 static int vboxSvcClipboardURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk) 1082 1082 { 1083 1083 AssertPtrReturn(paParms, VERR_INVALID_PARAMETER); … … 1144 1144 * @param paParms Array function parameters supplied. 1145 1145 */ 1146 static int vboxSvcClipboardURITransferHandleReply(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer,1146 static int vboxSvcClipboardURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer, 1147 1147 uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 1148 1148 { … … 1151 1151 int rc; 1152 1152 1153 uint32_t cbReply = sizeof( VBOXCLIPBOARDREPLY);1154 P VBOXCLIPBOARDREPLY pReply = (PVBOXCLIPBOARDREPLY)RTMemAlloc(cbReply);1153 uint32_t cbReply = sizeof(SHCLREPLY); 1154 PSHCLREPLY pReply = (PSHCLREPLY)RTMemAlloc(cbReply); 1155 1155 if (pReply) 1156 1156 { … … 1158 1158 if (RT_SUCCESS(rc)) 1159 1159 { 1160 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload1161 = (PSH AREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));1160 PSHCLEVENTPAYLOAD pPayload 1161 = (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD)); 1162 1162 if (pPayload) 1163 1163 { … … 1167 1167 switch (pReply->uType) 1168 1168 { 1169 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_OPEN:1169 case VBOX_SHCL_REPLYMSGTYPE_LIST_OPEN: 1170 1170 RT_FALL_THROUGH(); 1171 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_LIST_CLOSE:1171 case VBOX_SHCL_REPLYMSGTYPE_LIST_CLOSE: 1172 1172 RT_FALL_THROUGH(); 1173 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_OPEN:1173 case VBOX_SHCL_REPLYMSGTYPE_OBJ_OPEN: 1174 1174 RT_FALL_THROUGH(); 1175 case VBOX_SH AREDCLIPBOARD_REPLYMSGTYPE_OBJ_CLOSE:1175 case VBOX_SHCL_REPLYMSGTYPE_OBJ_CLOSE: 1176 1176 { 1177 1177 uint32_t uCID; … … 1179 1179 if (RT_SUCCESS(rc)) 1180 1180 { 1181 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1181 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1182 1182 1183 1183 LogFlowFunc(("uCID=%RU32 -> uEvent=%RU32\n", uCID, uEvent)); … … 1227 1227 * @param tsArrival Timestamp of arrival. 1228 1228 */ 1229 int vboxSvcClipboardURIHandler(P VBOXCLIPBOARDCLIENT pClient,1229 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, 1230 1230 VBOXHGCMCALLHANDLE callHandle, 1231 1231 uint32_t u32Function, … … 1262 1262 * Pre-check: For certain messages we need to make sure that a (right) transfer is present. 1263 1263 */ 1264 PSH AREDCLIPBOARDURITRANSFER pTransfer = NULL;1264 PSHCLURITRANSFER pTransfer = NULL; 1265 1265 switch (u32Function) 1266 1266 { … … 1301 1301 break; 1302 1302 1303 SH AREDCLIPBOARDURITRANSFERSTATUS uStatus = SHAREDCLIPBOARDURITRANSFERSTATUS_NONE;1303 SHCLURITRANSFERSTATUS uStatus = SHCLURITRANSFERSTATUS_NONE; 1304 1304 rc = HGCMSvcGetU32(&paParms[1], &uStatus); 1305 1305 if (RT_FAILURE(rc)) … … 1316 1316 } 1317 1317 1318 if (uStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING)1319 { 1320 const SH AREDCLIPBOARDURITRANSFERDIR enmDir = SHAREDCLIPBOARDURITRANSFERDIR_READ;1321 1322 PSH AREDCLIPBOARDURITRANSFER pTransfer;1318 if (uStatus == SHCLURITRANSFERSTATUS_RUNNING) 1319 { 1320 const SHCLURITRANSFERDIR enmDir = SHCLURITRANSFERDIR_READ; 1321 1322 PSHCLURITRANSFER pTransfer; 1323 1323 rc = SharedClipboardURITransferCreate(enmDir, 1324 SH AREDCLIPBOARDSOURCE_REMOTE, &pTransfer);1324 SHCLSOURCE_REMOTE, &pTransfer); 1325 1325 if (RT_SUCCESS(rc)) 1326 1326 { … … 1328 1328 if (RT_SUCCESS(rc)) 1329 1329 { 1330 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1330 SHCLPROVIDERCREATIONCTX creationCtx; 1331 1331 RT_ZERO(creationCtx); 1332 1332 … … 1340 1340 creationCtx.Interface.pfnObjClose = vboxSvcClipboardURIObjClose; 1341 1341 1342 if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_READ)1342 if (enmDir == SHCLURITRANSFERDIR_READ) 1343 1343 { 1344 1344 creationCtx.Interface.pfnGetRoots = vboxSvcClipboardURIGetRoots; … … 1355 1355 1356 1356 /* Register needed callbacks so that we can wait for the meta data to arrive here. */ 1357 SH AREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;1357 SHCLURITRANSFERCALLBACKS Callbacks; 1358 1358 RT_ZERO(Callbacks); 1359 1359 … … 1409 1409 case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_HDR_WRITE: 1410 1410 { 1411 VBOXCLIPBOARDROOTLISTHDR lstHdr;1411 SHCLROOTLISTHDR lstHdr; 1412 1412 rc = vboxSvcClipboardURIGetRootListHdr(cParms, paParms, &lstHdr); 1413 1413 if (RT_SUCCESS(rc)) 1414 1414 { 1415 1415 void *pvData = SharedClipboardURIRootListHdrDup(&lstHdr); 1416 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTHDR);1416 uint32_t cbData = sizeof(SHCLROOTLISTHDR); 1417 1417 1418 1418 uint32_t uCID; … … 1420 1420 if (RT_SUCCESS(rc)) 1421 1421 { 1422 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1423 1424 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1422 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1423 1424 PSHCLEVENTPAYLOAD pPayload; 1425 1425 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1426 1426 if (RT_SUCCESS(rc)) … … 1438 1438 { 1439 1439 #if 0 1440 VBOXCLIPBOARDROOTLISTENTRY lstEntry;1440 SHCLROOTLISTENTRY lstEntry; 1441 1441 rc = VBoxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry); 1442 1442 if (RT_SUCCESS(rc)) 1443 1443 { 1444 1444 void *pvData = SharedClipboardURIRootListEntryDup(&lstEntry); 1445 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTENTRY);1446 1447 PSH AREDCLIPBOARDURITRANSFERPAYLOAD pPayload;1448 rc = SharedClipboardURITransferPayloadAlloc(SH AREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,1445 uint32_t cbData = sizeof(SHCLROOTLISTENTRY); 1446 1447 PSHCLURITRANSFERPAYLOAD pPayload; 1448 rc = SharedClipboardURITransferPayloadAlloc(SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ, 1449 1449 pvData, cbData, &pPayload); 1450 1450 if (RT_SUCCESS(rc)) 1451 rc = SharedClipboardURITransferEventSignal(pTransfer, SH AREDCLIPBOARDURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,1451 rc = SharedClipboardURITransferEventSignal(pTransfer, SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ, 1452 1452 pPayload); 1453 1453 } … … 1458 1458 case VBOX_SHARED_CLIPBOARD_GUEST_FN_ROOT_LIST_ENTRY_WRITE: 1459 1459 { 1460 VBOXCLIPBOARDROOTLISTENTRY lstEntry;1460 SHCLROOTLISTENTRY lstEntry; 1461 1461 rc = vboxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry); 1462 1462 if (RT_SUCCESS(rc)) 1463 1463 { 1464 1464 void *pvData = SharedClipboardURIRootListEntryDup(&lstEntry); 1465 uint32_t cbData = sizeof( VBOXCLIPBOARDROOTLISTENTRY);1465 uint32_t cbData = sizeof(SHCLROOTLISTENTRY); 1466 1466 1467 1467 uint32_t uCID; … … 1469 1469 if (RT_SUCCESS(rc)) 1470 1470 { 1471 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1472 1473 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1471 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1472 1473 PSHCLEVENTPAYLOAD pPayload; 1474 1474 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1475 1475 if (RT_SUCCESS(rc)) … … 1486 1486 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_OPEN: 1487 1487 { 1488 VBOXCLIPBOARDLISTOPENPARMS listOpenParms;1488 SHCLLISTOPENPARMS listOpenParms; 1489 1489 rc = vboxSvcClipboardURIGetListOpen(cParms, paParms, &listOpenParms); 1490 1490 if (RT_SUCCESS(rc)) 1491 1491 { 1492 SH AREDCLIPBOARDLISTHANDLE hList;1492 SHCLLISTHANDLE hList; 1493 1493 rc = SharedClipboardURITransferListOpen(pTransfer, &listOpenParms, &hList); 1494 1494 if (RT_SUCCESS(rc)) … … 1506 1506 break; 1507 1507 1508 SH AREDCLIPBOARDLISTHANDLE hList;1508 SHCLLISTHANDLE hList; 1509 1509 rc = HGCMSvcGetU64(&paParms[1], &hList); 1510 1510 if (RT_SUCCESS(rc)) … … 1520 1520 break; 1521 1521 1522 SH AREDCLIPBOARDLISTHANDLE hList;1522 SHCLLISTHANDLE hList; 1523 1523 rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */ 1524 1524 if (RT_SUCCESS(rc)) 1525 1525 { 1526 VBOXCLIPBOARDLISTHDR hdrList;1526 SHCLLISTHDR hdrList; 1527 1527 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 1528 1528 /*if (RT_SUCCESS(rc)) … … 1534 1534 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_HDR_WRITE: 1535 1535 { 1536 VBOXCLIPBOARDLISTHDR hdrList;1536 SHCLLISTHDR hdrList; 1537 1537 rc = SharedClipboardURIListHdrInit(&hdrList); 1538 1538 if (RT_SUCCESS(rc)) 1539 1539 { 1540 SH AREDCLIPBOARDLISTHANDLE hList;1540 SHCLLISTHANDLE hList; 1541 1541 rc = vboxSvcClipboardURIGetListHdr(cParms, paParms, &hList, &hdrList); 1542 1542 if (RT_SUCCESS(rc)) 1543 1543 { 1544 1544 void *pvData = SharedClipboardURIListHdrDup(&hdrList); 1545 uint32_t cbData = sizeof( VBOXCLIPBOARDLISTHDR);1545 uint32_t cbData = sizeof(SHCLLISTHDR); 1546 1546 1547 1547 uint32_t uCID; … … 1549 1549 if (RT_SUCCESS(rc)) 1550 1550 { 1551 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1552 1553 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1551 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1552 1553 PSHCLEVENTPAYLOAD pPayload; 1554 1554 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1555 1555 if (RT_SUCCESS(rc)) … … 1570 1570 break; 1571 1571 1572 SH AREDCLIPBOARDLISTHANDLE hList;1572 SHCLLISTHANDLE hList; 1573 1573 rc = HGCMSvcGetU64(&paParms[1], &hList); /* Get list handle. */ 1574 1574 if (RT_SUCCESS(rc)) 1575 1575 { 1576 VBOXCLIPBOARDLISTENTRY entryList;1576 SHCLLISTENTRY entryList; 1577 1577 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList); 1578 1578 } … … 1582 1582 case VBOX_SHARED_CLIPBOARD_GUEST_FN_LIST_ENTRY_WRITE: 1583 1583 { 1584 VBOXCLIPBOARDLISTENTRY entryList;1584 SHCLLISTENTRY entryList; 1585 1585 rc = SharedClipboardURIListEntryInit(&entryList); 1586 1586 if (RT_SUCCESS(rc)) 1587 1587 { 1588 SH AREDCLIPBOARDLISTHANDLE hList;1588 SHCLLISTHANDLE hList; 1589 1589 rc = vboxSvcClipboardURIGetListEntry(cParms, paParms, &hList, &entryList); 1590 1590 if (RT_SUCCESS(rc)) 1591 1591 { 1592 1592 void *pvData = SharedClipboardURIListEntryDup(&entryList); 1593 uint32_t cbData = sizeof( VBOXCLIPBOARDLISTENTRY);1593 uint32_t cbData = sizeof(SHCLLISTENTRY); 1594 1594 1595 1595 uint32_t uCID; … … 1597 1597 if (RT_SUCCESS(rc)) 1598 1598 { 1599 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1600 1601 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1599 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1600 1601 PSHCLEVENTPAYLOAD pPayload; 1602 1602 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1603 1603 if (RT_SUCCESS(rc)) … … 1632 1632 case VBOX_SHARED_CLIPBOARD_GUEST_FN_OBJ_WRITE: 1633 1633 { 1634 VBOXCLIPBOARDOBJDATACHUNK dataChunk;1634 SHCLOBJDATACHUNK dataChunk; 1635 1635 rc = vboxSvcClipboardURIGetObjDataChunk(cParms, paParms, &dataChunk); 1636 1636 if (RT_SUCCESS(rc)) 1637 1637 { 1638 1638 void *pvData = SharedClipboardURIObjectDataChunkDup(&dataChunk); 1639 uint32_t cbData = sizeof( VBOXCLIPBOARDOBJDATACHUNK);1639 uint32_t cbData = sizeof(SHCLOBJDATACHUNK); 1640 1640 1641 1641 uint32_t uCID; … … 1643 1643 if (RT_SUCCESS(rc)) 1644 1644 { 1645 const VBOXCLIPBOARDEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID);1646 1647 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;1645 const SHCLEVENTID uEvent = VBOX_SHARED_CLIPBOARD_CONTEXTID_GET_EVENT(uCID); 1646 1647 PSHCLEVENTPAYLOAD pPayload; 1648 1648 rc = SharedClipboardPayloadAlloc(uEvent, pvData, cbData, &pPayload); 1649 1649 if (RT_SUCCESS(rc)) … … 1664 1664 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_WRITE_DIR\n")); 1665 1665 1666 VBOXCLIPBOARDDIRDATA dirData;1666 SHCLDIRDATA dirData; 1667 1667 rc = VBoxSvcClipboardURIGetDir(cParms, paParms, &dirData); 1668 1668 if (RT_SUCCESS(rc)) … … 1680 1680 if (RT_SUCCESS(rc)) 1681 1681 { 1682 SH AREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_DIR, SHAREDCLIPBOARDAREAOBJSTATE_COMPLETE };1682 SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_DIR, SHCLAREAOBJSTATE_COMPLETE }; 1683 1683 int rc2 = pArea->AddObject(pszDir, Obj); 1684 1684 AssertRC(rc2); … … 1697 1697 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_GUEST_FN_READ_FILE_HDR\n")); 1698 1698 1699 VBOXCLIPBOARDFILEHDR fileHdr;1699 SHCLFILEHDR fileHdr; 1700 1700 rc = VBoxSvcClipboardURISetFileHdr(cParms, paParms, &fileHdr); 1701 1701 break; … … 1722 1722 break; 1723 1723 1724 VBOXCLIPBOARDFILEHDR fileHdr;1724 SHCLFILEHDR fileHdr; 1725 1725 rc = VBoxSvcClipboardURIGetFileHdr(cParms, paParms, &fileHdr); 1726 1726 if (RT_SUCCESS(rc)) … … 1738 1738 if (RT_SUCCESS(rc)) 1739 1739 { 1740 PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);1740 PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer); 1741 1741 AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER); 1742 1742 … … 1767 1767 } 1768 1768 1769 SH AREDCLIPBOARDAREAOBJ Obj = { SHAREDCLIPBOARDAREAOBJTYPE_FILE, SHAREDCLIPBOARDAREAOBJSTATE_NONE };1769 SHCLAREAOBJ Obj = { SHCLAREAOBJTYPE_FILE, SHCLAREAOBJSTATE_NONE }; 1770 1770 int rc2 = pArea->AddObject(pszPathAbs, Obj); 1771 1771 AssertRC(rc2); … … 1783 1783 LogFlowFunc(("VBOX_SHARED_CLIPBOARD_FN_READ_FILE_DATA\n")); 1784 1784 1785 VBOXCLIPBOARDFILEDATA fileData;1785 SHCLFILEDATA fileData; 1786 1786 rc = VBoxSvcClipboardURISetFileData(cParms, paParms, &fileData); 1787 1787 break; … … 1798 1798 } 1799 1799 1800 VBOXCLIPBOARDFILEDATA fileData;1800 SHCLFILEDATA fileData; 1801 1801 rc = VBoxSvcClipboardURIGetFileData(cParms, paParms, &fileData); 1802 1802 if (RT_SUCCESS(rc)) 1803 1803 { 1804 PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);1804 PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer); 1805 1805 AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER); 1806 1806 … … 1901 1901 * @param pTransfer URI transfer to register a clipboard area for. 1902 1902 */ 1903 int vboxSvcClipboardURIAreaRegister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)1903 int vboxSvcClipboardURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1904 1904 { 1905 1905 RT_NOREF(pClientState); … … 1918 1918 if (g_ExtState.pfnExtension) 1919 1919 { 1920 VBOXCLIPBOARDEXTAREAPARMS parms;1920 SHCLEXTAREAPARMS parms; 1921 1921 RT_ZERO(parms); 1922 1922 1923 parms.uID = NIL_SH AREDCLIPBOARDAREAID;1923 parms.uID = NIL_SHCLAREAID; 1924 1924 1925 1925 /* As the meta data is now complete, register a new clipboard on the host side. */ … … 1927 1927 if (RT_SUCCESS(rc)) 1928 1928 { 1929 /* Note: Do *not* specify SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the1929 /* Note: Do *not* specify SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST as flags here, as VBoxSVC took care of the 1930 1930 * clipboard area creation already. */ 1931 1931 rc = pTransfer->pArea->OpenTemp(parms.uID /* Area ID */, 1932 SH AREDCLIPBOARDAREA_OPEN_FLAGS_NONE);1932 SHCLAREA_OPEN_FLAGS_NONE); 1933 1933 } 1934 1934 … … 1950 1950 * @param pTransfer URI transfer to unregister a clipboard area from. 1951 1951 */ 1952 int vboxSvcClipboardURIAreaUnregister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)1952 int vboxSvcClipboardURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 1953 1953 { 1954 1954 RT_NOREF(pClientState); … … 1963 1963 if (g_ExtState.pfnExtension) 1964 1964 { 1965 VBOXCLIPBOARDEXTAREAPARMS parms;1965 SHCLEXTAREAPARMS parms; 1966 1966 RT_ZERO(parms); 1967 1967 … … 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(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer,2001 SH AREDCLIPBOARDAREAID uID)2000 int vboxSvcClipboardURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, 2001 SHCLAREAID uID) 2002 2002 { 2003 2003 RT_NOREF(pClientState); … … 2016 2016 if (g_ExtState.pfnExtension) 2017 2017 { 2018 VBOXCLIPBOARDEXTAREAPARMS parms;2018 SHCLEXTAREAPARMS parms; 2019 2019 RT_ZERO(parms); 2020 2020 … … 2046 2046 * @param pTransfer URI transfer to detach a clipboard area from. 2047 2047 */ 2048 int vboxSvcClipboardURIAreaDetach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer)2048 int vboxSvcClipboardURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer) 2049 2049 { 2050 2050 RT_NOREF(pClientState); … … 2061 2061 if (g_ExtState.pfnExtension) 2062 2062 { 2063 VBOXCLIPBOARDEXTAREAPARMS parms;2063 SHCLEXTAREAPARMS parms; 2064 2064 RT_ZERO(parms); 2065 2065 parms.uID = uAreaID; -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.h
r79497 r80662 22 22 #endif 23 23 24 int vboxSvcClipboardURIHandler(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);24 int vboxSvcClipboardURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival); 25 25 int vboxSvcClipboardURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 26 26 27 int vboxSvcClipboardURIAreaRegister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);28 int vboxSvcClipboardURIAreaUnregister(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);29 int vboxSvcClipboardURIAreaAttach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDAREAID uID);30 int vboxSvcClipboardURIAreaDetach(P VBOXCLIPBOARDCLIENTSTATE pClientState, PSHAREDCLIPBOARDURITRANSFER pTransfer);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); 31 31 32 32 #endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_uri_h */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp
r80444 r80662 93 93 94 94 #if 0 95 int vboxSvcClipboardURIReportMsg(P VBOXCLIPBOARDCLIENT pClient, uint32_t uMsg, uint32_t uParm)95 int vboxSvcClipboardURIReportMsg(PSHCLCLIENT pClient, uint32_t uMsg, uint32_t uParm) 96 96 { 97 97 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 115 115 116 116 pClient->State.URI.fTransferStart = true; 117 pClient->State.URI.enmTransferDir = (SH AREDCLIPBOARDURITRANSFERDIR)uParm;117 pClient->State.URI.enmTransferDir = (SHCLURITRANSFERDIR)uParm; 118 118 break; 119 119 … … 130 130 } 131 131 132 bool vboxSvcClipboardURIReturnMsg(P VBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])132 bool vboxSvcClipboardURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 133 133 { 134 134 RT_NOREF(pClient, cParms, paParms); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r80623 r80662 53 53 * Internal Functions * 54 54 *********************************************************************************************************************************/ 55 static int vboxClipboardSvcWinSyncInternal(P VBOXCLIPBOARDCONTEXT pCtx);56 57 struct _ VBOXCLIPBOARDCONTEXT55 static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx); 56 57 struct _SHCLCONTEXT 58 58 { 59 59 /** Handle for window message handling thread. */ 60 60 RTTHREAD hThread; 61 61 /** Structure for keeping and communicating with service client. */ 62 P VBOXCLIPBOARDCLIENT pClient;62 PSHCLCLIENT pClient; 63 63 /** Windows-specific context data. */ 64 VBOXCLIPBOARDWINCTX Win;64 SHCLWINCTX Win; 65 65 }; 66 66 … … 114 114 } 115 115 116 static int vboxClipboardSvcWinDataSet(P VBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData)116 static int vboxClipboardSvcWinDataSet(PSHCLCONTEXT pCtx, UINT cfFormat, void *pvData, uint32_t cbData) 117 117 { 118 118 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 167 167 } 168 168 169 static int vboxClipboardSvcWinDataRead(P VBOXCLIPBOARDCONTEXT pCtx, UINT cfFormat,169 static int vboxClipboardSvcWinDataRead(PSHCLCONTEXT pCtx, UINT cfFormat, 170 170 void **ppvData, uint32_t *pcbData) 171 171 { 172 172 LogFlowFunc(("cfFormat=%u\n", cfFormat)); 173 173 174 SH AREDCLIPBOARDDATAREQ dataReq;174 SHCLDATAREQ dataReq; 175 175 RT_ZERO(dataReq); 176 176 … … 178 178 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 179 179 180 VBOXCLIPBOARDEVENTID uEvent = 0;180 SHCLEVENTID uEvent = 0; 181 181 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 182 182 if (RT_SUCCESS(rc)) 183 183 { 184 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;184 PSHCLEVENTPAYLOAD pPayload; 185 185 rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload); 186 186 if (RT_SUCCESS(rc)) … … 200 200 } 201 201 202 static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(P VBOXCLIPBOARDCONTEXT pCtx,202 static LRESULT CALLBACK vboxClipboardSvcWinWndProcMain(PSHCLCONTEXT pCtx, 203 203 HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 204 204 { … … 207 207 LRESULT lresultRc = 0; 208 208 209 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;209 const PSHCLWINCTX pWinCtx = &pCtx->Win; 210 210 211 211 switch (uMsg) … … 222 222 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 223 223 if (RT_SUCCESS(rc)) 224 vboxSvcClipboardSetSource(pCtx->pClient, SH AREDCLIPBOARDSOURCE_LOCAL);224 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 225 225 } 226 226 … … 244 244 int rc = vboxClipboardSvcWinSyncInternal(pCtx); 245 245 if (RT_SUCCESS(rc)) 246 vboxSvcClipboardSetSource(pCtx->pClient, SH AREDCLIPBOARDSOURCE_LOCAL);246 vboxSvcClipboardSetSource(pCtx->pClient, SHCLSOURCE_LOCAL); 247 247 } 248 248 … … 266 266 const UINT cfFormat = (UINT)wParam; 267 267 268 const VBOXCLIPBOARDFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat);268 const SHCLFORMAT fFormat = VBoxClipboardWinClipboardFormatToVBox(cfFormat); 269 269 270 270 LogFunc(("WM_RENDERFORMAT: cfFormat=%u -> fFormat=0x%x\n", cfFormat, fFormat)); … … 314 314 315 315 /* Announce available formats. Do not insert data -- will be inserted in WM_RENDERFORMAT. */ 316 VBOXCLIPBOARDFORMATS fFormats = (uint32_t)lParam;316 SHCLFORMATS fFormats = (uint32_t)lParam; 317 317 if (fFormats != VBOX_SHARED_CLIPBOARD_FMT_NONE) /* Could arrive with some older GA versions. */ 318 318 { … … 361 361 AssertPtrReturn(pUserData, 0); 362 362 363 P VBOXCLIPBOARDCONTEXT pCtx = reinterpret_cast<PVBOXCLIPBOARDCONTEXT>(pUserData);363 PSHCLCONTEXT pCtx = reinterpret_cast<PSHCLCONTEXT>(pUserData); 364 364 if (pCtx) 365 365 return vboxClipboardSvcWinWndProcMain(pCtx, hWnd, uMsg, wParam, lParam); … … 398 398 bool fThreadSignalled = false; 399 399 400 const P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)pvUser;400 const PSHCLCONTEXT pCtx = (PSHCLCONTEXT)pvUser; 401 401 AssertPtr(pCtx); 402 const P VBOXCLIPBOARDWINCTX pWinCtx = &pCtx->Win;402 const PSHCLWINCTX pWinCtx = &pCtx->Win; 403 403 404 404 HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL); … … 517 517 * @param pCtx Clipboard context to synchronize. 518 518 */ 519 static int vboxClipboardSvcWinSyncInternal(P VBOXCLIPBOARDCONTEXT pCtx)519 static int vboxClipboardSvcWinSyncInternal(PSHCLCONTEXT pCtx) 520 520 { 521 521 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 527 527 if (pCtx->pClient) 528 528 { 529 SH AREDCLIPBOARDFORMATDATA Formats;529 SHCLFORMATDATA Formats; 530 530 RT_ZERO(Formats); 531 531 … … 559 559 } 560 560 561 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)561 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 562 562 { 563 563 RT_NOREF(fHeadless); … … 567 567 int rc; 568 568 569 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));569 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT)); 570 570 if (pCtx) 571 571 { … … 596 596 } 597 597 598 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)598 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 599 599 { 600 600 /* Sync the host clipboard content with the client. */ … … 602 602 } 603 603 604 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)604 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 605 605 { 606 606 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 610 610 int rc = VINF_SUCCESS; 611 611 612 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;612 PSHCLCONTEXT pCtx = pClient->State.pCtx; 613 613 if (pCtx) 614 614 { … … 641 641 } 642 642 643 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,644 PSH AREDCLIPBOARDFORMATDATA pFormats)643 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 644 PSHCLFORMATDATA pFormats) 645 645 { 646 646 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 649 649 int rc; 650 650 651 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;651 PSHCLCONTEXT pCtx = pClient->State.pCtx; 652 652 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 653 653 … … 657 657 if (pFormats->uFormats & VBOX_SHARED_CLIPBOARD_FMT_URI_LIST) 658 658 { 659 PSH AREDCLIPBOARDURITRANSFER pTransfer;659 PSHCLURITRANSFER pTransfer; 660 660 rc = vboxSvcClipboardURITransferStart(pClient, 661 SH AREDCLIPBOARDURITRANSFERDIR_READ, SHAREDCLIPBOARDSOURCE_REMOTE,661 SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE, 662 662 &pTransfer); 663 663 if (RT_SUCCESS(rc)) … … 691 691 } 692 692 693 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,694 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)693 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 694 PSHCLDATABLOCK pData, uint32_t *pcbActual) 695 695 { 696 696 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 702 702 HANDLE hClip = NULL; 703 703 704 const P VBOXCLIPBOARDWINCTX pWinCtx = &pClient->State.pCtx->Win;704 const PSHCLWINCTX pWinCtx = &pClient->State.pCtx->Win; 705 705 706 706 /* … … 802 802 } 803 803 804 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,805 PSH AREDCLIPBOARDDATABLOCK pData)804 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 805 PSHCLDATABLOCK pData) 806 806 { 807 807 LogFlowFuncEnter(); … … 814 814 815 815 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 816 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)816 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 817 817 { 818 818 RT_NOREF(pClient, pTransfer); … … 823 823 } 824 824 825 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)825 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 826 826 { 827 827 LogFlowFuncEnter(); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp
r80623 r80662 58 58 * @param fHeadless Whether headless. 59 59 */ 60 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)60 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 61 61 { 62 62 RT_NOREF(pClient, fHeadless); … … 69 69 * after a save and restore of the guest. 70 70 */ 71 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)71 int VBoxClipboardSvcImplSync(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(P VBOXCLIPBOARDCLIENT pClient)83 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 84 84 { 85 85 RT_NOREF(pClient); … … 95 95 * @param pFormats Clipboard formats the guest is offering. 96 96 */ 97 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,98 PSH AREDCLIPBOARDFORMATDATA pFormats)97 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 98 PSHCLFORMATDATA pFormats) 99 99 { 100 100 RT_NOREF(pClient, pCmdCtx, pFormats); … … 110 110 * @param pcbActual Where to store the actual amount of data available. 111 111 */ 112 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,113 PSH AREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)112 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 113 PSHCLDATABLOCK pData, uint32_t *pcbActual) 114 114 { 115 115 RT_NOREF(pClient, pCmdCtx, pData); … … 121 121 } 122 122 123 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,124 PSH AREDCLIPBOARDDATABLOCK pData)123 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 124 PSHCLDATABLOCK pData) 125 125 { 126 126 RT_NOREF(pClient, pCmdCtx, pData); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r80623 r80662 42 42 * Global context information used by the host glue for the X11 clipboard backend. 43 43 */ 44 struct _ VBOXCLIPBOARDCONTEXT44 struct _SHCLCONTEXT 45 45 { 46 46 /** This mutex is grabbed during any critical operations on the clipboard … … 50 50 CLIPBACKEND *pBackend; 51 51 /** Pointer to the VBox host client data structure. */ 52 P VBOXCLIPBOARDCLIENT pClient;52 PSHCLCLIENT pClient; 53 53 /** We set this when we start shutting down as a hint not to post any new 54 54 * requests. */ … … 63 63 * @note Host glue code 64 64 */ 65 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)65 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 66 66 { 67 67 LogFlowFunc(("pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats)); 68 68 69 SH AREDCLIPBOARDFORMATDATA formatData;69 SHCLFORMATDATA formatData; 70 70 RT_ZERO(formatData); 71 71 … … 100 100 * the clipboard and leave ownership to X11. 101 101 */ 102 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT pClient, bool fHeadless)102 int VBoxClipboardSvcImplConnect(PSHCLCLIENT pClient, bool fHeadless) 103 103 { 104 104 int rc = VINF_SUCCESS; 105 105 106 P VBOXCLIPBOARDCONTEXT pCtx = (PVBOXCLIPBOARDCONTEXT)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));106 PSHCLCONTEXT pCtx = (PSHCLCONTEXT)RTMemAllocZ(sizeof(SHCLCONTEXT)); 107 107 if (pCtx) 108 108 { … … 142 142 * @note Host glue code 143 143 */ 144 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT pClient)144 int VBoxClipboardSvcImplSync(PSHCLCLIENT pClient) 145 145 { 146 146 LogFlowFuncEnter(); … … 149 149 * there is data in the host clipboard it will automatically be sent to 150 150 * the guest when the clipboard starts up. */ 151 SH AREDCLIPBOARDFORMATDATA formatData;151 SHCLFORMATDATA formatData; 152 152 RT_ZERO(formatData); 153 153 … … 161 161 * @note Host glue code 162 162 */ 163 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT pClient)163 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT pClient) 164 164 { 165 165 LogFlowFuncEnter(); 166 166 167 P VBOXCLIPBOARDCONTEXT pCtx = pClient->State.pCtx;167 PSHCLCONTEXT pCtx = pClient->State.pCtx; 168 168 169 169 /* Drop the reference to the client, in case it is still there. This … … 173 173 174 174 /* If there is a currently pending request, release it immediately. */ 175 SH AREDCLIPBOARDDATABLOCK dataBlock = { 0, NULL, 0 };175 SHCLDATABLOCK dataBlock = { 0, NULL, 0 }; 176 176 VBoxClipboardSvcImplWriteData(pClient, NULL, &dataBlock); 177 177 … … 199 199 * @param pFormats Clipboard formats the guest is offering. 200 200 */ 201 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,202 PSH AREDCLIPBOARDFORMATDATA pFormats)201 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 202 PSHCLFORMATDATA pFormats) 203 203 { 204 204 RT_NOREF(pCmdCtx); … … 224 224 uint32_t *pcbActual; 225 225 /** The request's event ID. */ 226 VBOXCLIPBOARDEVENTID uEvent;226 SHCLEVENTID uEvent; 227 227 }; 228 228 … … 245 245 * 246 246 */ 247 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT pClient,248 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData, uint32_t *pcbActual)247 int VBoxClipboardSvcImplReadData(PSHCLCLIENT pClient, 248 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData, uint32_t *pcbActual) 249 249 { 250 250 RT_NOREF(pCmdCtx); … … 258 258 if (pReq) 259 259 { 260 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);260 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 261 261 262 262 pReq->pv = pData->pvData; … … 271 271 if (RT_SUCCESS(rc)) 272 272 { 273 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;273 PSHCLEVENTPAYLOAD pPayload; 274 274 rc = SharedClipboardEventWait(&pClient->Events, uEvent, 30 * 1000, &pPayload); 275 275 if (RT_SUCCESS(rc)) … … 299 299 * @param pData Data block to write to clipboard. 300 300 */ 301 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT pClient,302 P VBOXCLIPBOARDCLIENTCMDCTX pCmdCtx, PSHAREDCLIPBOARDDATABLOCK pData)301 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT pClient, 302 PSHCLCLIENTCMDCTX pCmdCtx, PSHCLDATABLOCK pData) 303 303 { 304 304 LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n", … … 323 323 * @todo Change this to deal with the buffer issues rather than offloading them onto the caller. 324 324 */ 325 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc,325 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, 326 326 CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 327 327 { 328 328 AssertMsgRC(rc, ("Clipboard data completion from X11 failed with %Rrc\n", rc)); 329 329 330 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;330 PSHCLEVENTPAYLOAD pPayload; 331 331 int rc2 = SharedClipboardPayloadAlloc(pReq->uEvent, pv, cb, &pPayload); 332 332 if (RT_SUCCESS(rc2)) … … 349 349 * @note Host glue code. 350 350 */ 351 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)351 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 352 352 { 353 353 LogFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p\n", pCtx, u32Format, ppv)); … … 361 361 362 362 /* Request data from the guest. */ 363 SH AREDCLIPBOARDDATAREQ dataReq;363 SHCLDATAREQ dataReq; 364 364 RT_ZERO(dataReq); 365 365 … … 367 367 dataReq.cbSize = _64K; /** @todo Make this more dynamic. */ 368 368 369 VBOXCLIPBOARDEVENTID uEvent;369 SHCLEVENTID uEvent; 370 370 int rc = vboxSvcClipboardDataReadRequest(pCtx->pClient, &dataReq, &uEvent); 371 371 if (RT_SUCCESS(rc)) 372 372 { 373 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload;373 PSHCLEVENTPAYLOAD pPayload; 374 374 rc = SharedClipboardEventWait(&pCtx->pClient->Events, uEvent, 30 * 1000, &pPayload); 375 375 if (RT_SUCCESS(rc)) … … 390 390 391 391 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 392 int VBoxClipboardSvcImplURITransferCreate(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)392 int VBoxClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 393 393 { 394 394 RT_NOREF(pClient, pTransfer); … … 396 396 } 397 397 398 int VBoxClipboardSvcImplURITransferDestroy(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDURITRANSFER pTransfer)398 int VBoxClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer) 399 399 { 400 400 RT_NOREF(pClient, pTransfer); -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r80640 r80662 224 224 * Prototypes * 225 225 *********************************************************************************************************************************/ 226 static int vboxSvcClipboardClientStateInit(P VBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID);227 static int vboxSvcClipboardClientStateDestroy(P VBOXCLIPBOARDCLIENTSTATE pClientState);228 static void vboxSvcClipboardClientStateReset(P VBOXCLIPBOARDCLIENTSTATE pClientState);226 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID); 227 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState); 228 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState); 229 229 230 230 … … 241 241 242 242 /** Holds the service extension state. */ 243 VBOXCLIPBOARDEXTSTATE g_ExtState = { 0 };243 SHCLEXTSTATE g_ExtState = { 0 }; 244 244 245 245 /** Global map of all connected clients. */ … … 260 260 * @param puID Where to store the created event source ID on success. 261 261 */ 262 int vboxSvcClipboardEventSourceCreateID(P VBOXCLIPBOARDEVENTSOURCEID puID)262 int vboxSvcClipboardEventSourceCreateID(PSHCLEVENTSOURCEID puID) 263 263 { 264 264 AssertPtrReturn(puID, VERR_INVALID_POINTER); … … 266 266 for (uint32_t i = 0; i < 32; i++) /* Don't try too hard. */ 267 267 { 268 VBOXCLIPBOARDEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES;268 SHCLEVENTSOURCEID uID = RTRandU32() % VBOX_SHARED_CLIPBOARD_MAX_EVENT_SOURCES; 269 269 if (g_mapEventSources.find(uID) == g_mapEventSources.end()) 270 270 { … … 343 343 * @param pClient Pointer to the client data structure to reset message queue for. 344 344 */ 345 void vboxSvcClipboardMsgQueueReset(P VBOXCLIPBOARDCLIENT pClient)345 void vboxSvcClipboardMsgQueueReset(PSHCLCLIENT pClient) 346 346 { 347 347 LogFlowFuncEnter(); … … 361 361 * @param cParms Number of HGCM parameters to allocate. 362 362 */ 363 P VBOXCLIPBOARDCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms)364 { 365 P VBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));363 PSHCLCLIENTMSG vboxSvcClipboardMsgAlloc(uint32_t uMsg, uint32_t cParms) 364 { 365 PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG)); 366 366 if (pMsg) 367 367 { … … 386 386 * The pointer will be invalid after calling this function. 387 387 */ 388 void vboxSvcClipboardMsgFree(P VBOXCLIPBOARDCLIENTMSG pMsg)388 void vboxSvcClipboardMsgFree(PSHCLCLIENTMSG pMsg) 389 389 { 390 390 if (!pMsg) … … 407 407 * @remarks ASSUMES the parameters has been cleared by clientMsgPeek. 408 408 */ 409 void vboxSvcClipboardMsgSetPeekReturn(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)409 void vboxSvcClipboardMsgSetPeekReturn(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(P VBOXCLIPBOARDCLIENTMSG pMsg, PVBOXHGCMSVCPARM paDstParms, uint32_t cDstParms)439 int vboxSvcClipboardMsgSetGetHostMsgOldReturn(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(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTMSG pMsg, bool fAppend)496 int vboxSvcClipboardMsgAdd(PSHCLCLIENT pClient, PSHCLCLIENTMSG pMsg, bool fAppend) 497 497 { 498 498 AssertPtrReturn(pMsg, VERR_INVALID_POINTER); … … 527 527 * immediately. 528 528 */ 529 int vboxSvcClipboardMsgPeek(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[],529 int vboxSvcClipboardMsgPeek(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[], 530 530 bool fWait) 531 531 { … … 571 571 if (!pClient->queueMsg.isEmpty()) 572 572 { 573 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();573 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 574 574 if (pFirstMsg) 575 575 { … … 616 616 * @param paParms Array of parameters. 617 617 */ 618 int vboxSvcClipboardMsgGetOld(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])618 int vboxSvcClipboardMsgGetOld(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 619 619 { 620 620 int rc; … … 633 633 if (!pClient->queueMsg.isEmpty()) 634 634 { 635 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();635 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 636 636 AssertPtr(pFirstMsg); 637 637 … … 692 692 * @param paParms Array of parameters. 693 693 */ 694 int vboxSvcClipboardMsgGet(P VBOXCLIPBOARDCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[])694 int vboxSvcClipboardMsgGet(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 695 695 { 696 696 /* … … 706 706 if (!pClient->queueMsg.isEmpty()) 707 707 { 708 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();708 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 709 709 if (pFirstMsg) 710 710 { … … 807 807 * @param pClient Client to wake up. 808 808 */ 809 int vboxSvcClipboardClientWakeup(P VBOXCLIPBOARDCLIENT pClient)809 int vboxSvcClipboardClientWakeup(PSHCLCLIENT pClient) 810 810 { 811 811 int rc = VINF_NO_CHANGE; … … 819 819 if (!pClient->queueMsg.isEmpty()) 820 820 { 821 P VBOXCLIPBOARDCLIENTMSG pFirstMsg = pClient->queueMsg.first();821 PSHCLCLIENTMSG pFirstMsg = pClient->queueMsg.first(); 822 822 if (pFirstMsg) 823 823 { … … 879 879 * @param puEvent Event ID for waiting for new data. Optional. 880 880 */ 881 int vboxSvcClipboardDataReadRequest(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDDATAREQ pDataReq,882 P VBOXCLIPBOARDEVENTID puEvent)881 int vboxSvcClipboardDataReadRequest(PSHCLCLIENT pClient, PSHCLDATAREQ pDataReq, 882 PSHCLEVENTID puEvent) 883 883 { 884 884 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 888 888 int rc; 889 889 890 P VBOXCLIPBOARDCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,890 PSHCLCLIENTMSG pMsgReadData = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, 891 891 VBOX_SHARED_CLIPBOARD_CPARMS_READ_DATA); 892 892 if (pMsgReadData) 893 893 { 894 const VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);894 const SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 895 895 896 896 HGCMSvcSetU32(&pMsgReadData->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent)); … … 922 922 } 923 923 924 int vboxSvcClipboardDataReadSignal(P VBOXCLIPBOARDCLIENT pClient, PVBOXCLIPBOARDCLIENTCMDCTX pCmdCtx,925 PSH AREDCLIPBOARDDATABLOCK pData)926 { 927 VBOXCLIPBOARDEVENTID uEvent;924 int vboxSvcClipboardDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, 925 PSHCLDATABLOCK pData) 926 { 927 SHCLEVENTID uEvent; 928 928 if (pClient->State.uProtocolVer == 0) 929 929 { … … 937 937 int rc = VINF_SUCCESS; 938 938 939 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload = NULL;939 PSHCLEVENTPAYLOAD pPayload = NULL; 940 940 if (pData->cbData) 941 941 rc = SharedClipboardPayloadAlloc(uEvent, pData->pvData, pData->cbData, &pPayload); … … 952 952 } 953 953 954 int vboxSvcClipboardFormatsReport(P VBOXCLIPBOARDCLIENT pClient, PSHAREDCLIPBOARDFORMATDATA pFormats)954 int vboxSvcClipboardFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats) 955 955 { 956 956 AssertPtrReturn(pClient, VERR_INVALID_POINTER); … … 959 959 int rc; 960 960 961 P VBOXCLIPBOARDCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3);961 PSHCLCLIENTMSG pMsg = vboxSvcClipboardMsgAlloc(VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS_REPORT, 3); 962 962 if (pMsg) 963 963 { 964 VBOXCLIPBOARDEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events);964 SHCLEVENTID uEvent = SharedClipboardEventIDGenerate(&pClient->Events); 965 965 966 966 HGCMSvcSetU32(&pMsg->m_paParms[0], VBOX_SHARED_CLIPBOARD_CONTEXTID_MAKE(pClient->Events.uID, uEvent)); … … 979 979 } 980 980 981 int vboxSvcClipboardGetDataWrite(P VBOXCLIPBOARDCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])981 int vboxSvcClipboardGetDataWrite(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 982 982 { 983 983 LogFlowFuncEnter(); … … 991 991 int rc; 992 992 993 SH AREDCLIPBOARDDATABLOCK dataBlock;993 SHCLDATABLOCK dataBlock; 994 994 RT_ZERO(dataBlock); 995 995 996 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;996 SHCLCLIENTCMDCTX cmdCtx; 997 997 RT_ZERO(cmdCtx); 998 998 … … 1044 1044 if (g_ExtState.pfnExtension) 1045 1045 { 1046 VBOXCLIPBOARDEXTPARMS parms;1046 SHCLEXTPARMS parms; 1047 1047 RT_ZERO(parms); 1048 1048 … … 1061 1061 } 1062 1062 1063 int vboxSvcClipboardSetSource(P VBOXCLIPBOARDCLIENT pClient, SHAREDCLIPBOARDSOURCE enmSource)1063 int vboxSvcClipboardSetSource(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(P VBOXCLIPBOARDCLIENT pClient,1085 SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,1086 PSH AREDCLIPBOARDURITRANSFER *ppTransfer)1084 int vboxSvcClipboardURITransferStart(PSHCLCLIENT pClient, 1085 SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1086 PSHCLURITRANSFER *ppTransfer) 1087 1087 { 1088 1088 LogFlowFuncEnter(); … … 1094 1094 if (!SharedClipboardURICtxTransfersMaximumReached(&pClient->URI)) 1095 1095 { 1096 PSH AREDCLIPBOARDURITRANSFER pTransfer;1096 PSHCLURITRANSFER pTransfer; 1097 1097 rc = SharedClipboardURITransferCreate(enmDir, enmSource, &pTransfer); 1098 1098 if (RT_SUCCESS(rc)) 1099 1099 { 1100 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1100 SHCLPROVIDERCREATIONCTX creationCtx; 1101 1101 RT_ZERO(creationCtx); 1102 1102 1103 if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_READ)1103 if (enmDir == SHCLURITRANSFERDIR_READ) 1104 1104 { 1105 1105 rc = vboxSvcClipboardURIAreaRegister(&pClient->State, pTransfer); … … 1123 1123 } 1124 1124 } 1125 else if (enmDir == SH AREDCLIPBOARDURITRANSFERDIR_WRITE)1125 else if (enmDir == SHCLURITRANSFERDIR_WRITE) 1126 1126 { 1127 1127 AssertFailed(); /** @todo Implement this. */ … … 1129 1129 1130 1130 /* Register needed callbacks so that we can wait for the meta data to arrive here. */ 1131 SH AREDCLIPBOARDURITRANSFERCALLBACKS Callbacks;1131 SHCLURITRANSFERCALLBACKS Callbacks; 1132 1132 RT_ZERO(Callbacks); 1133 1133 … … 1210 1210 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1211 1211 1212 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1212 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1213 1213 AssertPtr(pClient); 1214 1214 1215 1215 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1216 PSH AREDCLIPBOARDURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/);1216 PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/); 1217 1217 if (pTransfer) 1218 1218 vboxSvcClipboardURIAreaDetach(&pClient->State, pTransfer); … … 1243 1243 RT_NOREF(fRequestor, fRestoring); 1244 1244 1245 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1245 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1246 1246 AssertPtr(pvClient); 1247 1247 … … 1250 1250 1251 1251 /* Create the client's own event source. */ 1252 VBOXCLIPBOARDEVENTSOURCEID uEventSourceID;1252 SHCLEVENTSOURCEID uEventSourceID; 1253 1253 int rc = vboxSvcClipboardEventSourceCreateID(&uEventSourceID); 1254 1254 if (RT_SUCCESS(rc)) … … 1302 1302 int rc = VINF_SUCCESS; 1303 1303 1304 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1304 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1305 1305 AssertPtr(pClient); 1306 1306 … … 1437 1437 else 1438 1438 { 1439 rc = vboxSvcClipboardSetSource(pClient, SH AREDCLIPBOARDSOURCE_REMOTE);1439 rc = vboxSvcClipboardSetSource(pClient, SHCLSOURCE_REMOTE); 1440 1440 if (RT_SUCCESS(rc)) 1441 1441 { 1442 1442 if (g_ExtState.pfnExtension) 1443 1443 { 1444 VBOXCLIPBOARDEXTPARMS parms;1444 SHCLEXTPARMS parms; 1445 1445 RT_ZERO(parms); 1446 1446 … … 1450 1450 } 1451 1451 1452 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;1452 SHCLCLIENTCMDCTX cmdCtx; 1453 1453 RT_ZERO(cmdCtx); 1454 1454 1455 SH AREDCLIPBOARDFORMATDATA formatData;1455 SHCLFORMATDATA formatData; 1456 1456 RT_ZERO(formatData); 1457 1457 … … 1499 1499 SharedClipboardURICtxTransfersCleanup(&pClient->URI); 1500 1500 1501 PSH AREDCLIPBOARDURITRANSFER pTransfer;1502 rc = SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR_WRITE,1501 PSHCLURITRANSFER pTransfer; 1502 rc = SharedClipboardURITransferCreate(SHCLURITRANSFERDIR_WRITE, 1503 1503 pClient->State.enmSource, 1504 1504 &pTransfer); … … 1509 1509 if (RT_SUCCESS(rc)) 1510 1510 { 1511 SH AREDCLIPBOARDPROVIDERCREATIONCTX creationCtx;1511 SHCLPROVIDERCREATIONCTX creationCtx; 1512 1512 RT_ZERO(creationCtx); 1513 1513 … … 1557 1557 if (g_ExtState.pfnExtension) 1558 1558 { 1559 VBOXCLIPBOARDEXTPARMS parms;1559 SHCLEXTPARMS parms; 1560 1560 RT_ZERO(parms); 1561 1561 … … 1577 1577 if (g_ExtState.fDelayedAnnouncement) 1578 1578 { 1579 SH AREDCLIPBOARDFORMATDATA formatData;1579 SHCLFORMATDATA formatData; 1580 1580 RT_ZERO(formatData); 1581 1581 … … 1600 1600 * so data which has been read above might get overridden by the host clipboard eventually. */ 1601 1601 1602 VBOXCLIPBOARDCLIENTCMDCTX cmdCtx;1602 SHCLCLIENTCMDCTX cmdCtx; 1603 1603 RT_ZERO(cmdCtx); 1604 1604 … … 1607 1607 if (RT_SUCCESS(rc)) 1608 1608 { 1609 SH AREDCLIPBOARDDATABLOCK dataBlock;1609 SHCLDATABLOCK dataBlock; 1610 1610 RT_ZERO(dataBlock); 1611 1611 … … 1660 1660 * @param uClientID Client ID (HGCM) to use for this client state. 1661 1661 */ 1662 static int vboxSvcClipboardClientStateInit(P VBOXCLIPBOARDCLIENTSTATE pClientState, uint32_t uClientID)1662 static int vboxSvcClipboardClientStateInit(PSHCLCLIENTSTATE pClientState, uint32_t uClientID) 1663 1663 { 1664 1664 LogFlowFuncEnter(); … … 1680 1680 * @param pClientState Client state to destroy. 1681 1681 */ 1682 static int vboxSvcClipboardClientStateDestroy(P VBOXCLIPBOARDCLIENTSTATE pClientState)1682 static int vboxSvcClipboardClientStateDestroy(PSHCLCLIENTSTATE pClientState) 1683 1683 { 1684 1684 RT_NOREF(pClientState); … … 1694 1694 * @param pClientState Client state to reset. 1695 1695 */ 1696 static void vboxSvcClipboardClientStateReset(P VBOXCLIPBOARDCLIENTSTATE pClientState)1696 static void vboxSvcClipboardClientStateReset(PSHCLCLIENTSTATE pClientState) 1697 1697 { 1698 1698 LogFlowFuncEnter(); 1699 1699 1700 1700 #ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST 1701 pClientState->URI.enmTransferDir = SH AREDCLIPBOARDURITRANSFERDIR_UNKNOWN;1701 pClientState->URI.enmTransferDir = SHCLURITRANSFERDIR_UNKNOWN; 1702 1702 #else 1703 1703 RT_NOREF(pClientState); … … 1774 1774 #ifndef UNIT_TEST 1775 1775 /** 1776 * SSM descriptor table for the VBOXCLIPBOARDCLIENTSTATE structure.1776 * SSM descriptor table for the SHCLCLIENTSTATE structure. 1777 1777 */ 1778 1778 static SSMFIELD const s_aShClSSMClientState[] = 1779 1779 { 1780 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, uProtocolVer),1781 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, cbChunkSize),1782 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTSTATE, enmSource),1780 SSMFIELD_ENTRY(SHCLCLIENTSTATE, uProtocolVer), 1781 SSMFIELD_ENTRY(SHCLCLIENTSTATE, cbChunkSize), 1782 SSMFIELD_ENTRY(SHCLCLIENTSTATE, enmSource), 1783 1783 SSMFIELD_ENTRY_TERM() 1784 1784 }; 1785 1785 1786 1786 /** 1787 * SSM descriptor table for the VBOXCLIPBOARDCLIENTURISTATE structure.1787 * SSM descriptor table for the SHCLCLIENTURISTATE structure. 1788 1788 */ 1789 1789 static SSMFIELD const s_aShClSSMClientURIState[] = 1790 1790 { 1791 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTURISTATE, enmTransferDir),1791 SSMFIELD_ENTRY(SHCLCLIENTURISTATE, enmTransferDir), 1792 1792 SSMFIELD_ENTRY_TERM() 1793 1793 }; 1794 1794 1795 1795 /** 1796 * SSM descriptor table for the header of the VBOXCLIPBOARDCLIENTMSG structure.1796 * SSM descriptor table for the header of the SHCLCLIENTMSG structure. 1797 1797 * The actual message parameters will be serialized separately. 1798 1798 */ 1799 1799 static SSMFIELD const s_aShClSSMClientMsgHdr[] = 1800 1800 { 1801 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTMSG, m_uMsg),1802 SSMFIELD_ENTRY( VBOXCLIPBOARDCLIENTMSG, m_cParms),1801 SSMFIELD_ENTRY(SHCLCLIENTMSG, m_uMsg), 1802 SSMFIELD_ENTRY(SHCLCLIENTMSG, m_cParms), 1803 1803 SSMFIELD_ENTRY_TERM() 1804 1804 }; … … 1827 1827 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1828 1828 1829 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1829 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1830 1830 AssertPtr(pClient); 1831 1831 … … 1845 1845 for (size_t i = 0; i < pClient->queueMsg.size(); i++) 1846 1846 { 1847 P VBOXCLIPBOARDCLIENTMSG pMsg = pClient->queueMsg.at(i);1847 PSHCLCLIENTMSG pMsg = pClient->queueMsg.at(i); 1848 1848 AssertPtr(pMsg); 1849 1849 1850 rc = SSMR3PutStructEx(pSSM, pMsg, sizeof( VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);1850 rc = SSMR3PutStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL); 1851 1851 AssertRCReturn(rc, rc); 1852 1852 … … 1909 1909 LogFunc(("u32ClientID=%RU32\n", u32ClientID)); 1910 1910 1911 P VBOXCLIPBOARDCLIENT pClient = (PVBOXCLIPBOARDCLIENT)pvClient;1911 PSHCLCLIENT pClient = (PSHCLCLIENT)pvClient; 1912 1912 AssertPtr(pClient); 1913 1913 … … 1935 1935 for (uint64_t i = 0; i < cMsg; i++) 1936 1936 { 1937 P VBOXCLIPBOARDCLIENTMSG pMsg = (PVBOXCLIPBOARDCLIENTMSG)RTMemAlloc(sizeof(VBOXCLIPBOARDCLIENTMSG));1937 PSHCLCLIENTMSG pMsg = (PSHCLCLIENTMSG)RTMemAlloc(sizeof(SHCLCLIENTMSG)); 1938 1938 AssertPtrReturn(pMsg, VERR_NO_MEMORY); 1939 1939 1940 rc = SSMR3GetStructEx(pSSM, pMsg, sizeof( VBOXCLIPBOARDCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL);1940 rc = SSMR3GetStructEx(pSSM, pMsg, sizeof(SHCLCLIENTMSG), 0 /*fFlags*/, &s_aShClSSMClientMsgHdr[0], NULL); 1941 1941 AssertRCReturn(rc, rc); 1942 1942 … … 1984 1984 if (itClient != g_mapClients.end()) 1985 1985 { 1986 P VBOXCLIPBOARDCLIENT pClient = itClient->second;1986 PSHCLCLIENT pClient = itClient->second; 1987 1987 AssertPtr(pClient); 1988 1988 … … 2000 2000 else 2001 2001 { 2002 SH AREDCLIPBOARDFORMATDATA formatData;2002 SHCLFORMATDATA formatData; 2003 2003 RT_ZERO(formatData); 2004 2004 … … 2014 2014 case VBOX_CLIPBOARD_EXT_FN_DATA_READ: 2015 2015 { 2016 SH AREDCLIPBOARDDATAREQ dataReq;2016 SHCLDATAREQ dataReq; 2017 2017 RT_ZERO(dataReq); 2018 2018 … … 2040 2040 LogFlowFunc(("pfnExtension=%p\n", pfnExtension)); 2041 2041 2042 VBOXCLIPBOARDEXTPARMS parms;2042 SHCLEXTPARMS parms; 2043 2043 RT_ZERO(parms); 2044 2044 … … 2089 2089 g_pHelpers = pTable->pHelpers; 2090 2090 2091 pTable->cbClient = sizeof( VBOXCLIPBOARDCLIENT);2091 pTable->cbClient = sizeof(SHCLCLIENT); 2092 2092 2093 2093 pTable->pfnUnload = svcUnload; -
trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
r80626 r80662 26 26 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable); 27 27 28 static VBOXCLIPBOARDCLIENT g_Client;28 static SHCLCLIENT g_Client; 29 29 static VBOXHGCMSVCHELPERS g_Helpers = { NULL }; 30 30 … … 279 279 int VBoxClipboardSvcImplInit() { return VINF_SUCCESS; } 280 280 void VBoxClipboardSvcImplDestroy() { } 281 int VBoxClipboardSvcImplDisconnect(P VBOXCLIPBOARDCLIENT)281 int VBoxClipboardSvcImplDisconnect(PSHCLCLIENT) 282 282 { return VINF_SUCCESS; } 283 int VBoxClipboardSvcImplConnect(P VBOXCLIPBOARDCLIENT, bool)283 int VBoxClipboardSvcImplConnect(PSHCLCLIENT, bool) 284 284 { return VINF_SUCCESS; } 285 int VBoxClipboardSvcImplFormatAnnounce(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDFORMATDATA)285 int VBoxClipboardSvcImplFormatAnnounce(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLFORMATDATA) 286 286 { AssertFailed(); return VINF_SUCCESS; } 287 int VBoxClipboardSvcImplReadData(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK, unsigned int *)287 int VBoxClipboardSvcImplReadData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK, unsigned int *) 288 288 { AssertFailed(); return VERR_WRONG_ORDER; } 289 int VBoxClipboardSvcImplWriteData(P VBOXCLIPBOARDCLIENT, PVBOXCLIPBOARDCLIENTCMDCTX, PSHAREDCLIPBOARDDATABLOCK)289 int VBoxClipboardSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, PSHCLDATABLOCK) 290 290 { AssertFailed(); return VINF_SUCCESS; } 291 int VBoxClipboardSvcImplSync(P VBOXCLIPBOARDCLIENT)291 int VBoxClipboardSvcImplSync(PSHCLCLIENT) 292 292 { AssertFailed(); return VERR_WRONG_ORDER; } 293 293
Note:
See TracChangeset
for help on using the changeset viewer.