Changeset 80662 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Sep 9, 2019 8:43:14 AM (5 years ago)
- Location:
- trunk/src/VBox/GuestHost/SharedClipboard
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardArea.cpp
r79347 r80662 38 38 , m_fOpen(0) 39 39 , m_hDir(NIL_RTDIR) 40 , m_uID(NIL_SH AREDCLIPBOARDAREAID)40 , m_uID(NIL_SHCLAREAID) 41 41 { 42 42 int rc = initInternal(); … … 46 46 47 47 SharedClipboardArea::SharedClipboardArea(const char *pszPath, 48 SH AREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,49 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)48 SHCLAREAID uID /* = NIL_SHCLAREAID */, 49 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 50 50 : m_tsCreatedMs(0) 51 51 , m_cRefs(0) … … 115 115 } 116 116 117 int SharedClipboardArea::AddObject(const char *pszPath, const SH AREDCLIPBOARDAREAOBJ &Obj)117 int SharedClipboardArea::AddObject(const char *pszPath, const SHCLAREAOBJ &Obj) 118 118 { 119 119 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); … … 126 126 } 127 127 128 int SharedClipboardArea::GetObject(const char *pszPath, PSH AREDCLIPBOARDAREAOBJ pObj)128 int SharedClipboardArea::GetObject(const char *pszPath, PSHCLAREAOBJ pObj) 129 129 { 130 130 SharedClipboardAreaFsObjMap::const_iterator itObj = m_mapObj.find(pszPath); … … 166 166 if (RT_SUCCESS(rc)) 167 167 { 168 this->m_fOpen = SH AREDCLIPBOARDAREA_OPEN_FLAGS_NONE;169 this->m_uID = NIL_SH AREDCLIPBOARDAREAID;168 this->m_fOpen = SHCLAREA_OPEN_FLAGS_NONE; 169 this->m_uID = NIL_SHCLAREAID; 170 170 } 171 171 … … 185 185 */ 186 186 /* static */ 187 int SharedClipboardArea::PathConstruct(const char *pszBase, SH AREDCLIPBOARDAREAID uID, char *pszPath, size_t cbPath)187 int SharedClipboardArea::PathConstruct(const char *pszBase, SHCLAREAID uID, char *pszPath, size_t cbPath) 188 188 { 189 189 LogFlowFunc(("pszBase=%s, uAreaID=%RU32\n", pszBase, uID)); … … 224 224 } 225 225 226 SH AREDCLIPBOARDAREAID SharedClipboardArea::GetID(void) const226 SHCLAREAID SharedClipboardArea::GetID(void) const 227 227 { 228 228 return this->m_uID; … … 245 245 246 246 int SharedClipboardArea::OpenEx(const char *pszPath, 247 SH AREDCLIPBOARDAREAID uID /* = NIL_SHAREDCLIPBOARDAREAID */,248 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)247 SHCLAREAID uID /* = NIL_SHCLAREAID */, 248 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 249 249 { 250 250 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); 251 AssertReturn(!(fFlags & ~SH AREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);251 AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 252 252 253 253 char szAreaDir[RTPATH_MAX]; … … 256 256 { 257 257 if ( RTDirExists(szAreaDir) 258 && (fFlags & SH AREDCLIPBOARDAREA_OPEN_FLAGS_MUST_NOT_EXIST))258 && (fFlags & SHCLAREA_OPEN_FLAGS_MUST_NOT_EXIST)) 259 259 { 260 260 rc = VERR_ALREADY_EXISTS; … … 282 282 } 283 283 284 int SharedClipboardArea::OpenTemp(SH AREDCLIPBOARDAREAID uID,285 SH AREDCLIPBOARDAREAOPENFLAGS fFlags /* = SHAREDCLIPBOARDAREA_OPEN_FLAGS_NONE */)286 { 287 AssertReturn(!(fFlags & ~SH AREDCLIPBOARDAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);284 int SharedClipboardArea::OpenTemp(SHCLAREAID uID, 285 SHCLAREAOPENFLAGS fFlags /* = SHCLAREA_OPEN_FLAGS_NONE */) 286 { 287 AssertReturn(!(fFlags & ~SHCLAREA_OPEN_FLAGS_VALID_MASK), VERR_INVALID_FLAGS); 288 288 289 289 /* -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardDataObjectImpl-win.cpp
r80359 r80662 41 41 //#define VBOX_CLIPBOARD_WITH_UNICODE_SUPPORT 0 42 42 43 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSH AREDCLIPBOARDURITRANSFER pTransfer,43 VBoxClipboardWinDataObject::VBoxClipboardWinDataObject(PSHCLURITRANSFER pTransfer, 44 44 LPFORMATETC pFormatEtc, LPSTGMEDIUM pStgMed, ULONG cFormats) 45 45 : m_enmStatus(Uninitialized) … … 229 229 * @param strDir Directory path to handle. 230 230 */ 231 int VBoxClipboardWinDataObject::readDir(PSH AREDCLIPBOARDURITRANSFER pTransfer, const Utf8Str &strDir)231 int VBoxClipboardWinDataObject::readDir(PSHCLURITRANSFER pTransfer, const Utf8Str &strDir) 232 232 { 233 233 LogFlowFunc(("strDir=%s\n", strDir.c_str())); 234 234 235 VBOXCLIPBOARDLISTOPENPARMS openParmsList;235 SHCLLISTOPENPARMS openParmsList; 236 236 int rc = SharedClipboardURIListOpenParmsInit(&openParmsList); 237 237 if (RT_SUCCESS(rc)) … … 240 240 if (RT_SUCCESS(rc)) 241 241 { 242 SH AREDCLIPBOARDLISTHANDLE hList;242 SHCLLISTHANDLE hList; 243 243 rc = SharedClipboardURITransferListOpen(pTransfer, &openParmsList, &hList); 244 244 if (RT_SUCCESS(rc)) … … 246 246 LogFlowFunc(("strDir=%s -> hList=%RU64\n", strDir.c_str(), hList)); 247 247 248 VBOXCLIPBOARDLISTHDR hdrList;248 SHCLLISTHDR hdrList; 249 249 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList); 250 250 if (RT_SUCCESS(rc)) … … 255 255 for (uint64_t o = 0; o < hdrList.cTotalObjects; o++) 256 256 { 257 VBOXCLIPBOARDLISTENTRY entryList;257 SHCLLISTENTRY entryList; 258 258 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList); 259 259 if (RT_SUCCESS(rc)) 260 260 { 261 PSH AREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)entryList.pvInfo;262 Assert(entryList.cbInfo == sizeof(SH AREDCLIPBOARDFSOBJINFO));261 PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)entryList.pvInfo; 262 Assert(entryList.cbInfo == sizeof(SHCLFSOBJINFO)); 263 263 264 264 Utf8Str strPath = strDir + Utf8Str("\\") + Utf8Str(entryList.pszName); … … 320 320 VBoxClipboardWinDataObject *pThis = (VBoxClipboardWinDataObject *)pvUser; 321 321 322 PSH AREDCLIPBOARDURITRANSFER pTransfer = pThis->m_pTransfer;322 PSHCLURITRANSFER pTransfer = pThis->m_pTransfer; 323 323 AssertPtr(pTransfer); 324 324 … … 333 333 if (RT_SUCCESS(rc)) 334 334 { 335 P VBOXCLIPBOARDROOTLIST pRootList;335 PSHCLROOTLIST pRootList; 336 336 rc = SharedClipboardURILTransferRootsAsList(pTransfer, &pRootList); 337 337 if (RT_SUCCESS(rc)) … … 341 341 for (uint32_t i = 0; i < pRootList->Hdr.cRoots; i++) 342 342 { 343 P VBOXCLIPBOARDLISTENTRY pRootEntry = &pRootList->paEntries[i];343 PSHCLLISTENTRY pRootEntry = &pRootList->paEntries[i]; 344 344 AssertPtr(pRootEntry); 345 345 346 Assert(pRootEntry->cbInfo == sizeof(SH AREDCLIPBOARDFSOBJINFO));347 PSH AREDCLIPBOARDFSOBJINFO pFsObjInfo = (PSHAREDCLIPBOARDFSOBJINFO)pRootEntry->pvInfo;346 Assert(pRootEntry->cbInfo == sizeof(SHCLFSOBJINFO)); 347 PSHCLFSOBJINFO pFsObjInfo = (PSHCLFSOBJINFO)pRootEntry->pvInfo; 348 348 349 349 LogFlowFunc(("pszRoot=%s, fMode=0x%x\n", pRootEntry->pszName, pFsObjInfo->Attr.fMode)); … … 405 405 * @param phGlobal Where to store the allocated HGLOBAL object on success. 406 406 */ 407 int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSH AREDCLIPBOARDURITRANSFER pTransfer,407 int VBoxClipboardWinDataObject::createFileGroupDescriptorFromTransfer(PSHCLURITRANSFER pTransfer, 408 408 bool fUnicode, HGLOBAL *phGlobal) 409 409 { … … 478 478 pFD->dwFileAttributes = FILE_ATTRIBUTE_NORMAL; 479 479 480 const SH AREDCLIPBOARDFSOBJINFO *pObjInfo = &itRoot->objInfo;480 const SHCLFSOBJINFO *pObjInfo = &itRoot->objInfo; 481 481 482 482 if (RTFS_IS_DIRECTORY(pObjInfo->Attr.fMode)) … … 558 558 559 559 /* The caller can call GetData() several times, so make sure we don't do the same transfer multiple times. */ 560 if (SharedClipboardURITransferGetStatus(m_pTransfer) == SH AREDCLIPBOARDURITRANSFERSTATUS_NONE)560 if (SharedClipboardURITransferGetStatus(m_pTransfer) == SHCLURITRANSFERSTATUS_NONE) 561 561 { 562 562 rc = SharedClipboardURITransferPrepare(m_pTransfer); … … 615 615 /* Hand-in the provider so that our IStream implementation can continue working with it. */ 616 616 hr = VBoxClipboardWinStreamImpl::Create(this /* pParent */, m_pTransfer, 617 fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSH AREDCLIPBOARDFSOBJINFO */,617 fsObjEntry.strPath.c_str()/* File name */, &fsObjEntry.objInfo /* PSHCLFSOBJINFO */, 618 618 &m_pStream); 619 619 if (SUCCEEDED(hr)) -
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
r80359 r80662 46 46 47 47 48 VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer,49 const Utf8Str &strPath, PSH AREDCLIPBOARDFSOBJINFO pObjInfo)48 VBoxClipboardWinStreamImpl::VBoxClipboardWinStreamImpl(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, 49 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo) 50 50 : m_pParent(pParent) 51 51 , m_lRefCount(1) /* Our IDataObjct *always* holds the last reference to this object; needed for the callbacks. */ 52 52 , m_pURITransfer(pTransfer) 53 53 , m_strPath(strPath) 54 , m_hObj(SH AREDCLIPBOARDOBJHANDLE_INVALID)54 , m_hObj(SHCLOBJHANDLE_INVALID) 55 55 , m_objInfo(*pObjInfo) 56 56 , m_cbProcessed(0) … … 184 184 try 185 185 { 186 if ( m_hObj == SH AREDCLIPBOARDOBJHANDLE_INVALID186 if ( m_hObj == SHCLOBJHANDLE_INVALID 187 187 && m_pURITransfer->ProviderIface.pfnObjOpen) 188 188 { 189 VBOXCLIPBOARDOBJOPENCREATEPARMS openParms;189 SHCLOBJOPENCREATEPARMS openParms; 190 190 rc = SharedClipboardURIObjectOpenParmsInit(&openParms); 191 191 if (RT_SUCCESS(rc)) 192 192 { 193 openParms.fCreate = SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS194 | SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW195 | SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ196 | SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE;193 openParms.fCreate = SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS 194 | SHCL_OBJ_CF_ACT_FAIL_IF_NEW 195 | SHCL_OBJ_CF_ACCESS_READ 196 | SHCL_OBJ_CF_ACCESS_DENYWRITE; 197 197 198 198 rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str()); … … 362 362 */ 363 363 /* static */ 364 HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSH AREDCLIPBOARDURITRANSFER pTransfer,365 const Utf8Str &strPath, PSH AREDCLIPBOARDFSOBJINFO pObjInfo,364 HRESULT VBoxClipboardWinStreamImpl::Create(VBoxClipboardWinDataObject *pParent, PSHCLURITRANSFER pTransfer, 365 const Utf8Str &strPath, PSHCLFSOBJINFO pObjInfo, 366 366 IStream **ppStream) 367 367 { -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
r80623 r80662 42 42 */ 43 43 int SharedClipboardPayloadAlloc(uint32_t uID, const void *pvData, uint32_t cbData, 44 PSH AREDCLIPBOARDEVENTPAYLOAD *ppPayload)44 PSHCLEVENTPAYLOAD *ppPayload) 45 45 { 46 46 AssertPtrReturn(pvData, VERR_INVALID_POINTER); 47 47 AssertReturn (cbData, VERR_INVALID_PARAMETER); 48 48 49 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload =50 (PSH AREDCLIPBOARDEVENTPAYLOAD)RTMemAlloc(sizeof(SHAREDCLIPBOARDEVENTPAYLOAD));49 PSHCLEVENTPAYLOAD pPayload = 50 (PSHCLEVENTPAYLOAD)RTMemAlloc(sizeof(SHCLEVENTPAYLOAD)); 51 51 if (!pPayload) 52 52 return VERR_NO_MEMORY; … … 75 75 * @param pPayload Event payload to free. 76 76 */ 77 void SharedClipboardPayloadFree(PSH AREDCLIPBOARDEVENTPAYLOAD pPayload)77 void SharedClipboardPayloadFree(PSHCLEVENTPAYLOAD pPayload) 78 78 { 79 79 if (!pPayload) … … 100 100 * @param uID Event ID to use. 101 101 */ 102 int SharedClipboardEventCreate(PSH AREDCLIPBOARDEVENT pEvent, VBOXCLIPBOARDEVENTID uID)102 int SharedClipboardEventCreate(PSHCLEVENT pEvent, SHCLEVENTID uID) 103 103 { 104 104 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 121 121 * @param pEvent Event to destroy. 122 122 */ 123 void SharedClipboardEventDestroy(PSH AREDCLIPBOARDEVENT pEvent)123 void SharedClipboardEventDestroy(PSHCLEVENT pEvent) 124 124 { 125 125 if (!pEvent) … … 146 146 * @param uID ID to use for event source. 147 147 */ 148 int SharedClipboardEventSourceCreate(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTSOURCEID uID)148 int SharedClipboardEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID) 149 149 { 150 150 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 169 169 * @param pSource Event source to destroy. 170 170 */ 171 void SharedClipboardEventSourceDestroy(PSH AREDCLIPBOARDEVENTSOURCE pSource)171 void SharedClipboardEventSourceDestroy(PSHCLEVENTSOURCE pSource) 172 172 { 173 173 if (!pSource) … … 176 176 LogFlowFunc(("ID=%RU16\n", pSource->uID)); 177 177 178 PSH AREDCLIPBOARDEVENT pEvIt;179 PSH AREDCLIPBOARDEVENT pEvItNext;180 RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SH AREDCLIPBOARDEVENT, Node)178 PSHCLEVENT pEvIt; 179 PSHCLEVENT pEvItNext; 180 RTListForEachSafe(&pSource->lstEvents, pEvIt, pEvItNext, SHCLEVENT, Node) 181 181 { 182 182 SharedClipboardEventDestroy(pEvIt); … … 194 194 * @param pSource Event source to generate event for. 195 195 */ 196 VBOXCLIPBOARDEVENTID SharedClipboardEventIDGenerate(PSHAREDCLIPBOARDEVENTSOURCE pSource)196 SHCLEVENTID SharedClipboardEventIDGenerate(PSHCLEVENTSOURCE pSource) 197 197 { 198 198 AssertPtrReturn(pSource, 0); … … 209 209 * @param uID Event ID to get. 210 210 */ 211 inline PSH AREDCLIPBOARDEVENT sharedClipboardEventGet(PSHAREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)212 { 213 PSH AREDCLIPBOARDEVENT pEvIt;214 RTListForEach(&pSource->lstEvents, pEvIt, SH AREDCLIPBOARDEVENT, Node)211 inline PSHCLEVENT sharedClipboardEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 212 { 213 PSHCLEVENT pEvIt; 214 RTListForEach(&pSource->lstEvents, pEvIt, SHCLEVENT, Node) 215 215 { 216 216 if (pEvIt->uID == uID) … … 227 227 * @param pSource Event source to get last registered event from. 228 228 */ 229 VBOXCLIPBOARDEVENTID SharedClipboardEventGetLast(PSHAREDCLIPBOARDEVENTSOURCE pSource)229 SHCLEVENTID SharedClipboardEventGetLast(PSHCLEVENTSOURCE pSource) 230 230 { 231 231 AssertPtrReturn(pSource, 0); 232 PSH AREDCLIPBOARDEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHAREDCLIPBOARDEVENT, Node);232 PSHCLEVENT pEvent = RTListGetLast(&pSource->lstEvents, SHCLEVENT, Node); 233 233 if (pEvent) 234 234 return pEvent->uID; … … 244 244 * @param uID Event ID to register. 245 245 */ 246 int SharedClipboardEventRegister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)246 int SharedClipboardEventRegister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 247 247 { 248 248 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 254 254 if (sharedClipboardEventGet(pSource, uID) == NULL) 255 255 { 256 PSH AREDCLIPBOARDEVENT pEvent257 = (PSH AREDCLIPBOARDEVENT)RTMemAllocZ(sizeof(SHAREDCLIPBOARDEVENT));256 PSHCLEVENT pEvent 257 = (PSHCLEVENT)RTMemAllocZ(sizeof(SHCLEVENT)); 258 258 if (pEvent) 259 259 { … … 287 287 * @param uID Event ID to unregister. 288 288 */ 289 int SharedClipboardEventUnregister(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)289 int SharedClipboardEventUnregister(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 290 290 { 291 291 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 295 295 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 296 296 297 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);297 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 298 298 if (pEvent) 299 299 { … … 326 326 * SharedClipboardPayloadFree(). 327 327 */ 328 int SharedClipboardEventWait(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID, RTMSINTERVAL uTimeoutMs,329 PSH AREDCLIPBOARDEVENTPAYLOAD* ppPayload)328 int SharedClipboardEventWait(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, RTMSINTERVAL uTimeoutMs, 329 PSHCLEVENTPAYLOAD* ppPayload) 330 330 { 331 331 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 335 335 int rc; 336 336 337 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);337 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 338 338 if (pEvent) 339 339 { … … 361 361 * @param pPayload Event payload to associate. Takes ownership. Optional. 362 362 */ 363 int SharedClipboardEventSignal(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID,364 PSH AREDCLIPBOARDEVENTPAYLOAD pPayload)363 int SharedClipboardEventSignal(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID, 364 PSHCLEVENTPAYLOAD pPayload) 365 365 { 366 366 AssertPtrReturn(pSource, VERR_INVALID_POINTER); … … 370 370 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 371 371 372 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);372 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 373 373 if (pEvent) 374 374 { … … 393 393 * @param uID Event ID to detach payload for. 394 394 */ 395 void SharedClipboardEventPayloadDetach(PSH AREDCLIPBOARDEVENTSOURCE pSource, VBOXCLIPBOARDEVENTID uID)395 void SharedClipboardEventPayloadDetach(PSHCLEVENTSOURCE pSource, SHCLEVENTID uID) 396 396 { 397 397 AssertPtrReturnVoid(pSource); … … 399 399 LogFlowFunc(("uSource=%RU16, uEvent=%RU16\n", pSource->uID, uID)); 400 400 401 PSH AREDCLIPBOARDEVENT pEvent = sharedClipboardEventGet(pSource, uID);401 PSHCLEVENT pEvent = sharedClipboardEventGet(pSource, uID); 402 402 if (pEvent) 403 403 { … … 751 751 } 752 752 753 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, VBOXCLIPBOARDFORMAT u32Format)753 void VBoxClipboardDbgDumpData(const void *pv, size_t cb, SHCLFORMAT u32Format) 754 754 { 755 755 if (u32Format & VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-uri.cpp
r80444 r80662 30 30 31 31 32 static int sharedClipboardURITransferThreadCreate(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser);33 static int sharedClipboardURITransferThreadDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs);34 static PSH AREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx);32 static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser); 33 static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs); 34 static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx); 35 35 static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 36 SH AREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen);36 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen); 37 37 38 38 /** @todo Split this file up in different modules. */ … … 43 43 * @returns Allocated URI root list on success, or NULL on failure. 44 44 */ 45 P VBOXCLIPBOARDROOTLIST SharedClipboardURIRootListAlloc(void)46 { 47 P VBOXCLIPBOARDROOTLIST pRootList = (PVBOXCLIPBOARDROOTLIST)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLIST));45 PSHCLROOTLIST SharedClipboardURIRootListAlloc(void) 46 { 47 PSHCLROOTLIST pRootList = (PSHCLROOTLIST)RTMemAllocZ(sizeof(SHCLROOTLIST)); 48 48 49 49 return pRootList; … … 56 56 * invalid after returning from this function. 57 57 */ 58 void SharedClipboardURIRootListFree(P VBOXCLIPBOARDROOTLIST pRootList)58 void SharedClipboardURIRootListFree(PSHCLROOTLIST pRootList) 59 59 { 60 60 if (!pRootList) … … 74 74 * @param pRootLstHdr Root list header to initialize. 75 75 */ 76 int SharedClipboardURIRootListHdrInit(P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)76 int SharedClipboardURIRootListHdrInit(PSHCLROOTLISTHDR pRootLstHdr) 77 77 { 78 78 AssertPtrReturn(pRootLstHdr, VERR_INVALID_POINTER); 79 79 80 RT_BZERO(pRootLstHdr, sizeof( VBOXCLIPBOARDROOTLISTHDR));80 RT_BZERO(pRootLstHdr, sizeof(SHCLROOTLISTHDR)); 81 81 82 82 return VINF_SUCCESS; … … 88 88 * @param pRootLstHdr Root list header to destroy. 89 89 */ 90 void SharedClipboardURIRootListHdrDestroy(P VBOXCLIPBOARDROOTLISTHDR pRootLstHdr)90 void SharedClipboardURIRootListHdrDestroy(PSHCLROOTLISTHDR pRootLstHdr) 91 91 { 92 92 if (!pRootLstHdr) … … 103 103 * @param pRootLstHdr Root list header to duplicate. 104 104 */ 105 P VBOXCLIPBOARDROOTLISTHDR SharedClipboardURIRootListHdrDup(PVBOXCLIPBOARDROOTLISTHDR pRootLstHdr)105 PSHCLROOTLISTHDR SharedClipboardURIRootListHdrDup(PSHCLROOTLISTHDR pRootLstHdr) 106 106 { 107 107 AssertPtrReturn(pRootLstHdr, NULL); … … 109 109 int rc = VINF_SUCCESS; 110 110 111 P VBOXCLIPBOARDROOTLISTHDR pRootsDup = (PVBOXCLIPBOARDROOTLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDROOTLISTHDR));111 PSHCLROOTLISTHDR pRootsDup = (PSHCLROOTLISTHDR)RTMemAllocZ(sizeof(SHCLROOTLISTHDR)); 112 112 if (pRootsDup) 113 113 { … … 132 132 * @param pListEntry Clipboard root list entry to copy. 133 133 */ 134 int SharedClipboardURIRootListEntryCopy(P VBOXCLIPBOARDROOTLISTENTRY pDst, PVBOXCLIPBOARDROOTLISTENTRY pSrc)134 int SharedClipboardURIRootListEntryCopy(PSHCLROOTLISTENTRY pDst, PSHCLROOTLISTENTRY pSrc) 135 135 { 136 136 return SharedClipboardURIListEntryCopy(pDst, pSrc); … … 143 143 * @param pListEntry Clipboard root list entry to duplicate. 144 144 */ 145 P VBOXCLIPBOARDROOTLISTENTRY SharedClipboardURIRootListEntryDup(PVBOXCLIPBOARDROOTLISTENTRY pRootListEntry)145 PSHCLROOTLISTENTRY SharedClipboardURIRootListEntryDup(PSHCLROOTLISTENTRY pRootListEntry) 146 146 { 147 147 return SharedClipboardURIListEntryDup(pRootListEntry); … … 153 153 * @param pListEntry Clipboard root list entry structure to destroy. 154 154 */ 155 void SharedClipboardURIRootListEntryDestroy(P VBOXCLIPBOARDROOTLISTENTRY pRootListEntry)155 void SharedClipboardURIRootListEntryDestroy(PSHCLROOTLISTENTRY pRootListEntry) 156 156 { 157 157 return SharedClipboardURIListEntryDestroy(pRootListEntry); … … 163 163 * @param pInfo List handle info structure to destroy. 164 164 */ 165 void SharedClipboardURIListHandleInfoDestroy(PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo)165 void SharedClipboardURIListHandleInfoDestroy(PSHCLURILISTHANDLEINFO pInfo) 166 166 { 167 167 if (!pInfo) … … 181 181 * @param ppListHdr Where to store the allocated URI list header structure on success. 182 182 */ 183 int SharedClipboardURIListHdrAlloc(P VBOXCLIPBOARDLISTHDR *ppListHdr)183 int SharedClipboardURIListHdrAlloc(PSHCLLISTHDR *ppListHdr) 184 184 { 185 185 int rc; 186 186 187 P VBOXCLIPBOARDLISTHDR pListHdr = (PVBOXCLIPBOARDLISTHDR)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTHDR));187 PSHCLLISTHDR pListHdr = (PSHCLLISTHDR)RTMemAllocZ(sizeof(SHCLLISTHDR)); 188 188 if (pListHdr) 189 189 { … … 203 203 * @param pListEntry URI list header structure to free. 204 204 */ 205 void SharedClipboardURIListHdrFree(P VBOXCLIPBOARDLISTHDR pListHdr)205 void SharedClipboardURIListHdrFree(PSHCLLISTHDR pListHdr) 206 206 { 207 207 if (!pListHdr) … … 222 222 * @param pListHdr URI list header to duplicate. 223 223 */ 224 P VBOXCLIPBOARDLISTHDR SharedClipboardURIListHdrDup(PVBOXCLIPBOARDLISTHDR pListHdr)224 PSHCLLISTHDR SharedClipboardURIListHdrDup(PSHCLLISTHDR pListHdr) 225 225 { 226 226 AssertPtrReturn(pListHdr, NULL); 227 227 228 P VBOXCLIPBOARDLISTHDR pListHdrDup = (PVBOXCLIPBOARDLISTHDR)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTHDR));228 PSHCLLISTHDR pListHdrDup = (PSHCLLISTHDR)RTMemAlloc(sizeof(SHCLLISTHDR)); 229 229 if (pListHdrDup) 230 230 { … … 241 241 * @param pListHdr Data header struct to initialize. 242 242 */ 243 int SharedClipboardURIListHdrInit(P VBOXCLIPBOARDLISTHDR pListHdr)243 int SharedClipboardURIListHdrInit(PSHCLLISTHDR pListHdr) 244 244 { 245 245 AssertPtrReturn(pListHdr, VERR_INVALID_POINTER); … … 257 257 * @param pListHdr Data header struct to destroy. 258 258 */ 259 void SharedClipboardURIListHdrDestroy(P VBOXCLIPBOARDLISTHDR pListHdr)259 void SharedClipboardURIListHdrDestroy(PSHCLLISTHDR pListHdr) 260 260 { 261 261 if (!pListHdr) … … 266 266 267 267 /** 268 * Resets a VBOXCLIPBOARDListHdr structture.269 * 270 * @returns VBox status code. 271 * @param pListHdr VBOXCLIPBOARDListHdr structture to reset.272 */ 273 void SharedClipboardURIListHdrReset(P VBOXCLIPBOARDLISTHDR pListHdr)268 * Resets a SHCLListHdr structture. 269 * 270 * @returns VBox status code. 271 * @param pListHdr SHCLListHdr structture to reset. 272 */ 273 void SharedClipboardURIListHdrReset(PSHCLLISTHDR pListHdr) 274 274 { 275 275 AssertPtrReturnVoid(pListHdr); … … 277 277 LogFlowFuncEnter(); 278 278 279 RT_BZERO(pListHdr, sizeof( VBOXCLIPBOARDLISTHDR));279 RT_BZERO(pListHdr, sizeof(SHCLLISTHDR)); 280 280 } 281 281 … … 286 286 * @param pListHdr Clipboard data header to validate. 287 287 */ 288 bool SharedClipboardURIListHdrIsValid(P VBOXCLIPBOARDLISTHDR pListHdr)288 bool SharedClipboardURIListHdrIsValid(PSHCLLISTHDR pListHdr) 289 289 { 290 290 RT_NOREF(pListHdr); … … 292 292 } 293 293 294 int SharedClipboardURIListOpenParmsCopy(P VBOXCLIPBOARDLISTOPENPARMS pDst, PVBOXCLIPBOARDLISTOPENPARMS pSrc)294 int SharedClipboardURIListOpenParmsCopy(PSHCLLISTOPENPARMS pDst, PSHCLLISTOPENPARMS pSrc) 295 295 { 296 296 AssertPtrReturn(pDst, VERR_INVALID_POINTER); … … 330 330 * @param pParms URI list open parameters structure to duplicate. 331 331 */ 332 P VBOXCLIPBOARDLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PVBOXCLIPBOARDLISTOPENPARMS pParms)332 PSHCLLISTOPENPARMS SharedClipboardURIListOpenParmsDup(PSHCLLISTOPENPARMS pParms) 333 333 { 334 334 AssertPtrReturn(pParms, NULL); 335 335 336 P VBOXCLIPBOARDLISTOPENPARMS pParmsDup = (PVBOXCLIPBOARDLISTOPENPARMS)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTOPENPARMS));336 PSHCLLISTOPENPARMS pParmsDup = (PSHCLLISTOPENPARMS)RTMemAllocZ(sizeof(SHCLLISTOPENPARMS)); 337 337 if (!pParmsDup) 338 338 return NULL; … … 356 356 * @param pParms URI list open parameters structure to initialize. 357 357 */ 358 int SharedClipboardURIListOpenParmsInit(P VBOXCLIPBOARDLISTOPENPARMS pParms)358 int SharedClipboardURIListOpenParmsInit(PSHCLLISTOPENPARMS pParms) 359 359 { 360 360 AssertPtrReturn(pParms, VERR_INVALID_POINTER); 361 361 362 RT_BZERO(pParms, sizeof( VBOXCLIPBOARDLISTOPENPARMS));362 RT_BZERO(pParms, sizeof(SHCLLISTOPENPARMS)); 363 363 364 364 pParms->cbFilter = 64; /** @todo Make this dynamic. */ … … 377 377 * @param pParms URI list open parameters structure to destroy. 378 378 */ 379 void SharedClipboardURIListOpenParmsDestroy(P VBOXCLIPBOARDLISTOPENPARMS pParms)379 void SharedClipboardURIListOpenParmsDestroy(PSHCLLISTOPENPARMS pParms) 380 380 { 381 381 if (!pParms) … … 400 400 * @param ppDirData Where to return the created clipboard list entry structure on success. 401 401 */ 402 int SharedClipboardURIListEntryAlloc(P VBOXCLIPBOARDLISTENTRY *ppListEntry)403 { 404 P VBOXCLIPBOARDLISTENTRY pListEntry = (PVBOXCLIPBOARDLISTENTRY)RTMemAlloc(sizeof(VBOXCLIPBOARDLISTENTRY));402 int SharedClipboardURIListEntryAlloc(PSHCLLISTENTRY *ppListEntry) 403 { 404 PSHCLLISTENTRY pListEntry = (PSHCLLISTENTRY)RTMemAlloc(sizeof(SHCLLISTENTRY)); 405 405 if (!pListEntry) 406 406 return VERR_NO_MEMORY; … … 418 418 * @param pListEntry Clipboard list entry structure to free. 419 419 */ 420 void SharedClipboardURIListEntryFree(P VBOXCLIPBOARDLISTENTRY pListEntry)420 void SharedClipboardURIListEntryFree(PSHCLLISTENTRY pListEntry) 421 421 { 422 422 if (!pListEntry) … … 433 433 * @param pListEntry Clipboard list entry to copy. 434 434 */ 435 int SharedClipboardURIListEntryCopy(P VBOXCLIPBOARDLISTENTRY pDst, PVBOXCLIPBOARDLISTENTRY pSrc)435 int SharedClipboardURIListEntryCopy(PSHCLLISTENTRY pDst, PSHCLLISTENTRY pSrc) 436 436 { 437 437 AssertPtrReturn(pDst, VERR_INVALID_POINTER); … … 480 480 * @param pListEntry Clipboard list entry to duplicate. 481 481 */ 482 P VBOXCLIPBOARDLISTENTRY SharedClipboardURIListEntryDup(PVBOXCLIPBOARDLISTENTRY pListEntry)482 PSHCLLISTENTRY SharedClipboardURIListEntryDup(PSHCLLISTENTRY pListEntry) 483 483 { 484 484 AssertPtrReturn(pListEntry, NULL); … … 486 486 int rc = VINF_SUCCESS; 487 487 488 P VBOXCLIPBOARDLISTENTRY pListEntryDup = (PVBOXCLIPBOARDLISTENTRY)RTMemAllocZ(sizeof(VBOXCLIPBOARDLISTENTRY));488 PSHCLLISTENTRY pListEntryDup = (PSHCLLISTENTRY)RTMemAllocZ(sizeof(SHCLLISTENTRY)); 489 489 if (pListEntryDup) 490 490 rc = SharedClipboardURIListEntryCopy(pListEntryDup, pListEntry); … … 507 507 * @param pListEntry Clipboard list entry structure to initialize. 508 508 */ 509 int SharedClipboardURIListEntryInit(P VBOXCLIPBOARDLISTENTRY pListEntry)510 { 511 RT_BZERO(pListEntry, sizeof( VBOXCLIPBOARDLISTENTRY));512 513 pListEntry->pszName = RTStrAlloc( VBOXCLIPBOARDLISTENTRY_MAX_NAME);509 int SharedClipboardURIListEntryInit(PSHCLLISTENTRY pListEntry) 510 { 511 RT_BZERO(pListEntry, sizeof(SHCLLISTENTRY)); 512 513 pListEntry->pszName = RTStrAlloc(SHCLLISTENTRY_MAX_NAME); 514 514 if (!pListEntry->pszName) 515 515 return VERR_NO_MEMORY; 516 516 517 pListEntry->cbName = VBOXCLIPBOARDLISTENTRY_MAX_NAME;517 pListEntry->cbName = SHCLLISTENTRY_MAX_NAME; 518 518 pListEntry->pvInfo = NULL; 519 519 pListEntry->cbInfo = 0; … … 528 528 * @param pListEntry Clipboard list entry structure to destroy. 529 529 */ 530 void SharedClipboardURIListEntryDestroy(P VBOXCLIPBOARDLISTENTRY pListEntry)530 void SharedClipboardURIListEntryDestroy(PSHCLLISTENTRY pListEntry) 531 531 { 532 532 if (!pListEntry) … … 555 555 * @param pListEntry Clipboard data chunk to validate. 556 556 */ 557 bool SharedClipboardURIListEntryIsValid(P VBOXCLIPBOARDLISTENTRY pListEntry)557 bool SharedClipboardURIListEntryIsValid(PSHCLLISTENTRY pListEntry) 558 558 { 559 559 RT_NOREF(pListEntry); … … 570 570 * @param pObjCtx URI object context to initialize. 571 571 */ 572 int SharedClipboardURIObjCtxInit(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)572 int SharedClipboardURIObjCtxInit(PSHCLCLIENTURIOBJCTX pObjCtx) 573 573 { 574 574 AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER); … … 576 576 LogFlowFuncEnter(); 577 577 578 pObjCtx->uHandle = SH AREDCLIPBOARDOBJHANDLE_INVALID;578 pObjCtx->uHandle = SHCLOBJHANDLE_INVALID; 579 579 580 580 return VINF_SUCCESS; … … 586 586 * @param pObjCtx URI object context to destroy. 587 587 */ 588 void SharedClipboardURIObjCtxDestroy(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)588 void SharedClipboardURIObjCtxDestroy(PSHCLCLIENTURIOBJCTX pObjCtx) 589 589 { 590 590 AssertPtrReturnVoid(pObjCtx); … … 599 599 * @param pObjCtx URI object context to check. 600 600 */ 601 bool SharedClipboardURIObjCtxIsValid(PSH AREDCLIPBOARDCLIENTURIOBJCTX pObjCtx)601 bool SharedClipboardURIObjCtxIsValid(PSHCLCLIENTURIOBJCTX pObjCtx) 602 602 { 603 603 return ( pObjCtx 604 && pObjCtx->uHandle != SH AREDCLIPBOARDOBJHANDLE_INVALID);604 && pObjCtx->uHandle != SHCLOBJHANDLE_INVALID); 605 605 } 606 606 … … 610 610 * @param pInfo Object handle info structure to destroy. 611 611 */ 612 void SharedClipboardURIObjectHandleInfoDestroy(PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo)612 void SharedClipboardURIObjectHandleInfoDestroy(PSHCLURIOBJHANDLEINFO pInfo) 613 613 { 614 614 if (!pInfo) … … 628 628 * @param pParms URI object open parameters structure to initialize. 629 629 */ 630 int SharedClipboardURIObjectOpenParmsInit(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms)630 int SharedClipboardURIObjectOpenParmsInit(PSHCLOBJOPENCREATEPARMS pParms) 631 631 { 632 632 AssertPtrReturn(pParms, VERR_INVALID_POINTER); … … 634 634 int rc; 635 635 636 RT_BZERO(pParms, sizeof( VBOXCLIPBOARDOBJOPENCREATEPARMS));636 RT_BZERO(pParms, sizeof(SHCLOBJOPENCREATEPARMS)); 637 637 638 638 pParms->cbPath = RTPATH_MAX; /** @todo Make this dynamic. */ … … 656 656 * @param pParmsSrc Which source URI object open parameters to copy. 657 657 */ 658 int SharedClipboardURIObjectOpenParmsCopy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParmsDst, PVBOXCLIPBOARDOBJOPENCREATEPARMS pParmsSrc)658 int SharedClipboardURIObjectOpenParmsCopy(PSHCLOBJOPENCREATEPARMS pParmsDst, PSHCLOBJOPENCREATEPARMS pParmsSrc) 659 659 { 660 660 int rc; … … 685 685 * @param pParms URI object open parameters structure to destroy. 686 686 */ 687 void SharedClipboardURIObjectOpenParmsDestroy(P VBOXCLIPBOARDOBJOPENCREATEPARMS pParms)687 void SharedClipboardURIObjectOpenParmsDestroy(PSHCLOBJOPENCREATEPARMS pParms) 688 688 { 689 689 if (!pParms) … … 704 704 * @param hObj Object handle of the object to get handle info for. 705 705 */ 706 inline PSH AREDCLIPBOARDURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,707 SH AREDCLIPBOARDOBJHANDLE hObj)708 { 709 PSH AREDCLIPBOARDURIOBJHANDLEINFO pIt;710 RTListForEach(&pTransfer->lstObj, pIt, SH AREDCLIPBOARDURIOBJHANDLEINFO, Node)706 inline PSHCLURIOBJHANDLEINFO sharedClipboardURIObjectGet(PSHCLURITRANSFER pTransfer, 707 SHCLOBJHANDLE hObj) 708 { 709 PSHCLURIOBJHANDLEINFO pIt; 710 RTListForEach(&pTransfer->lstObj, pIt, SHCLURIOBJHANDLEINFO, Node) 711 711 { 712 712 if (pIt->hObj == hObj) … … 725 725 * @param phObj Where to store the handle of URI object opened on success. 726 726 */ 727 int SharedClipboardURIObjectOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDOBJOPENCREATEPARMS pOpenCreateParms,728 PSH AREDCLIPBOARDOBJHANDLE phObj)727 int SharedClipboardURIObjectOpen(PSHCLURITRANSFER pTransfer, PSHCLOBJOPENCREATEPARMS pOpenCreateParms, 728 PSHCLOBJHANDLE phObj) 729 729 { 730 730 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 736 736 LogFlowFunc(("pszPath=%s, fCreate=0x%x\n", pOpenCreateParms->pszPath, pOpenCreateParms->fCreate)); 737 737 738 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)739 { 740 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo741 = (PSH AREDCLIPBOARDURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURIOBJHANDLEINFO));738 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 739 { 740 PSHCLURIOBJHANDLEINFO pInfo 741 = (PSHCLURIOBJHANDLEINFO)RTMemAlloc(sizeof(SHCLURIOBJHANDLEINFO)); 742 742 if (pInfo) 743 743 { … … 747 747 rc = sharedClipboardConvertFileCreateFlags(fWritable, 748 748 pOpenCreateParms->fCreate, pOpenCreateParms->ObjInfo.Attr.fMode, 749 SH AREDCLIPBOARDOBJHANDLE_INVALID, &fOpen);749 SHCLOBJHANDLE_INVALID, &fOpen); 750 750 if (RT_SUCCESS(rc)) 751 751 { … … 765 765 { 766 766 pInfo->hObj = pTransfer->uObjHandleNext++; 767 pInfo->enmType = SH AREDCLIPBOARDURIOBJTYPE_FILE;767 pInfo->enmType = SHCLURIOBJTYPE_FILE; 768 768 769 769 RTListAppend(&pTransfer->lstObj, &pInfo->Node); … … 778 778 rc = VERR_NO_MEMORY; 779 779 } 780 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)780 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 781 781 { 782 782 if (pTransfer->ProviderIface.pfnObjOpen) … … 799 799 * @param hObj Handle of URI object to close. 800 800 */ 801 int SharedClipboardURIObjectClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDOBJHANDLE hObj)801 int SharedClipboardURIObjectClose(PSHCLURITRANSFER pTransfer, SHCLOBJHANDLE hObj) 802 802 { 803 803 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 805 805 int rc = VINF_SUCCESS; 806 806 807 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)808 { 809 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);807 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 808 { 809 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 810 810 if (pInfo) 811 811 { 812 812 switch (pInfo->enmType) 813 813 { 814 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:814 case SHCLURIOBJTYPE_DIRECTORY: 815 815 { 816 816 rc = RTDirClose(pInfo->u.Local.hDir); … … 820 820 } 821 821 822 case SH AREDCLIPBOARDURIOBJTYPE_FILE:822 case SHCLURIOBJTYPE_FILE: 823 823 { 824 824 rc = RTFileClose(pInfo->u.Local.hFile); … … 840 840 rc = VERR_NOT_FOUND; 841 841 } 842 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)842 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 843 843 { 844 844 if (pTransfer->ProviderIface.pfnObjClose) … … 864 864 * @param pcbRead How much bytes were read on success. Optional. 865 865 */ 866 int SharedClipboardURIObjectRead(PSH AREDCLIPBOARDURITRANSFER pTransfer,867 SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags)866 int SharedClipboardURIObjectRead(PSHCLURITRANSFER pTransfer, 867 SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead, uint32_t fFlags) 868 868 { 869 869 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 875 875 int rc = VINF_SUCCESS; 876 876 877 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)878 { 879 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);877 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 878 { 879 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 880 880 if (pInfo) 881 881 { 882 882 switch (pInfo->enmType) 883 883 { 884 case SH AREDCLIPBOARDURIOBJTYPE_FILE:884 case SHCLURIOBJTYPE_FILE: 885 885 { 886 886 size_t cbRead; … … 902 902 rc = VERR_NOT_FOUND; 903 903 } 904 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)904 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 905 905 { 906 906 if (pTransfer->ProviderIface.pfnObjRead) … … 926 926 * @param pcbWritten How much bytes were writtenon success. Optional. 927 927 */ 928 int SharedClipboardURIObjectWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer,929 SH AREDCLIPBOARDOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten,928 int SharedClipboardURIObjectWrite(PSHCLURITRANSFER pTransfer, 929 SHCLOBJHANDLE hObj, void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten, 930 930 uint32_t fFlags) 931 931 { … … 937 937 int rc = VINF_SUCCESS; 938 938 939 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)940 { 941 PSH AREDCLIPBOARDURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj);939 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 940 { 941 PSHCLURIOBJHANDLEINFO pInfo = sharedClipboardURIObjectGet(pTransfer, hObj); 942 942 if (pInfo) 943 943 { 944 944 switch (pInfo->enmType) 945 945 { 946 case SH AREDCLIPBOARDURIOBJTYPE_FILE:946 case SHCLURIOBJTYPE_FILE: 947 947 { 948 948 rc = RTFileWrite(pInfo->u.Local.hFile, pvBuf, cbBuf, (size_t *)pcbWritten); … … 958 958 rc = VERR_NOT_FOUND; 959 959 } 960 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)960 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 961 961 { 962 962 if (pTransfer->ProviderIface.pfnObjWrite) … … 978 978 * @param pDataChunk URI object data chunk to duplicate. 979 979 */ 980 P VBOXCLIPBOARDOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PVBOXCLIPBOARDOBJDATACHUNK pDataChunk)980 PSHCLOBJDATACHUNK SharedClipboardURIObjectDataChunkDup(PSHCLOBJDATACHUNK pDataChunk) 981 981 { 982 982 if (!pDataChunk) 983 983 return NULL; 984 984 985 P VBOXCLIPBOARDOBJDATACHUNK pDataChunkDup = (PVBOXCLIPBOARDOBJDATACHUNK)RTMemAllocZ(sizeof(VBOXCLIPBOARDOBJDATACHUNK));985 PSHCLOBJDATACHUNK pDataChunkDup = (PSHCLOBJDATACHUNK)RTMemAllocZ(sizeof(SHCLOBJDATACHUNK)); 986 986 if (!pDataChunkDup) 987 987 return NULL; … … 1004 1004 * @param pDataChunk URI object data chunk to destroy. 1005 1005 */ 1006 void SharedClipboardURIObjectDataChunkDestroy(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1006 void SharedClipboardURIObjectDataChunkDestroy(PSHCLOBJDATACHUNK pDataChunk) 1007 1007 { 1008 1008 if (!pDataChunk) … … 1028 1028 * be invalid after calling this function. 1029 1029 */ 1030 void SharedClipboardURIObjectDataChunkFree(P VBOXCLIPBOARDOBJDATACHUNK pDataChunk)1030 void SharedClipboardURIObjectDataChunkFree(PSHCLOBJDATACHUNK pDataChunk) 1031 1031 { 1032 1032 if (!pDataChunk) … … 1048 1048 * Must be destroyed by SharedClipboardURITransferDestroy(). 1049 1049 */ 1050 int SharedClipboardURITransferCreate(SH AREDCLIPBOARDURITRANSFERDIR enmDir, SHAREDCLIPBOARDSOURCE enmSource,1051 PSH AREDCLIPBOARDURITRANSFER *ppTransfer)1050 int SharedClipboardURITransferCreate(SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource, 1051 PSHCLURITRANSFER *ppTransfer) 1052 1052 { 1053 1053 AssertPtrReturn(ppTransfer, VERR_INVALID_POINTER); … … 1055 1055 LogFlowFuncEnter(); 1056 1056 1057 PSH AREDCLIPBOARDURITRANSFER pTransfer = (PSHAREDCLIPBOARDURITRANSFER)RTMemAlloc(sizeof(SHAREDCLIPBOARDURITRANSFER));1057 PSHCLURITRANSFER pTransfer = (PSHCLURITRANSFER)RTMemAlloc(sizeof(SHCLURITRANSFER)); 1058 1058 if (!pTransfer) 1059 1059 return VERR_NO_MEMORY; … … 1062 1062 1063 1063 pTransfer->State.uID = 0; 1064 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_NONE;1064 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_NONE; 1065 1065 pTransfer->State.enmDir = enmDir; 1066 1066 pTransfer->State.enmSource = enmSource; … … 1115 1115 * @param pURI URI clipboard transfer to destroy. 1116 1116 */ 1117 int SharedClipboardURITransferDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer)1117 int SharedClipboardURITransferDestroy(PSHCLURITRANSFER pTransfer) 1118 1118 { 1119 1119 if (!pTransfer) … … 1130 1130 SharedClipboardEventSourceDestroy(&pTransfer->Events); 1131 1131 1132 PSH AREDCLIPBOARDURILISTHANDLEINFO pItList, pItListNext;1133 RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SH AREDCLIPBOARDURILISTHANDLEINFO, Node)1132 PSHCLURILISTHANDLEINFO pItList, pItListNext; 1133 RTListForEachSafe(&pTransfer->lstList, pItList, pItListNext, SHCLURILISTHANDLEINFO, Node) 1134 1134 { 1135 1135 SharedClipboardURIListHandleInfoDestroy(pItList); … … 1140 1140 } 1141 1141 1142 PSH AREDCLIPBOARDURIOBJHANDLEINFO pItObj, pItObjNext;1143 RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SH AREDCLIPBOARDURIOBJHANDLEINFO, Node)1142 PSHCLURIOBJHANDLEINFO pItObj, pItObjNext; 1143 RTListForEachSafe(&pTransfer->lstObj, pItObj, pItObjNext, SHCLURIOBJHANDLEINFO, Node) 1144 1144 { 1145 1145 SharedClipboardURIObjectHandleInfoDestroy(pItObj); … … 1154 1154 } 1155 1155 1156 int SharedClipboardURITransferOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer)1156 int SharedClipboardURITransferOpen(PSHCLURITRANSFER pTransfer) 1157 1157 { 1158 1158 int rc = VINF_SUCCESS; … … 1165 1165 } 1166 1166 1167 int SharedClipboardURITransferClose(PSH AREDCLIPBOARDURITRANSFER pTransfer)1167 int SharedClipboardURITransferClose(PSHCLURITRANSFER pTransfer) 1168 1168 { 1169 1169 int rc = VINF_SUCCESS; … … 1183 1183 * @param hList List handle of the list to get handle info for. 1184 1184 */ 1185 inline PSH AREDCLIPBOARDURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHAREDCLIPBOARDURITRANSFER pTransfer,1186 SH AREDCLIPBOARDLISTHANDLE hList)1187 { 1188 PSH AREDCLIPBOARDURILISTHANDLEINFO pIt;1189 RTListForEach(&pTransfer->lstList, pIt, SH AREDCLIPBOARDURILISTHANDLEINFO, Node)1185 inline PSHCLURILISTHANDLEINFO sharedClipboardURITransferListGet(PSHCLURITRANSFER pTransfer, 1186 SHCLLISTHANDLE hList) 1187 { 1188 PSHCLURILISTHANDLEINFO pIt; 1189 RTListForEach(&pTransfer->lstList, pIt, SHCLURILISTHANDLEINFO, Node) 1190 1190 { 1191 1191 if (pIt->hList == hList) … … 1199 1199 * Creates a new list handle (local only). 1200 1200 * 1201 * @returns New List handle on success, or SH AREDCLIPBOARDLISTHANDLE_INVALID on error.1201 * @returns New List handle on success, or SHCLLISTHANDLE_INVALID on error. 1202 1202 * @param pTransfer URI clipboard transfer to create new list handle for. 1203 1203 */ 1204 inline SH AREDCLIPBOARDLISTHANDLE sharedClipboardURITransferListHandleNew(PSHAREDCLIPBOARDURITRANSFER pTransfer)1204 inline SHCLLISTHANDLE sharedClipboardURITransferListHandleNew(PSHCLURITRANSFER pTransfer) 1205 1205 { 1206 1206 return pTransfer->uListHandleNext++; /** @todo Good enough for now. Improve this later. */ … … 1215 1215 * @param phList Where to store the List handle of opened list on success. 1216 1216 */ 1217 int SharedClipboardURITransferListOpen(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDLISTOPENPARMS pOpenParms,1218 PSH AREDCLIPBOARDLISTHANDLE phList)1217 int SharedClipboardURITransferListOpen(PSHCLURITRANSFER pTransfer, PSHCLLISTOPENPARMS pOpenParms, 1218 PSHCLLISTHANDLE phList) 1219 1219 { 1220 1220 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1224 1224 int rc; 1225 1225 1226 SH AREDCLIPBOARDLISTHANDLE hList = SHAREDCLIPBOARDLISTHANDLE_INVALID;1227 1228 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1229 { 1230 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo1231 = (PSH AREDCLIPBOARDURILISTHANDLEINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTHANDLEINFO));1226 SHCLLISTHANDLE hList = SHCLLISTHANDLE_INVALID; 1227 1228 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1229 { 1230 PSHCLURILISTHANDLEINFO pInfo 1231 = (PSHCLURILISTHANDLEINFO)RTMemAlloc(sizeof(SHCLURILISTHANDLEINFO)); 1232 1232 if (pInfo) 1233 1233 { … … 1240 1240 switch (pInfo->enmType) 1241 1241 { 1242 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1242 case SHCLURIOBJTYPE_DIRECTORY: 1243 1243 { 1244 1244 rc = RTDirOpen(&pInfo->u.Local.hDir, pOpenParms->pszPath); … … 1246 1246 } 1247 1247 1248 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1248 case SHCLURIOBJTYPE_FILE: 1249 1249 { 1250 1250 rc = RTFileOpen(&pInfo->u.Local.hFile, pOpenParms->pszPath, … … 1285 1285 rc = VERR_NO_MEMORY; 1286 1286 } 1287 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1287 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1288 1288 { 1289 1289 if (pTransfer->ProviderIface.pfnListOpen) … … 1311 1311 * @param hList Handle of list to close. 1312 1312 */ 1313 int SharedClipboardURITransferListClose(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)1313 int SharedClipboardURITransferListClose(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList) 1314 1314 { 1315 1315 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 1316 1316 1317 if (hList == SH AREDCLIPBOARDLISTHANDLE_INVALID)1317 if (hList == SHCLLISTHANDLE_INVALID) 1318 1318 return VINF_SUCCESS; 1319 1319 1320 1320 int rc = VINF_SUCCESS; 1321 1321 1322 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1323 { 1324 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1322 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1323 { 1324 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1325 1325 if (pInfo) 1326 1326 { 1327 1327 switch (pInfo->enmType) 1328 1328 { 1329 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1329 case SHCLURIOBJTYPE_DIRECTORY: 1330 1330 { 1331 1331 if (RTDirIsValid(pInfo->u.Local.hDir)) … … 1346 1346 rc = VERR_NOT_FOUND; 1347 1347 } 1348 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1348 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1349 1349 { 1350 1350 if (pTransfer->ProviderIface.pfnListClose) … … 1367 1367 * @param pszPath Path of file to add. 1368 1368 */ 1369 static int sharedClipboardURITransferListHdrAddFile(P VBOXCLIPBOARDLISTHDR pHdr, const char *pszPath)1369 static int sharedClipboardURITransferListHdrAddFile(PSHCLLISTHDR pHdr, const char *pszPath) 1370 1370 { 1371 1371 uint64_t cbSize = 0; … … 1391 1391 * @param cchDstBase Number of charaters of destination base path. 1392 1392 */ 1393 static int sharedClipboardURITransferListHdrFromDir(P VBOXCLIPBOARDLISTHDR pHdr,1393 static int sharedClipboardURITransferListHdrFromDir(PSHCLLISTHDR pHdr, 1394 1394 const char *pcszSrcPath, const char *pcszDstPath, 1395 1395 const char *pcszDstBase) … … 1543 1543 * @param pHdr Where to store the returned list header information. 1544 1544 */ 1545 int SharedClipboardURITransferListGetHeader(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1546 P VBOXCLIPBOARDLISTHDR pHdr)1545 int SharedClipboardURITransferListGetHeader(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1546 PSHCLLISTHDR pHdr) 1547 1547 { 1548 1548 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1553 1553 LogFlowFunc(("hList=%RU64\n", hList)); 1554 1554 1555 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1556 { 1557 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1555 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1556 { 1557 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1558 1558 if (pInfo) 1559 1559 { … … 1563 1563 switch (pInfo->enmType) 1564 1564 { 1565 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1565 case SHCLURIOBJTYPE_DIRECTORY: 1566 1566 { 1567 1567 char *pszPathRel = sharedClipboardPathTranslate(pInfo->pszPathLocalAbs); … … 1577 1577 } 1578 1578 1579 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1579 case SHCLURIOBJTYPE_FILE: 1580 1580 { 1581 1581 pHdr->cTotalObjects = 1; … … 1601 1601 rc = VERR_NOT_FOUND; 1602 1602 } 1603 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1603 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1604 1604 { 1605 1605 if (pTransfer->ProviderIface.pfnListHdrRead) … … 1627 1627 * @param uIdx Index of object to get. 1628 1628 */ 1629 PSH AREDCLIPBOARDURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHAREDCLIPBOARDURITRANSFER pTransfer,1630 SH AREDCLIPBOARDLISTHANDLE hList, uint64_t uIdx)1629 PSHCLURITRANSFEROBJ SharedClipboardURITransferListGetObj(PSHCLURITRANSFER pTransfer, 1630 SHCLLISTHANDLE hList, uint64_t uIdx) 1631 1631 { 1632 1632 AssertPtrReturn(pTransfer, NULL); … … 1647 1647 * @param pEntry Where to store the read information. 1648 1648 */ 1649 int SharedClipboardURITransferListRead(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1650 P VBOXCLIPBOARDLISTENTRY pEntry)1649 int SharedClipboardURITransferListRead(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1650 PSHCLLISTENTRY pEntry) 1651 1651 { 1652 1652 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1657 1657 LogFlowFunc(("hList=%RU64\n", hList)); 1658 1658 1659 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1660 { 1661 PSH AREDCLIPBOARDURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList);1659 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1660 { 1661 PSHCLURILISTHANDLEINFO pInfo = sharedClipboardURITransferListGet(pTransfer, hList); 1662 1662 if (pInfo) 1663 1663 { 1664 1664 switch (pInfo->enmType) 1665 1665 { 1666 case SH AREDCLIPBOARDURIOBJTYPE_DIRECTORY:1666 case SHCLURIOBJTYPE_DIRECTORY: 1667 1667 { 1668 1668 LogFlowFunc(("\tDirectory: %s\n", pInfo->pszPathLocalAbs)); … … 1711 1711 && !fSkipEntry) 1712 1712 { 1713 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));1713 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO)); 1714 1714 if (pEntry->pvInfo) 1715 1715 { … … 1717 1717 if (RT_SUCCESS(rc)) 1718 1718 { 1719 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info);1720 1721 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);1722 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;1719 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &pDirEntry->Info); 1720 1721 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 1722 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 1723 1723 } 1724 1724 } … … 1740 1740 } 1741 1741 1742 case SH AREDCLIPBOARDURIOBJTYPE_FILE:1742 case SHCLURIOBJTYPE_FILE: 1743 1743 { 1744 1744 LogFlowFunc(("\tSingle file: %s\n", pInfo->pszPathLocalAbs)); … … 1748 1748 if (RT_SUCCESS(rc)) 1749 1749 { 1750 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(sizeof(SHAREDCLIPBOARDFSOBJINFO));1750 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(sizeof(SHCLFSOBJINFO)); 1751 1751 if (pEntry->pvInfo) 1752 1752 { … … 1754 1754 if (RT_SUCCESS(rc)) 1755 1755 { 1756 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &objInfo);1757 1758 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);1759 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;1756 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &objInfo); 1757 1758 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 1759 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 1760 1760 } 1761 1761 } … … 1775 1775 rc = VERR_NOT_FOUND; 1776 1776 } 1777 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1777 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1778 1778 { 1779 1779 if (pTransfer->ProviderIface.pfnListEntryRead) … … 1787 1787 } 1788 1788 1789 int SharedClipboardURITransferListWrite(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList,1790 P VBOXCLIPBOARDLISTENTRY pEntry)1789 int SharedClipboardURITransferListWrite(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList, 1790 PSHCLLISTENTRY pEntry) 1791 1791 { 1792 1792 RT_NOREF(pTransfer, hList, pEntry); … … 1810 1810 * @param hList List handle to check. 1811 1811 */ 1812 bool SharedClipboardURITransferListHandleIsValid(PSH AREDCLIPBOARDURITRANSFER pTransfer, SHAREDCLIPBOARDLISTHANDLE hList)1812 bool SharedClipboardURITransferListHandleIsValid(PSHCLURITRANSFER pTransfer, SHCLLISTHANDLE hList) 1813 1813 { 1814 1814 bool fIsValid = false; 1815 1815 1816 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)1816 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1817 1817 { 1818 1818 fIsValid = sharedClipboardURITransferListGet(pTransfer, hList) != NULL; 1819 1819 } 1820 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)1820 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 1821 1821 { 1822 1822 AssertFailed(); /** @todo Implement. */ … … 1832 1832 * @param pTransfer URI clipboard transfer to prepare. 1833 1833 */ 1834 int SharedClipboardURITransferPrepare(PSH AREDCLIPBOARDURITRANSFER pTransfer)1834 int SharedClipboardURITransferPrepare(PSHCLURITRANSFER pTransfer) 1835 1835 { 1836 1836 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1840 1840 int rc = VINF_SUCCESS; 1841 1841 1842 AssertMsgReturn(pTransfer->State.enmStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_NONE,1842 AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_NONE, 1843 1843 ("Transfer has wrong state (%RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER); 1844 1844 … … 1847 1847 if (pTransfer->Callbacks.pfnTransferPrepare) 1848 1848 { 1849 SH AREDCLIPBOARDURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser };1849 SHCLURITRANSFERCALLBACKDATA callbackData = { pTransfer, pTransfer->Callbacks.pvUser }; 1850 1850 pTransfer->Callbacks.pfnTransferPrepare(&callbackData); 1851 1851 } … … 1853 1853 if (RT_SUCCESS(rc)) 1854 1854 { 1855 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_READY;1855 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_READY; 1856 1856 1857 1857 /** @todo Add checksum support. */ … … 1869 1869 * @param pCreationCtx Provider creation context to use for provider creation. 1870 1870 */ 1871 int SharedClipboardURITransferSetInterface(PSH AREDCLIPBOARDURITRANSFER pTransfer,1872 PSH AREDCLIPBOARDPROVIDERCREATIONCTX pCreationCtx)1871 int SharedClipboardURITransferSetInterface(PSHCLURITRANSFER pTransfer, 1872 PSHCLPROVIDERCREATIONCTX pCreationCtx) 1873 1873 { 1874 1874 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1906 1906 * @param pTransfer Transfer to clear URI root list for. 1907 1907 */ 1908 static void sharedClipboardURIListTransferRootsClear(PSH AREDCLIPBOARDURITRANSFER pTransfer)1908 static void sharedClipboardURIListTransferRootsClear(PSHCLURITRANSFER pTransfer) 1909 1909 { 1910 1910 AssertPtrReturnVoid(pTransfer); … … 1916 1916 } 1917 1917 1918 PSH AREDCLIPBOARDURILISTROOT pListRoot, pListRootNext;1919 RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SH AREDCLIPBOARDURILISTROOT, Node)1918 PSHCLURILISTROOT pListRoot, pListRootNext; 1919 RTListForEachSafe(&pTransfer->lstRoots, pListRoot, pListRootNext, SHCLURILISTROOT, Node) 1920 1920 { 1921 1921 RTStrFree(pListRoot->pszPathAbs); … … 1939 1939 * @param cbRoots Size (in bytes) of string list. 1940 1940 */ 1941 int SharedClipboardURILTransferSetRoots(PSH AREDCLIPBOARDURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots)1941 int SharedClipboardURILTransferSetRoots(PSHCLURITRANSFER pTransfer, const char *pszRoots, size_t cbRoots) 1942 1942 { 1943 1943 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 1957 1957 for (size_t i = 0; i < lstRootEntries.size(); ++i) 1958 1958 { 1959 PSH AREDCLIPBOARDURILISTROOT pListRoot = (PSHAREDCLIPBOARDURILISTROOT)RTMemAlloc(sizeof(SHAREDCLIPBOARDURILISTROOT));1959 PSHCLURILISTROOT pListRoot = (PSHCLURILISTROOT)RTMemAlloc(sizeof(SHCLURILISTROOT)); 1960 1960 AssertPtrBreakStmt(pListRoot, rc = VERR_NO_MEMORY); 1961 1961 … … 2007 2007 * @param pTransfer URI clipboard transfer to reset. 2008 2008 */ 2009 void SharedClipboardURITransferReset(PSH AREDCLIPBOARDURITRANSFER pTransfer)2009 void SharedClipboardURITransferReset(PSHCLURITRANSFER pTransfer) 2010 2010 { 2011 2011 AssertPtrReturnVoid(pTransfer); … … 2022 2022 * @param pTransfer URI clipboard transfer to return clipboard area for. 2023 2023 */ 2024 SharedClipboardArea *SharedClipboardURITransferGetArea(PSH AREDCLIPBOARDURITRANSFER pTransfer)2024 SharedClipboardArea *SharedClipboardURITransferGetArea(PSHCLURITRANSFER pTransfer) 2025 2025 { 2026 2026 AssertPtrReturn(pTransfer, NULL); … … 2035 2035 * @param pTransfer URI clipboard transfer to return root entry count for. 2036 2036 */ 2037 uint32_t SharedClipboardURILTransferRootsCount(PSH AREDCLIPBOARDURITRANSFER pTransfer)2037 uint32_t SharedClipboardURILTransferRootsCount(PSHCLURITRANSFER pTransfer) 2038 2038 { 2039 2039 AssertPtrReturn(pTransfer, 0); … … 2049 2049 * @param uIdx Index of root list entry to return. 2050 2050 */ 2051 inline PSH AREDCLIPBOARDURILISTROOT sharedClipboardURILTransferRootsGet(PSHAREDCLIPBOARDURITRANSFER pTransfer, uint32_t uIdx)2051 inline PSHCLURILISTROOT sharedClipboardURILTransferRootsGet(PSHCLURITRANSFER pTransfer, uint32_t uIdx) 2052 2052 { 2053 2053 if (uIdx >= pTransfer->cRoots) 2054 2054 return NULL; 2055 2055 2056 PSH AREDCLIPBOARDURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHAREDCLIPBOARDURILISTROOT, Node);2056 PSHCLURILISTROOT pIt = RTListGetFirst(&pTransfer->lstRoots, SHCLURILISTROOT, Node); 2057 2057 while (uIdx--) 2058 pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SH AREDCLIPBOARDURILISTROOT, Node);2058 pIt = RTListGetNext(&pTransfer->lstRoots, pIt, SHCLURILISTROOT, Node); 2059 2059 2060 2060 return pIt; … … 2069 2069 * @param pEntry Where to store the returned entry on success. 2070 2070 */ 2071 int SharedClipboardURILTransferRootsEntry(PSH AREDCLIPBOARDURITRANSFER pTransfer,2072 uint64_t uIndex, P VBOXCLIPBOARDROOTLISTENTRY pEntry)2071 int SharedClipboardURILTransferRootsEntry(PSHCLURITRANSFER pTransfer, 2072 uint64_t uIndex, PSHCLROOTLISTENTRY pEntry) 2073 2073 { 2074 2074 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2080 2080 int rc; 2081 2081 2082 PSH AREDCLIPBOARDURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex);2082 PSHCLURILISTROOT pRoot = sharedClipboardURILTransferRootsGet(pTransfer, uIndex); 2083 2083 AssertPtrReturn(pRoot, VERR_INVALID_PARAMETER); 2084 2084 … … 2101 2101 if (RT_SUCCESS(rc)) 2102 2102 { 2103 pEntry->cbInfo = sizeof(SH AREDCLIPBOARDFSOBJINFO);2104 pEntry->pvInfo = (PSH AREDCLIPBOARDFSOBJINFO)RTMemAlloc(pEntry->cbInfo);2103 pEntry->cbInfo = sizeof(SHCLFSOBJINFO); 2104 pEntry->pvInfo = (PSHCLFSOBJINFO)RTMemAlloc(pEntry->cbInfo); 2105 2105 if (pEntry->pvInfo) 2106 2106 { … … 2109 2109 if (RT_SUCCESS(rc)) 2110 2110 { 2111 SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO(pEntry->pvInfo), &fsObjInfo);2112 2113 pEntry->fInfo = VBOX_SH AREDCLIPBOARD_INFO_FLAG_FSOBJINFO;2111 SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO(pEntry->pvInfo), &fsObjInfo); 2112 2113 pEntry->fInfo = VBOX_SHCL_INFO_FLAG_FSOBJINFO; 2114 2114 } 2115 2115 } … … 2133 2133 * @param ppRootList Where to store the root list on success. 2134 2134 */ 2135 int SharedClipboardURILTransferRootsAsList(PSH AREDCLIPBOARDURITRANSFER pTransfer, PVBOXCLIPBOARDROOTLIST *ppRootList)2135 int SharedClipboardURILTransferRootsAsList(PSHCLURITRANSFER pTransfer, PSHCLROOTLIST *ppRootList) 2136 2136 { 2137 2137 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2142 2142 int rc = VINF_SUCCESS; 2143 2143 2144 if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_LOCAL)2145 { 2146 P VBOXCLIPBOARDROOTLIST pRootList = SharedClipboardURIRootListAlloc();2144 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 2145 { 2146 PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc(); 2147 2147 if (!pRootList) 2148 2148 return VERR_NO_MEMORY; … … 2154 2154 if (cRoots) 2155 2155 { 2156 P VBOXCLIPBOARDROOTLISTENTRY paRootListEntries2157 = (P VBOXCLIPBOARDROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(VBOXCLIPBOARDROOTLISTENTRY));2156 PSHCLROOTLISTENTRY paRootListEntries 2157 = (PSHCLROOTLISTENTRY)RTMemAllocZ(cRoots * sizeof(SHCLROOTLISTENTRY)); 2158 2158 if (paRootListEntries) 2159 2159 { … … 2182 2182 } 2183 2183 } 2184 else if (pTransfer->State.enmSource == SH AREDCLIPBOARDSOURCE_REMOTE)2184 else if (pTransfer->State.enmSource == SHCLSOURCE_REMOTE) 2185 2185 { 2186 2186 if (pTransfer->ProviderIface.pfnGetRoots) … … 2200 2200 * @param pTransfer URI clipboard transfer to return source for. 2201 2201 */ 2202 SH AREDCLIPBOARDSOURCE SharedClipboardURITransferGetSource(PSHAREDCLIPBOARDURITRANSFER pTransfer)2203 { 2204 AssertPtrReturn(pTransfer, SH AREDCLIPBOARDSOURCE_INVALID);2202 SHCLSOURCE SharedClipboardURITransferGetSource(PSHCLURITRANSFER pTransfer) 2203 { 2204 AssertPtrReturn(pTransfer, SHCLSOURCE_INVALID); 2205 2205 2206 2206 return pTransfer->State.enmSource; … … 2213 2213 * @param pTransfer URI clipboard transfer to return status for. 2214 2214 */ 2215 SH AREDCLIPBOARDURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHAREDCLIPBOARDURITRANSFER pTransfer)2216 { 2217 AssertPtrReturn(pTransfer, SH AREDCLIPBOARDURITRANSFERSTATUS_NONE);2215 SHCLURITRANSFERSTATUS SharedClipboardURITransferGetStatus(PSHCLURITRANSFER pTransfer) 2216 { 2217 AssertPtrReturn(pTransfer, SHCLURITRANSFERSTATUS_NONE); 2218 2218 2219 2219 return pTransfer->State.enmStatus; … … 2228 2228 * @param pvUser Pointer to user-provided data. 2229 2229 */ 2230 int SharedClipboardURITransferRun(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)2230 int SharedClipboardURITransferRun(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser) 2231 2231 { 2232 2232 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 2233 2233 2234 AssertMsgReturn(pTransfer->State.enmStatus == SH AREDCLIPBOARDURITRANSFERSTATUS_READY,2234 AssertMsgReturn(pTransfer->State.enmStatus == SHCLURITRANSFERSTATUS_READY, 2235 2235 ("Wrong status (currently is %RU32)\n", pTransfer->State.enmStatus), VERR_WRONG_ORDER); 2236 2236 … … 2248 2248 * @param pCallbacks Pointer to callback table to set. 2249 2249 */ 2250 void SharedClipboardURITransferSetCallbacks(PSH AREDCLIPBOARDURITRANSFER pTransfer,2251 PSH AREDCLIPBOARDURITRANSFERCALLBACKS pCallbacks)2250 void SharedClipboardURITransferSetCallbacks(PSHCLURITRANSFER pTransfer, 2251 PSHCLURITRANSFERCALLBACKS pCallbacks) 2252 2252 { 2253 2253 AssertPtrReturnVoid(pTransfer); … … 2281 2281 * @param pvUser Pointer to user-provided data. 2282 2282 */ 2283 static int sharedClipboardURITransferThreadCreate(PSH AREDCLIPBOARDURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)2283 static int sharedClipboardURITransferThreadCreate(PSHCLURITRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser) 2284 2284 2285 2285 { … … 2297 2297 if (pTransfer->Thread.fStarted) /* Did the thread indicate that it started correctly? */ 2298 2298 { 2299 pTransfer->State.enmStatus = SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING;2299 pTransfer->State.enmStatus = SHCLURITRANSFERSTATUS_RUNNING; 2300 2300 } 2301 2301 else … … 2314 2314 * @param uTimeoutMs Timeout (in ms) to wait for thread creation. 2315 2315 */ 2316 static int sharedClipboardURITransferThreadDestroy(PSH AREDCLIPBOARDURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs)2316 static int sharedClipboardURITransferThreadDestroy(PSHCLURITRANSFER pTransfer, RTMSINTERVAL uTimeoutMs) 2317 2317 { 2318 2318 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2340 2340 * @param pURI URI clipboard context to initialize. 2341 2341 */ 2342 int SharedClipboardURICtxInit(PSH AREDCLIPBOARDURICTX pURI)2342 int SharedClipboardURICtxInit(PSHCLURICTX pURI) 2343 2343 { 2344 2344 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2368 2368 * @param pURI URI clipboard context to destroy. 2369 2369 */ 2370 void SharedClipboardURICtxDestroy(PSH AREDCLIPBOARDURICTX pURI)2370 void SharedClipboardURICtxDestroy(PSHCLURICTX pURI) 2371 2371 { 2372 2372 AssertPtrReturnVoid(pURI); … … 2376 2376 RTCritSectDelete(&pURI->CritSect); 2377 2377 2378 PSH AREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;2379 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SH AREDCLIPBOARDURITRANSFER, Node)2378 PSHCLURITRANSFER pTransfer, pTransferNext; 2379 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node) 2380 2380 { 2381 2381 SharedClipboardURITransferDestroy(pTransfer); … … 2396 2396 * @param pURI URI clipboard context to reset. 2397 2397 */ 2398 void SharedClipboardURICtxReset(PSH AREDCLIPBOARDURICTX pURI)2398 void SharedClipboardURICtxReset(PSHCLURICTX pURI) 2399 2399 { 2400 2400 AssertPtrReturnVoid(pURI); … … 2402 2402 LogFlowFuncEnter(); 2403 2403 2404 PSH AREDCLIPBOARDURITRANSFER pTransfer;2405 RTListForEach(&pURI->List, pTransfer, SH AREDCLIPBOARDURITRANSFER, Node)2404 PSHCLURITRANSFER pTransfer; 2405 RTListForEach(&pURI->List, pTransfer, SHCLURITRANSFER, Node) 2406 2406 SharedClipboardURITransferReset(pTransfer); 2407 2407 } … … 2414 2414 * @param pTransfer Pointer to URI clipboard transfer to add. 2415 2415 */ 2416 int SharedClipboardURICtxTransferAdd(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)2416 int SharedClipboardURICtxTransferAdd(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer) 2417 2417 { 2418 2418 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2439 2439 * @param pTransfer Pointer to URI clipboard transfer to remove. 2440 2440 */ 2441 int SharedClipboardURICtxTransferRemove(PSH AREDCLIPBOARDURICTX pURI, PSHAREDCLIPBOARDURITRANSFER pTransfer)2441 int SharedClipboardURICtxTransferRemove(PSHCLURICTX pURI, PSHCLURITRANSFER pTransfer) 2442 2442 { 2443 2443 AssertPtrReturn(pURI, VERR_INVALID_POINTER); … … 2467 2467 * @param uIdx Index of the transfer to return. 2468 2468 */ 2469 static PSH AREDCLIPBOARDURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)2469 static PSHCLURITRANSFER sharedClipboardURICtxGetTransferInternal(PSHCLURICTX pURI, uint32_t uIdx) 2470 2470 { 2471 2471 AssertReturn(uIdx == 0, NULL); /* Only one transfer allowed at the moment. */ 2472 return RTListGetFirst(&pURI->List, SH AREDCLIPBOARDURITRANSFER, Node);2472 return RTListGetFirst(&pURI->List, SHCLURITRANSFER, Node); 2473 2473 } 2474 2474 … … 2480 2480 * @param uIdx Index of the transfer to return. 2481 2481 */ 2482 PSH AREDCLIPBOARDURITRANSFER SharedClipboardURICtxGetTransfer(PSHAREDCLIPBOARDURICTX pURI, uint32_t uIdx)2482 PSHCLURITRANSFER SharedClipboardURICtxGetTransfer(PSHCLURICTX pURI, uint32_t uIdx) 2483 2483 { 2484 2484 return sharedClipboardURICtxGetTransferInternal(pURI, uIdx); … … 2491 2491 * @param pURI URI clipboard context to return number for. 2492 2492 */ 2493 uint32_t SharedClipboardURICtxGetRunningTransfers(PSH AREDCLIPBOARDURICTX pURI)2493 uint32_t SharedClipboardURICtxGetRunningTransfers(PSHCLURICTX pURI) 2494 2494 { 2495 2495 AssertPtrReturn(pURI, 0); … … 2503 2503 * @param pURI URI clipboard context to return number for. 2504 2504 */ 2505 uint32_t SharedClipboardURICtxGetTotalTransfers(PSH AREDCLIPBOARDURICTX pURI)2505 uint32_t SharedClipboardURICtxGetTotalTransfers(PSHCLURICTX pURI) 2506 2506 { 2507 2507 AssertPtrReturn(pURI, 0); … … 2515 2515 * @param pURI URI clipboard context to cleanup transfers for. 2516 2516 */ 2517 void SharedClipboardURICtxTransfersCleanup(PSH AREDCLIPBOARDURICTX pURI)2517 void SharedClipboardURICtxTransfersCleanup(PSHCLURICTX pURI) 2518 2518 { 2519 2519 AssertPtrReturnVoid(pURI); … … 2522 2522 2523 2523 /* Remove all transfers which are not in a running state (e.g. only announced). */ 2524 PSH AREDCLIPBOARDURITRANSFER pTransfer, pTransferNext;2525 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SH AREDCLIPBOARDURITRANSFER, Node)2526 { 2527 if (SharedClipboardURITransferGetStatus(pTransfer) != SH AREDCLIPBOARDURITRANSFERSTATUS_RUNNING)2524 PSHCLURITRANSFER pTransfer, pTransferNext; 2525 RTListForEachSafe(&pURI->List, pTransfer, pTransferNext, SHCLURITRANSFER, Node) 2526 { 2527 if (SharedClipboardURITransferGetStatus(pTransfer) != SHCLURITRANSFERSTATUS_RUNNING) 2528 2528 { 2529 2529 SharedClipboardURITransferDestroy(pTransfer); … … 2545 2545 * @param pURI URI clipboard context to determine value for. 2546 2546 */ 2547 bool SharedClipboardURICtxTransfersMaximumReached(PSH AREDCLIPBOARDURICTX pURI)2547 bool SharedClipboardURICtxTransfersMaximumReached(PSHCLURICTX pURI) 2548 2548 { 2549 2549 AssertPtrReturn(pURI, true); … … 2561 2561 * @param pSrc The IPRT structure to convert data from. 2562 2562 */ 2563 void SharedClipboardFsObjFromIPRT(PSH AREDCLIPBOARDFSOBJINFO pDst, PCRTFSOBJINFO pSrc)2563 void SharedClipboardFsObjFromIPRT(PSHCLFSOBJINFO pDst, PCRTFSOBJINFO pSrc) 2564 2564 { 2565 2565 pDst->cbObject = pSrc->cbObject; … … 2577 2577 default: 2578 2578 case RTFSOBJATTRADD_NOTHING: 2579 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_NOTHING;2579 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_NOTHING; 2580 2580 break; 2581 2581 2582 2582 case RTFSOBJATTRADD_UNIX: 2583 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_UNIX;2583 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_UNIX; 2584 2584 pDst->Attr.u.Unix.uid = pSrc->Attr.u.Unix.uid; 2585 2585 pDst->Attr.u.Unix.gid = pSrc->Attr.u.Unix.gid; … … 2593 2593 2594 2594 case RTFSOBJATTRADD_EASIZE: 2595 pDst->Attr.enmAdditional = SH AREDCLIPBOARDFSOBJATTRADD_EASIZE;2595 pDst->Attr.enmAdditional = SHCLFSOBJATTRADD_EASIZE; 2596 2596 pDst->Attr.u.EASize.cb = pSrc->Attr.u.EASize.cb; 2597 2597 break; … … 2612 2612 */ 2613 2613 static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 2614 SH AREDCLIPBOARDOBJHANDLE handleInitial, uint64_t *pfOpen)2614 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen) 2615 2615 { 2616 2616 uint64_t fOpen = 0; … … 2640 2640 * and it contained random bits from stack. Detect this using the handle field value 2641 2641 * passed from the guest: old additions set it (incorrectly) to 0, new additions 2642 * set it to SH AREDCLIPBOARDOBJHANDLE_INVALID(~0).2642 * set it to SHCLOBJHANDLE_INVALID(~0). 2643 2643 */ 2644 2644 if (handleInitial == 0) … … 2656 2656 } 2657 2657 2658 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_RW))2658 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_RW)) 2659 2659 { 2660 2660 default: 2661 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_NONE:2661 case SHCL_OBJ_CF_ACCESS_NONE: 2662 2662 { 2663 2663 #ifdef RT_OS_WINDOWS 2664 if ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR) != SHAREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE)2664 if ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR) != SHCL_OBJ_CF_ACCESS_ATTR_NONE) 2665 2665 fOpen |= RTFILE_O_ATTR_ONLY; 2666 2666 else 2667 2667 #endif 2668 2668 fOpen |= RTFILE_O_READ; 2669 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_NONE\n"));2669 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_NONE\n")); 2670 2670 break; 2671 2671 } 2672 2672 2673 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ:2673 case SHCL_OBJ_CF_ACCESS_READ: 2674 2674 { 2675 2675 fOpen |= RTFILE_O_READ; 2676 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_READ\n"));2676 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READ\n")); 2677 2677 break; 2678 2678 } 2679 2679 2680 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE:2680 case SHCL_OBJ_CF_ACCESS_WRITE: 2681 2681 { 2682 2682 fOpen |= RTFILE_O_WRITE; 2683 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_WRITE\n"));2683 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_WRITE\n")); 2684 2684 break; 2685 2685 } 2686 2686 2687 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE:2687 case SHCL_OBJ_CF_ACCESS_READWRITE: 2688 2688 { 2689 2689 fOpen |= RTFILE_O_READWRITE; 2690 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_READWRITE\n"));2690 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_READWRITE\n")); 2691 2691 break; 2692 2692 } 2693 2693 } 2694 2694 2695 if (fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_APPEND)2695 if (fShClFlags & SHCL_OBJ_CF_ACCESS_APPEND) 2696 2696 { 2697 2697 fOpen |= RTFILE_O_APPEND; 2698 2698 } 2699 2699 2700 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_ATTR))2700 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_ATTR)) 2701 2701 { 2702 2702 default: 2703 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE:2703 case SHCL_OBJ_CF_ACCESS_ATTR_NONE: 2704 2704 { 2705 2705 fOpen |= RTFILE_O_ACCESS_ATTR_DEFAULT; 2706 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_NONE\n"));2706 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_NONE\n")); 2707 2707 break; 2708 2708 } 2709 2709 2710 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ:2710 case SHCL_OBJ_CF_ACCESS_ATTR_READ: 2711 2711 { 2712 2712 fOpen |= RTFILE_O_ACCESS_ATTR_READ; 2713 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READ\n"));2713 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READ\n")); 2714 2714 break; 2715 2715 } 2716 2716 2717 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE:2717 case SHCL_OBJ_CF_ACCESS_ATTR_WRITE: 2718 2718 { 2719 2719 fOpen |= RTFILE_O_ACCESS_ATTR_WRITE; 2720 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_WRITE\n"));2720 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_WRITE\n")); 2721 2721 break; 2722 2722 } 2723 2723 2724 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE:2724 case SHCL_OBJ_CF_ACCESS_ATTR_READWRITE: 2725 2725 { 2726 2726 fOpen |= RTFILE_O_ACCESS_ATTR_READWRITE; 2727 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_ATTR_READWRITE\n"));2727 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_ATTR_READWRITE\n")); 2728 2728 break; 2729 2729 } … … 2731 2731 2732 2732 /* Sharing mask */ 2733 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACCESS_MASK_DENY))2733 switch ((fShClFlags & SHCL_OBJ_CF_ACCESS_MASK_DENY)) 2734 2734 { 2735 2735 default: 2736 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE:2736 case SHCL_OBJ_CF_ACCESS_DENYNONE: 2737 2737 fOpen |= RTFILE_O_DENY_NONE; 2738 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYNONE\n"));2738 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYNONE\n")); 2739 2739 break; 2740 2740 2741 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD:2741 case SHCL_OBJ_CF_ACCESS_DENYREAD: 2742 2742 fOpen |= RTFILE_O_DENY_READ; 2743 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYREAD\n"));2743 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYREAD\n")); 2744 2744 break; 2745 2745 2746 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE:2746 case SHCL_OBJ_CF_ACCESS_DENYWRITE: 2747 2747 fOpen |= RTFILE_O_DENY_WRITE; 2748 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYWRITE\n"));2748 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYWRITE\n")); 2749 2749 break; 2750 2750 2751 case SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL:2751 case SHCL_OBJ_CF_ACCESS_DENYALL: 2752 2752 fOpen |= RTFILE_O_DENY_ALL; 2753 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACCESS_DENYALL\n"));2753 LogFlowFunc(("SHCL_OBJ_CF_ACCESS_DENYALL\n")); 2754 2754 break; 2755 2755 } 2756 2756 2757 2757 /* Open/Create action mask */ 2758 switch ((fShClFlags & SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS))2759 { 2760 case SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS:2761 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2758 switch ((fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_EXISTS)) 2759 { 2760 case SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS: 2761 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2762 2762 { 2763 2763 fOpen |= RTFILE_O_OPEN_CREATE; 2764 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2764 LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2765 2765 } 2766 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2766 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2767 2767 { 2768 2768 fOpen |= RTFILE_O_OPEN; 2769 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OPEN_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2769 LogFlowFunc(("SHCL_OBJ_CF_ACT_OPEN_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2770 2770 } 2771 2771 else … … 2775 2775 } 2776 2776 break; 2777 case SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS:2778 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2777 case SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS: 2778 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2779 2779 { 2780 2780 fOpen |= RTFILE_O_CREATE; 2781 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2781 LogFlowFunc(("SHCL_OBJ_CF_ACT_FAIL_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2782 2782 } 2783 2783 else … … 2787 2787 } 2788 2788 break; 2789 case SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS:2790 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2789 case SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS: 2790 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2791 2791 { 2792 2792 fOpen |= RTFILE_O_CREATE_REPLACE; 2793 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2793 LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2794 2794 } 2795 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2795 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2796 2796 { 2797 2797 fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE; 2798 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2798 LogFlowFunc(("SHCL_OBJ_CF_ACT_REPLACE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2799 2799 } 2800 2800 else … … 2804 2804 } 2805 2805 break; 2806 case SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS:2807 if (SH AREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2806 case SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS: 2807 if (SHCL_OBJ_CF_ACT_CREATE_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2808 2808 { 2809 2809 fOpen |= RTFILE_O_CREATE_REPLACE; 2810 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_CREATE_IF_NEW\n"));2810 LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_CREATE_IF_NEW\n")); 2811 2811 } 2812 else if (SH AREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHAREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_NEW))2812 else if (SHCL_OBJ_CF_ACT_FAIL_IF_NEW == (fShClFlags & SHCL_OBJ_CF_ACT_MASK_IF_NEW)) 2813 2813 { 2814 2814 fOpen |= RTFILE_O_OPEN | RTFILE_O_TRUNCATE; 2815 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHAREDCLIPBOARD_OBJ_CF_ACT_FAIL_IF_NEW\n"));2815 LogFlowFunc(("SHCL_OBJ_CF_ACT_OVERWRITE_IF_EXISTS and SHCL_OBJ_CF_ACT_FAIL_IF_NEW\n")); 2816 2816 } 2817 2817 else … … 2824 2824 { 2825 2825 rc = VERR_INVALID_PARAMETER; 2826 LogFlowFunc(("SH AREDCLIPBOARD_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n"));2826 LogFlowFunc(("SHCL_OBJ_CF_ACT_MASK_IF_EXISTS - invalid parameter\n")); 2827 2827 break; 2828 2828 } -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r80444 r80662 154 154 * Will be set to NULL if the new API is not available. 155 155 */ 156 int VBoxClipboardWinCheckAndInitNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI)156 int VBoxClipboardWinCheckAndInitNewAPI(PSHCLWINAPINEW pAPI) 157 157 { 158 158 RTLDRMOD hUser32 = NIL_RTLDRMOD; … … 175 175 else 176 176 { 177 RT_BZERO(pAPI, sizeof( VBOXCLIPBOARDWINAPINEW));177 RT_BZERO(pAPI, sizeof(SHCLWINAPINEW)); 178 178 LogFunc(("New Clipboard API not available; rc=%Rrc\n", rc)); 179 179 } … … 188 188 * @param pAPI Structure used for checking if the new clipboard API is available or not. 189 189 */ 190 bool VBoxClipboardWinIsNewAPI(P VBOXCLIPBOARDWINAPINEW pAPI)190 bool VBoxClipboardWinIsNewAPI(PSHCLWINAPINEW pAPI) 191 191 { 192 192 if (!pAPI) … … 201 201 * @param pCtx Windows clipboard context to use to add ourselves. 202 202 */ 203 int VBoxClipboardWinChainAdd(P VBOXCLIPBOARDWINCTX pCtx)204 { 205 const P VBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;203 int VBoxClipboardWinChainAdd(PSHCLWINCTX pCtx) 204 { 205 const PSHCLWINAPINEW pAPI = &pCtx->newAPI; 206 206 207 207 BOOL fRc; … … 234 234 * @param pCtx Windows clipboard context to use to remove ourselves. 235 235 */ 236 int VBoxClipboardWinChainRemove(P VBOXCLIPBOARDWINCTX pCtx)236 int VBoxClipboardWinChainRemove(PSHCLWINCTX pCtx) 237 237 { 238 238 if (!pCtx->hWnd) 239 239 return VINF_SUCCESS; 240 240 241 const P VBOXCLIPBOARDWINAPINEW pAPI = &pCtx->newAPI;241 const PSHCLWINAPINEW pAPI = &pCtx->newAPI; 242 242 243 243 BOOL fRc; … … 283 283 284 284 /** @todo r=andy Why not using SetWindowLongPtr for keeping the context? */ 285 P VBOXCLIPBOARDWINCTX pCtx = (PVBOXCLIPBOARDWINCTX)dwData;285 PSHCLWINCTX pCtx = (PSHCLWINCTX)dwData; 286 286 AssertPtrReturnVoid(pCtx); 287 287 … … 298 298 * @param lParam LPARAM to pass. 299 299 */ 300 LRESULT VBoxClipboardWinChainPassToNext(P VBOXCLIPBOARDWINCTX pWinCtx,300 LRESULT VBoxClipboardWinChainPassToNext(PSHCLWINCTX pWinCtx, 301 301 UINT msg, WPARAM wParam, LPARAM lParam) 302 302 { … … 327 327 * @param uFormat Windows clipboard format to convert. 328 328 */ 329 VBOXCLIPBOARDFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat)329 SHCLFORMAT VBoxClipboardWinClipboardFormatToVBox(UINT uFormat) 330 330 { 331 331 /* Insert the requested clipboard format data into the clipboard. */ 332 VBOXCLIPBOARDFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE;332 SHCLFORMAT vboxFormat = VBOX_SHARED_CLIPBOARD_FMT_NONE; 333 333 334 334 switch (uFormat) … … 386 386 * @param pFormats Where to store the retrieved formats. 387 387 */ 388 int VBoxClipboardWinGetFormats(P VBOXCLIPBOARDWINCTX pCtx, PSHAREDCLIPBOARDFORMATDATA pFormats)388 int VBoxClipboardWinGetFormats(PSHCLWINCTX pCtx, PSHCLFORMATDATA pFormats) 389 389 { 390 390 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 391 391 AssertPtrReturn(pFormats, VERR_INVALID_POINTER); 392 392 393 VBOXCLIPBOARDFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE;393 SHCLFORMATS fFormats = VBOX_SHARED_CLIPBOARD_FMT_NONE; 394 394 395 395 /* Query list of available formats and report to host. */ … … 649 649 * @param lParam lParam to pass on. 650 650 */ 651 LRESULT VBoxClipboardWinHandleWMChangeCBChain(P VBOXCLIPBOARDWINCTX pWinCtx,651 LRESULT VBoxClipboardWinHandleWMChangeCBChain(PSHCLWINCTX pWinCtx, 652 652 HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 653 653 { … … 697 697 * @param pWinCtx Windows context to use. 698 698 */ 699 int VBoxClipboardWinHandleWMDestroy(P VBOXCLIPBOARDWINCTX pWinCtx)699 int VBoxClipboardWinHandleWMDestroy(PSHCLWINCTX pWinCtx) 700 700 { 701 701 LogFlowFuncEnter(); … … 723 723 * @param hWnd Window handle to use. 724 724 */ 725 int VBoxClipboardWinHandleWMRenderAllFormats(P VBOXCLIPBOARDWINCTX pWinCtx, HWND hWnd)725 int VBoxClipboardWinHandleWMRenderAllFormats(PSHCLWINCTX pWinCtx, HWND hWnd) 726 726 { 727 727 RT_NOREF(pWinCtx); … … 750 750 * @param pWinCtx Windows context to use. 751 751 */ 752 int VBoxClipboardWinHandleWMTimer(P VBOXCLIPBOARDWINCTX pWinCtx)752 int VBoxClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx) 753 753 { 754 754 int rc = VINF_SUCCESS; … … 790 790 * @param fFormats Clipboard format(s) to announce. 791 791 */ 792 int VBoxClipboardWinAnnounceFormats(P VBOXCLIPBOARDWINCTX pWinCtx, VBOXCLIPBOARDFORMATS fFormats)792 int VBoxClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats) 793 793 { 794 794 LogFunc(("fFormats=0x%x\n", fFormats)); … … 846 846 * @param pTransfer URI transfer to use. 847 847 */ 848 int VBoxClipboardWinURITransferCreate(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)848 int VBoxClipboardWinURITransferCreate(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer) 849 849 { 850 850 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 912 912 * @param pTransfer URI transfer to create implementation-specific data for. 913 913 */ 914 void VBoxClipboardWinURITransferDestroy(P VBOXCLIPBOARDWINCTX pWinCtx, PSHAREDCLIPBOARDURITRANSFER pTransfer)914 void VBoxClipboardWinURITransferDestroy(PSHCLWINCTX pWinCtx, PSHCLURITRANSFER pTransfer) 915 915 { 916 916 RT_NOREF(pWinCtx); -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r80623 r80662 206 206 { 207 207 /** Opaque data structure describing the front-end. */ 208 VBOXCLIPBOARDCONTEXT *pFrontend;208 SHCLCONTEXT *pFrontend; 209 209 /** Is an X server actually available? */ 210 210 bool fHaveX11; … … 926 926 * @note X11 backend code 927 927 */ 928 CLIPBACKEND *ClipConstructX11( VBOXCLIPBOARDCONTEXT *pFrontend, bool fHeadless)928 CLIPBACKEND *ClipConstructX11(SHCLCONTEXT *pFrontend, bool fHeadless) 929 929 { 930 930 CLIPBACKEND *pCtx = (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND)); … … 2120 2120 2121 2121 /* Return the data in the simulated VBox clipboard. */ 2122 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)2122 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 2123 2123 { 2124 2124 RT_NOREF2(pCtx, u32Format); … … 2241 2241 static uint32_t g_fX11Formats = 0; 2242 2242 2243 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)2243 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 2244 2244 { 2245 2245 RT_NOREF1(pCtx); … … 2389 2389 static char g_completedBuf[MAX_BUF_SIZE]; 2390 2390 2391 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)2391 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 2392 2392 { 2393 2393 RT_NOREF1(pCtx); … … 2885 2885 # include <iprt/test.h> 2886 2886 2887 int ClipRequestDataForX11( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)2887 int ClipRequestDataForX11(SHCLCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 2888 2888 { 2889 2889 RT_NOREF4(pCtx, u32Format, ppv, pcb); … … 2891 2891 } 2892 2892 2893 void ClipReportX11Formats( VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)2893 void ClipReportX11Formats(SHCLCONTEXT *pCtx, uint32_t u32Formats) 2894 2894 { 2895 2895 RT_NOREF2(pCtx, u32Formats); 2896 2896 } 2897 2897 2898 void ClipRequestFromX11CompleteCallback( VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb)2898 void ClipRequestFromX11CompleteCallback(SHCLCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 2899 2899 { 2900 2900 RT_NOREF5(pCtx, rc, pReq, pv, cb);
Note:
See TracChangeset
for help on using the changeset viewer.