Changeset 37559 in vbox for trunk/include/iprt
- Timestamp:
- Jun 20, 2011 2:48:03 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72400
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/file.h
r36573 r37559 30 30 #include <iprt/types.h> 31 31 #include <iprt/stdarg.h> 32 #ifdef IN_RING3 33 # include <iprt/fs.h> 34 #endif 32 #include <iprt/fs.h> 35 33 36 34 RT_C_DECLS_BEGIN … … 70 68 #endif 71 69 72 73 #ifdef IN_RING374 70 75 71 /** … … 236 232 237 233 234 #ifdef IN_RING3 238 235 /** 239 236 * Force the use of open flags for all files opened after the setting is … … 246 243 */ 247 244 RTR3DECL(int) RTFileSetForceFlags(unsigned fOpenForAccess, unsigned fSet, unsigned fMask); 245 #endif /* IN_RING3 */ 248 246 249 247 /** … … 256 254 * The ACCESS, ACTION and DENY flags are mandatory! 257 255 */ 258 RT R3DECL(int) RTFileOpen(PRTFILE pFile, const char *pszFilename, uint32_t fOpen);256 RTDECL(int) RTFileOpen(PRTFILE pFile, const char *pszFilename, uint32_t fOpen); 259 257 260 258 /** … … 269 267 * @param ... Arguments to the format string. 270 268 */ 271 RT R3DECL(int) RTFileOpenF(PRTFILE pFile, uint32_t fOpen, const char *pszFilenameFmt, ...);269 RTDECL(int) RTFileOpenF(PRTFILE pFile, uint32_t fOpen, const char *pszFilenameFmt, ...); 272 270 273 271 /** … … 282 280 * @param va Arguments to the format string. 283 281 */ 284 RT R3DECL(int) RTFileOpenV(PRTFILE pFile, uint32_t fOpen, const char *pszFilenameFmt, va_list va);282 RTDECL(int) RTFileOpenV(PRTFILE pFile, uint32_t fOpen, const char *pszFilenameFmt, va_list va); 285 283 286 284 /** … … 291 289 * @param fAccess The desired access only, i.e. read, write or both. 292 290 */ 293 RT R3DECL(int) RTFileOpenBitBucket(PRTFILE phFile, uint32_t fAccess);291 RTDECL(int) RTFileOpenBitBucket(PRTFILE phFile, uint32_t fAccess); 294 292 295 293 /** … … 299 297 * @param File The file handle to close. 300 298 */ 301 RT R3DECL(int) RTFileClose(RTFILE File);299 RTDECL(int) RTFileClose(RTFILE File); 302 300 303 301 /** … … 308 306 * @param uNative The native handle. 309 307 */ 310 RT R3DECL(int) RTFileFromNative(PRTFILE pFile, RTHCINTPTR uNative);308 RTDECL(int) RTFileFromNative(PRTFILE pFile, RTHCINTPTR uNative); 311 309 312 310 /** … … 316 314 * @param File The IPRT file handle. 317 315 */ 318 RT R3DECL(RTHCINTPTR) RTFileToNative(RTFILE File);316 RTDECL(RTHCINTPTR) RTFileToNative(RTFILE File); 319 317 320 318 /** … … 325 323 * @todo This is a RTPath api! 326 324 */ 327 RT R3DECL(int) RTFileDelete(const char *pszFilename);325 RTDECL(int) RTFileDelete(const char *pszFilename); 328 326 329 327 /** @name Seek flags. … … 352 350 * NULL is allowed. 353 351 */ 354 RT R3DECL(int) RTFileSeek(RTFILE File, int64_t offSeek, unsigned uMethod, uint64_t *poffActual);352 RTDECL(int) RTFileSeek(RTFILE File, int64_t offSeek, unsigned uMethod, uint64_t *poffActual); 355 353 356 354 /** … … 364 362 * If NULL an error will be returned for a partial read. 365 363 */ 366 RT R3DECL(int) RTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, size_t *pcbRead);364 RTDECL(int) RTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, size_t *pcbRead); 367 365 368 366 /** … … 378 376 * If NULL an error will be returned for a partial read. 379 377 */ 380 RT R3DECL(int) RTFileReadAt(RTFILE File, RTFOFF off, void *pvBuf, size_t cbToRead, size_t *pcbRead);378 RTDECL(int) RTFileReadAt(RTFILE File, RTFOFF off, void *pvBuf, size_t cbToRead, size_t *pcbRead); 381 379 382 380 /** … … 390 388 * If NULL an error will be returned for a partial write. 391 389 */ 392 RT R3DECL(int) RTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten);390 RTDECL(int) RTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten); 393 391 394 392 /** … … 404 402 * If NULL an error will be returned for a partial write. 405 403 */ 406 RT R3DECL(int) RTFileWriteAt(RTFILE File, RTFOFF off, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten);404 RTDECL(int) RTFileWriteAt(RTFILE File, RTFOFF off, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten); 407 405 408 406 /** … … 412 410 * @param File Handle to the file. 413 411 */ 414 RT R3DECL(int) RTFileFlush(RTFILE File);412 RTDECL(int) RTFileFlush(RTFILE File); 415 413 416 414 /** … … 421 419 * @param cbSize The new file size. 422 420 */ 423 RT R3DECL(int) RTFileSetSize(RTFILE File, uint64_t cbSize);421 RTDECL(int) RTFileSetSize(RTFILE File, uint64_t cbSize); 424 422 425 423 /** … … 430 428 * @param pcbSize Where to store the filesize. 431 429 */ 432 RT R3DECL(int) RTFileGetSize(RTFILE File, uint64_t *pcbSize);430 RTDECL(int) RTFileGetSize(RTFILE File, uint64_t *pcbSize); 433 431 434 432 /** … … 440 438 * @see RTFileGetMaxSizeEx. 441 439 */ 442 RT R3DECL(RTFOFF) RTFileGetMaxSize(RTFILE File);440 RTDECL(RTFOFF) RTFileGetMaxSize(RTFILE File); 443 441 444 442 /** … … 450 448 * @see RTFileGetMaxSize. 451 449 */ 452 RT R3DECL(int) RTFileGetMaxSizeEx(RTFILE File, PRTFOFF pcbMax);450 RTDECL(int) RTFileGetMaxSizeEx(RTFILE File, PRTFOFF pcbMax); 453 451 454 452 /** … … 459 457 * @param File Handle to the file. 460 458 */ 461 RT R3DECL(RTFOFF) RTFileGetMaxSize(RTFILE File);459 RTDECL(RTFOFF) RTFileGetMaxSize(RTFILE File); 462 460 463 461 /** … … 477 475 * @param File The file handle 478 476 */ 479 RT R3DECL(bool) RTFileIsValid(RTFILE File);477 RTDECL(bool) RTFileIsValid(RTFILE File); 480 478 481 479 /** … … 641 639 * @param cbLock Length of region to lock, may overlap the end of file. 642 640 */ 643 RT R3DECL(int) RTFileLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock);641 RTDECL(int) RTFileLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock); 644 642 645 643 /** … … 666 664 * @param cbLock Length of region to lock, may overlap the end of file. 667 665 */ 668 RT R3DECL(int) RTFileChangeLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock);666 RTDECL(int) RTFileChangeLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock); 669 667 670 668 /** … … 678 676 * @param cbLock Length of region to unlock, may overlap the end of file. 679 677 */ 680 RT R3DECL(int) RTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock);678 RTDECL(int) RTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock); 681 679 682 680 … … 691 689 * Use RTFSOBJATTRADD_NOTHING if this doesn't matter. 692 690 */ 693 RT R3DECL(int) RTFileQueryInfo(RTFILE File, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs);691 RTDECL(int) RTFileQueryInfo(RTFILE File, PRTFSOBJINFO pObjInfo, RTFSOBJATTRADD enmAdditionalAttribs); 694 692 695 693 /** … … 717 715 * @remark POSIX can only set Access & Modification and will always set both. 718 716 */ 719 RT R3DECL(int) RTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,720 717 RTDECL(int) RTFileSetTimes(RTFILE File, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, 718 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime); 721 719 722 720 /** … … 732 730 * @remark This is wrapper around RTFileQueryInfo() and exists to complement RTFileSetTimes(). 733 731 */ 734 RT R3DECL(int) RTFileGetTimes(RTFILE File, PRTTIMESPEC pAccessTime, PRTTIMESPEC pModificationTime,735 732 RTDECL(int) RTFileGetTimes(RTFILE File, PRTTIMESPEC pAccessTime, PRTTIMESPEC pModificationTime, 733 PRTTIMESPEC pChangeTime, PRTTIMESPEC pBirthTime); 736 734 737 735 /** … … 745 743 * @param fMode The new file mode, see @ref grp_rt_fs for details. 746 744 */ 747 RT R3DECL(int) RTFileSetMode(RTFILE File, RTFMODE fMode);745 RTDECL(int) RTFileSetMode(RTFILE File, RTFMODE fMode); 748 746 749 747 /** … … 757 755 * and exists to complement RTFileSetMode(). 758 756 */ 759 RT R3DECL(int) RTFileGetMode(RTFILE File, uint32_t *pfMode);757 RTDECL(int) RTFileGetMode(RTFILE File, uint32_t *pfMode); 760 758 761 759 /** … … 769 767 * unchanged. 770 768 */ 771 RT R3DECL(int) RTFileSetOwner(RTFILE File, uint32_t uid, uint32_t gid);769 RTDECL(int) RTFileSetOwner(RTFILE File, uint32_t uid, uint32_t gid); 772 770 773 771 /** … … 781 779 * @remark This is wrapper around RTFileQueryInfo() and exists to complement RTFileGetOwner(). 782 780 */ 783 RT R3DECL(int) RTFileGetOwner(RTFILE File, uint32_t *pUid, uint32_t *pGid);781 RTDECL(int) RTFileGetOwner(RTFILE File, uint32_t *pUid, uint32_t *pGid); 784 782 785 783 /** … … 800 798 * @param piRet Return value of the IOCTL request. 801 799 */ 802 RT R3DECL(int) RTFileIoCtl(RTFILE File, unsigned long ulRequest, void *pvData, unsigned cbData, int *piRet);800 RTDECL(int) RTFileIoCtl(RTFILE File, unsigned long ulRequest, void *pvData, unsigned cbData, int *piRet); 803 801 804 802 /** … … 817 815 * @sa RTFsQuerySizes 818 816 */ 819 RT R3DECL(int) RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree,820 817 RTDECL(int) RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree, 818 uint32_t *pcbBlock, uint32_t *pcbSector); 821 819 822 820 /** … … 913 911 914 912 913 #ifdef IN_RING3 914 915 915 /** @page pg_rt_asyncio RT File async I/O API 916 916 *
Note:
See TracChangeset
for help on using the changeset viewer.