Changeset 81320 in vbox
- Timestamp:
- Oct 17, 2019 2:32:23 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r81318 r81320 31 31 32 32 33 static int sharedClipboardTransferThreadCreate(PSHCLTRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser); 34 static int sharedClipboardTransferThreadDestroy(PSHCLTRANSFER pTransfer, RTMSINTERVAL uTimeoutMs); 35 static PSHCLTRANSFER sharedClipboardTransferCtxGetTransferInternal(PSHCLTRANSFERCTX pTransferCtx, uint32_t uIdx); 36 static int sharedClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 37 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen); 33 static int shClTransferThreadCreate(PSHCLTRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser); 34 static int shClTransferThreadDestroy(PSHCLTRANSFER pTransfer, RTMSINTERVAL uTimeoutMs); 35 static PSHCLTRANSFER shClTransferCtxGetTransferInternal(PSHCLTRANSFERCTX pTransferCtx, uint32_t uIdx); 36 static int shClConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, SHCLOBJHANDLE handleInitial, uint64_t *pfOpen); 38 37 39 38 /** @todo Split this file up in different modules. */ … … 762 761 * @param hObj Object handle of the object to get handle info for. 763 762 */ 764 inline PSHCLOBJHANDLEINFO sharedClipboardTransferObjectGet(PSHCLTRANSFER pTransfer, 765 SHCLOBJHANDLE hObj) 763 inline PSHCLOBJHANDLEINFO shClTransferObjGet(PSHCLTRANSFER pTransfer, SHCLOBJHANDLE hObj) 766 764 { 767 765 PSHCLOBJHANDLEINFO pIt; … … 809 807 810 808 uint64_t fOpen; 811 rc = sh aredClipboardConvertFileCreateFlags(fWritable,812 813 809 rc = shClConvertFileCreateFlags(fWritable, 810 pOpenCreateParms->fCreate, pOpenCreateParms->ObjInfo.Attr.fMode, 811 SHCLOBJHANDLE_INVALID, &fOpen); 814 812 if (RT_SUCCESS(rc)) 815 813 { … … 877 875 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 878 876 { 879 PSHCLOBJHANDLEINFO pInfo = sh aredClipboardTransferObjectGet(pTransfer, hObj);877 PSHCLOBJHANDLEINFO pInfo = shClTransferObjGet(pTransfer, hObj); 880 878 if (pInfo) 881 879 { … … 962 960 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 963 961 { 964 PSHCLOBJHANDLEINFO pInfo = sh aredClipboardTransferObjectGet(pTransfer, hObj);962 PSHCLOBJHANDLEINFO pInfo = shClTransferObjGet(pTransfer, hObj); 965 963 if (pInfo) 966 964 { … … 1024 1022 if (pTransfer->State.enmSource == SHCLSOURCE_LOCAL) 1025 1023 { 1026 PSHCLOBJHANDLEINFO pInfo = sh aredClipboardTransferObjectGet(pTransfer, hObj);1024 PSHCLOBJHANDLEINFO pInfo = shClTransferObjGet(pTransfer, hObj); 1027 1025 if (pInfo) 1028 1026 { … … 1129 1127 * @returns VBox status code. 1130 1128 * @param ppTransfer Where to return the created Shared Clipboard transfer struct. 1131 * Must be destroyed by Sh aredClipboardTransferDestroy().1129 * Must be destroyed by ShClTransferDestroy(). 1132 1130 */ 1133 1131 int ShClTransferCreate(PSHCLTRANSFER *ppTransfer) … … 1206 1204 LogFlowFuncEnter(); 1207 1205 1208 int rc = sh aredClipboardTransferThreadDestroy(pTransfer, 30 * 1000 /* Timeout in ms */);1206 int rc = shClTransferThreadDestroy(pTransfer, 30 * 1000 /* Timeout in ms */); 1209 1207 if (RT_FAILURE(rc)) 1210 1208 return rc; … … 2353 2351 VERR_WRONG_ORDER); 2354 2352 2355 int rc = sh aredClipboardTransferThreadCreate(pTransfer, pfnThreadFunc, pvUser);2353 int rc = shClTransferThreadCreate(pTransfer, pfnThreadFunc, pvUser); 2356 2354 2357 2355 LogFlowFuncLeaveRC(rc); … … 2435 2433 * @param pvUser Pointer to user-provided data. 2436 2434 */ 2437 static int sh aredClipboardTransferThreadCreate(PSHCLTRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser)2435 static int shClTransferThreadCreate(PSHCLTRANSFER pTransfer, PFNRTTHREAD pfnThreadFunc, void *pvUser) 2438 2436 2439 2437 { … … 2475 2473 * @param uTimeoutMs Timeout (in ms) to wait for thread creation. 2476 2474 */ 2477 static int sh aredClipboardTransferThreadDestroy(PSHCLTRANSFER pTransfer, RTMSINTERVAL uTimeoutMs)2475 static int shClTransferThreadDestroy(PSHCLTRANSFER pTransfer, RTMSINTERVAL uTimeoutMs) 2478 2476 { 2479 2477 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); … … 2576 2574 * @param uID ID of the transfer to return. 2577 2575 */ 2578 static PSHCLTRANSFER sh aredClipboardTransferCtxGetTransferInternal(PSHCLTRANSFERCTX pTransferCtx, uint32_t uID)2576 static PSHCLTRANSFER shClTransferCtxGetTransferInternal(PSHCLTRANSFERCTX pTransferCtx, uint32_t uID) 2579 2577 { 2580 2578 PSHCLTRANSFER pTransfer; … … 2597 2595 PSHCLTRANSFER ShClTransferCtxGetTransfer(PSHCLTRANSFERCTX pTransferCtx, uint32_t uID) 2598 2596 { 2599 return sh aredClipboardTransferCtxGetTransferInternal(pTransferCtx, uID);2597 return shClTransferCtxGetTransferInternal(pTransferCtx, uID); 2600 2598 } 2601 2599 … … 2723 2721 LogFlowFunc(("idTransfer=%RU32\n", idTransfer)); 2724 2722 2725 PSHCLTRANSFER pTransfer = sh aredClipboardTransferCtxGetTransferInternal(pTransferCtx, idTransfer);2723 PSHCLTRANSFER pTransfer = shClTransferCtxGetTransferInternal(pTransferCtx, idTransfer); 2726 2724 if (pTransfer) 2727 2725 { … … 2848 2846 * @sa Initially taken from vbsfConvertFileOpenFlags(). 2849 2847 */ 2850 static int sh aredClipboardConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode,2851 2848 static int shClConvertFileCreateFlags(bool fWritable, unsigned fShClFlags, RTFMODE fMode, 2849 SHCLOBJHANDLE handleInitial, uint64_t *pfOpen) 2852 2850 { 2853 2851 uint64_t fOpen = 0;
Note:
See TracChangeset
for help on using the changeset viewer.