- Timestamp:
- Jun 1, 2017 9:44:24 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
-
include/iprt/mangling.h (modified) (2 diffs)
-
include/iprt/vfs.h (modified) (3 diffs)
-
src/VBox/Runtime/Makefile.kmk (modified) (1 diff)
-
src/VBox/Runtime/common/vfs/vfsbase.cpp (modified) (2 diffs)
-
src/VBox/Runtime/common/vfs/vfsprogress.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r67186 r67221 2352 2352 # define RTVfsIoStrmFromRTPipe RT_MANGLER(RTVfsIoStrmFromRTPipe) 2353 2353 # define RTVfsIoStrmFromStdHandle RT_MANGLER(RTVfsIoStrmFromStdHandle) 2354 # define RTVfsIoStrmGetOpenFlags RT_MANGLER(RTVfsIoStrmGetOpenFlags) 2354 2355 # define RTVfsIoStrmIsAtEnd RT_MANGLER(RTVfsIoStrmIsAtEnd) 2355 2356 # define RTVfsIoStrmOpenNormal RT_MANGLER(RTVfsIoStrmOpenNormal) … … 2425 2426 # define RTVfsUtilDummyPollOne RT_MANGLER(RTVfsUtilDummyPollOne) 2426 2427 # define RTVfsUtilPumpIoStreams RT_MANGLER(RTVfsUtilPumpIoStreams) 2428 # define RTVfsCreateProcessForFile RT_MANGLER(RTVfsCreateProcessForFile) 2429 # define RTVfsCreateProcessForIoStream RT_MANGLER(RTVfsCreateProcessForIoStream) 2427 2430 # define RTVfsCreateReadAheadForFile RT_MANGLER(RTVfsCreateReadAheadForFile) 2428 2431 # define RTVfsCreateReadAheadForIoStream RT_MANGLER(RTVfsCreateReadAheadForIoStream) -
trunk/include/iprt/vfs.h
r67186 r67221 946 946 947 947 /** 948 * Get the RTFILE_O_XXX flags for the I/O stream. 949 * 950 * @returns RTFILE_O_XXX, 0 on failure. 951 * @param hVfsIos The VFS I/O stream handle. 952 */ 953 RTDECL(uint64_t) RTVfsIoStrmGetOpenFlags(RTVFSIOSTREAM hVfsIos); 954 955 /** 948 956 * Process the rest of the stream, checking if it's all valid UTF-8 encoding. 949 957 * … … 1191 1199 RTDECL(RTFOFF) RTVfsFileGetMaxSize(RTVFSFILE hVfsFile); 1192 1200 RTDECL(int) RTVfsFileGetMaxSizeEx(RTVFSFILE hVfsFile, PRTFOFF pcbMax); 1201 1202 /** 1203 * Get the RTFILE_O_XXX flags for the I/O stream. 1204 * 1205 * @returns RTFILE_O_XXX, 0 on failure. 1206 * @param hVfsIos The VFS I/O stream handle. 1207 */ 1208 RTDECL(uint64_t) RTVfsFileGetOpenFlags(RTVFSFILE hVfsFile); 1193 1209 1194 1210 /** @} */ … … 1289 1305 RTDECL(int) RTVfsUtilPumpIoStreams(RTVFSIOSTREAM hVfsIosSrc, RTVFSIOSTREAM hVfsIosDst, size_t cbBufHint); 1290 1306 1307 1308 /** 1309 * Creates a progress wrapper for an I/O stream. 1310 * 1311 * @returns IRPT status code. 1312 * @param hVfsIos The I/O stream to wrap. 1313 * @param pfnProgress The progress callback. The return code is 1314 * ignored! 1315 * @param pvUser The user argument to @a pfnProgress. 1316 * @param fFlags RTVFSPROGRESS_F_XXX 1317 * @param cbExpectedRead The expected number of bytes read. 1318 * @param cbExpectedWritten The execpted number of bytes written. 1319 * @param phVfsIos Where to return the I/O stream handle. 1320 * 1321 * @remarks Again, the return code from @a pfnProgress is ignored. Cancellation 1322 * is not supported. 1323 */ 1324 RTDECL(int) RTVfsCreateProcessForIoStream(RTVFSIOSTREAM hVfsIos, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 1325 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSIOSTREAM phVfsIos); 1326 1327 /** 1328 * Creates a progress wrapper for a file stream. 1329 * 1330 * @returns IRPT status code. 1331 * @param hVfsFile The file to wrap. 1332 * @param pfnProgress The progress callback. The return code is 1333 * ignored! 1334 * @param pvUser The user argument to @a pfnProgress. 1335 * @param fFlags RTVFSPROGRESS_F_XXX 1336 * @param cbExpectedRead The expected number of bytes read. 1337 * @param cbExpectedWritten The execpted number of bytes written. 1338 * @param phVfsFile Where to return the file handle. 1339 * 1340 * @remarks Again, the return code from @a pfnProgress is ignored. Cancellation 1341 * is not supported. 1342 */ 1343 RTDECL(int) RTVfsCreateProcessForFile(RTVFSFILE hVfsFile, PFNRTPROGRESS pfnProgress, void *pvUser, uint32_t fFlags, 1344 uint64_t cbExpectedRead, uint64_t cbExpectedWritten, PRTVFSFILE phVfsFile); 1345 1346 /** @name RTVFSPROGRESS_F_XXX - Flags for RTVfsCreateProcessForIoStream and 1347 * RTVfsCreateProcessForFile. 1348 * @{ */ 1349 /** Account forward seeks as reads. */ 1350 #define RTVFSPROGRESS_F_FORWARD_SEEK_AS_READ RT_BIT_32(0) 1351 /** Account fprward seeks as writes. */ 1352 #define RTVFSPROGRESS_F_FORWARD_SEEK_AS_WRITE RT_BIT_32(1) 1353 /** Valid bits. */ 1354 #define RTVFSPROGRESS_F_VALID_MASK UINT32_C(0x00000003) 1355 /** @} */ 1356 1357 1291 1358 /** 1292 1359 * Create an I/O stream instance performing simple sequential read-ahead. -
trunk/src/VBox/Runtime/Makefile.kmk
r67186 r67221 613 613 common/vfs/vfsmisc.cpp \ 614 614 common/vfs/vfsmsg.cpp \ 615 common/vfs/vfsprogress.cpp \ 615 616 common/vfs/vfsreadahead.cpp \ 616 617 common/vfs/vfsstdfile.cpp \ -
trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp
r67189 r67221 3084 3084 3085 3085 3086 RTDECL(uint64_t) RTVfsIoStrmGetOpenFlags(RTVFSIOSTREAM hVfsIos) 3087 { 3088 RTVFSIOSTREAMINTERNAL *pThis = hVfsIos; 3089 AssertPtrReturn(pThis, 0); 3090 AssertReturn(pThis->uMagic == RTVFSIOSTREAM_MAGIC, 0); 3091 return pThis->fFlags; 3092 } 3086 3093 3087 3094 … … 3405 3412 return rc; 3406 3413 } 3414 3415 3416 RTDECL(uint64_t) RTVfsFileGetOpenFlags(RTVFSFILE hVfsFile) 3417 { 3418 RTVFSFILEINTERNAL *pThis = hVfsFile; 3419 AssertPtrReturn(pThis, 0); 3420 AssertReturn(pThis->uMagic == RTVFSFILE_MAGIC, 0); 3421 return pThis->Stream.fFlags; 3422 } 3423
Note:
See TracChangeset
for help on using the changeset viewer.

