- Timestamp:
- Jun 2, 2017 11:10:06 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/mangling.h (modified) (1 diff)
-
include/iprt/vfs.h (modified) (4 diffs)
-
src/VBox/Runtime/common/vfs/vfsprogress.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r67222 r67228 2427 2427 # define RTVfsUtilDummyPollOne RT_MANGLER(RTVfsUtilDummyPollOne) 2428 2428 # define RTVfsUtilPumpIoStreams RT_MANGLER(RTVfsUtilPumpIoStreams) 2429 # define RTVfsCreatePro cessForFile RT_MANGLER(RTVfsCreateProcessForFile)2430 # define RTVfsCreatePro cessForIoStream RT_MANGLER(RTVfsCreateProcessForIoStream)2429 # define RTVfsCreateProgressForFile RT_MANGLER(RTVfsCreateProgressForFile) 2430 # define RTVfsCreateProgressForIoStream RT_MANGLER(RTVfsCreateProgressForIoStream) 2431 2431 # define RTVfsCreateReadAheadForFile RT_MANGLER(RTVfsCreateReadAheadForFile) 2432 2432 # define RTVfsCreateReadAheadForIoStream RT_MANGLER(RTVfsCreateReadAheadForIoStream) -
trunk/include/iprt/vfs.h
r67224 r67228 1312 1312 * @param hVfsIos The I/O stream to wrap. 1313 1313 * @param pfnProgress The progress callback. The return code is 1314 * ignored by default, but can be enabled using1315 * RTVFSPROGRESS_F_ ALLOW_CANCEL.1314 * ignored by default, see 1315 * RTVFSPROGRESS_F_CANCELABLE. 1316 1316 * @param pvUser The user argument to @a pfnProgress. 1317 1317 * @param fFlags RTVFSPROGRESS_F_XXX … … 1320 1320 * @param phVfsIos Where to return the I/O stream handle. 1321 1321 */ 1322 RTDECL(int) RTVfsCreatePro cessForIoStream(RTVFSIOSTREAM hVfsIos, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags,1323 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSIOSTREAM phVfsIos);1322 RTDECL(int) RTVfsCreateProgressForIoStream(RTVFSIOSTREAM hVfsIos, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 1323 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSIOSTREAM phVfsIos); 1324 1324 1325 1325 /** … … 1329 1329 * @param hVfsFile The file to wrap. 1330 1330 * @param pfnProgress The progress callback. The return code is 1331 * ignored by default, but can be enabled using1332 * RTVFSPROGRESS_F_ ALLOW_CANCEL.1331 * ignored by default, see 1332 * RTVFSPROGRESS_F_CANCELABLE. 1333 1333 * @param pvUser The user argument to @a pfnProgress. 1334 1334 * @param fFlags RTVFSPROGRESS_F_XXX … … 1337 1337 * @param phVfsFile Where to return the file handle. 1338 1338 */ 1339 RTDECL(int) RTVfsCreatePro cessForFile(RTVFSFILE hVfsFile, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags,1340 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSFILE phVfsFile);1339 RTDECL(int) RTVfsCreateProgressForFile(RTVFSFILE hVfsFile, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 1340 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSFILE phVfsFile); 1341 1341 1342 1342 /** @name RTVFSPROGRESS_F_XXX - Flags for RTVfsCreateProcessForIoStream and 1343 1343 * RTVfsCreateProcessForFile. 1344 1344 * @{ */ 1345 /** Allow cancellation, forcing every access to return the pfnProgress failure 1346 * status triggering it. The cancelation is generally delayed till the next 1347 * operation after the cancel was seen. */ 1348 #define RTVFSPROGRESS_F_ALLOW_CANCEL RT_BIT_32(0) 1345 /** Cancel if the callback returns a failure status code. 1346 * This isn't default behavior because the cancelation is delayed one I/O 1347 * operation in most cases and it's uncertain how the VFS user will handle the 1348 * cancellation status code. */ 1349 #define RTVFSPROGRESS_F_CANCELABLE RT_BIT_32(0) 1349 1350 /** Account forward seeks as reads. */ 1350 1351 #define RTVFSPROGRESS_F_FORWARD_SEEK_AS_READ RT_BIT_32(1) -
trunk/src/VBox/Runtime/common/vfs/vfsprogress.cpp
r67224 r67228 93 93 94 94 int rc = pThis->pfnProgress(uPct, pThis->pvUser); 95 if (!(pThis->fFlags & RTVFSPROGRESS_F_ ALLOW_CANCEL))95 if (!(pThis->fFlags & RTVFSPROGRESS_F_CANCELABLE)) 96 96 rc = VINF_SUCCESS; 97 97 else if (RT_FAILURE(rc) && RT_SUCCESS(pThis->rcCanceled)) … … 447 447 448 448 449 RTDECL(int) RTVfs IoStrmCreateProgress(RTVFSIOSTREAM hVfsIos, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags,450 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSIOSTREAM phVfsIos)449 RTDECL(int) RTVfsCreateProgressForIoStream(RTVFSIOSTREAM hVfsIos, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 450 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSIOSTREAM phVfsIos) 451 451 { 452 452 AssertPtrReturn(pfnProgress, VERR_INVALID_POINTER); … … 482 482 483 483 484 RTDECL(int) RTVfs FileCreateProgress(RTVFSFILE hVfsFile, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags,485 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSFILE phVfsFile)484 RTDECL(int) RTVfsCreateProgressForFile(RTVFSFILE hVfsFile, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 485 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSFILE phVfsFile) 486 486 { 487 487 AssertPtrReturn(pfnProgress, VERR_INVALID_POINTER);
Note:
See TracChangeset
for help on using the changeset viewer.

