Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Data Types
[RtFSyst]


Data Structures

struct  _rtInt64
struct  RtFile
struct  RtFileSystem
struct  RtFileSystemFileFunctionTable
union  RtInt64

Defines

#define RTFS_MAX_NAME_LENGTH   5
#define RtFileSystemGetFilePosition(_file)   _GetPosition(_file)
#define RtFileSystemGetFileSize(_file)   _GetSize(_file)
#define RtFileSystemGetFileLastError(_file)   (((RtFile *)_file)->error)
#define RtFileSystemGetFileStatus(_file)   (((RtFile *)_file)->status)

Typedefs

typedef RtFileSystemError(* RtFileOpenFunc )(RtFileSystem *fs, RtFile *file, const RwChar *filename, RwUInt32 flags)
typedef void(* RtFileCloseFunc )(RtFile *file)
typedef RwUInt32(* RtFileReadFunc )(RtFile *file, void *pBuffer, RwUInt32 nBytes)
typedef RwUInt32(* RtFileWriteFunc )(RtFile *file, const void *pBuffer, RwUInt32 nBytes)
typedef RtInt64(* RtFileSetPositionFunc )(RtFile *file, RwInt32 nOffset, RtFileSeekMethod fPosition)
typedef RtFileStatus(* RtFileSyncFunc )(RtFile *file, RwBool block)
typedef RwBool(* RtFileAbortFunc )(RtFile *file)
typedef RwBool(* RtFileEofFunc )(RtFile *file)
typedef RtFile *(* RtFileSystemGetFileFunc )(RtFileSystem *fs, RwUInt32 index)
typedef RwChar *(* RtFileSystemGetDeviceNameFunc )(RtFileSystem *fs)
typedef RtFileStatus(* RtFileGetStatusFunc )(RtFile *file)
typedef RwBool(* RtFileExistsFunc )(RtFileSystem *fs, const RwChar *fileName)
typedef void(* RtFileSystemCloseFunc )(RtFileSystem *fs)
typedef void(* RtFileSystemCallBack )(RwChar *fsName)

Enumerations

enum  RtFileAccessFlag {
  RTFILE_ACCESS_OPEN_READ = 0x1, RTFILE_ACCESS_OPEN_WRITE = 0x2, RTFILE_ACCESS_OPEN_CREATE = 0x4, RTFILE_ACCESS_OPEN_APPEND = 0x8,
  RTFILE_ACCESS_OPEN_ASYNC = 0x10, RTFILE_ACCESS_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFileSystemStatus {
  RTFS_STATUS_NOTREADY = 0x01, RTFS_STATUS_READY, RTFS_STATUS_DOOROPEN, RTFS_STATUS_NOMEDIA,
  RTFS_STATUS_WRONGMEDIA, RTFS_STATUS_RETRYING, RTFS_STATUS_FATAL, RTFS_STATUS_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFileError {
  RTFILE_ERROR_NOERROR = 0x01, RTFILE_ERROR_FILESYSTEM, RTFILE_ERROR_FILE, RTFILE_ERROR_DISKFULL,
  RTFILE_ERROR_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFileSystemError {
  RTFS_ERROR_NOERROR = 0x01, RTFS_ERROR_TOOMANYFILESYSTEMS, RTFS_ERROR_FILENOTFOUND, RTFS_ERROR_WRITEPROTECTED,
  RTFS_ERROR_FILENAMETOOLONG, RTFS_ERROR_FILESYSTEMNAMEINUSE, RTFS_ERROR_FILESYSTEMDEVICENAMEREGISTERED, RTFS_ERROR_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFSFileOperation {
  RTFS_FILEOP_NONE = 0x01, RTFS_FILEOP_OPEN, RTFS_FILEOP_CLOSE, RTFS_FILEOP_SEEK,
  RTFS_FILEOP_READ, RTFS_FILEOP_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFileSeekMethod { RTFILE_POS_BEGIN = 0x01, RTFILE_POS_CURRENT, RTFILE_POS_END, RTFILE_POS_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum  RtFileStatus {
  RTFILE_STATUS_CLOSED = 0x01, RTFILE_STATUS_READY, RTFILE_STATUS_BUSY, RTFILE_STATUS_ERROR,
  RTFILE_STATUS_OPENING, RTFILE_STATUS_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum  RtFileSystemCallBackCode { RTFS_CALLBACKCODE_FSREGISTER = 0x01, RTFS_CALLBACKCODE_FSUNREGISTER, RTFS_CALLBACKCODE_TYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }

Detailed Description

RenderWare File System Data Types.

Define Documentation

#define RtFileSystemGetFileLastError _file       (((RtFile *)_file)->error)
 

RtFileSystemGetFileLastError returns the last set file error. _file must be a pointer to a valid RtFile.

#define RtFileSystemGetFilePosition _file       _GetPosition(_file)
 

RtFileSystemGetFilePosition returns the file position as a RwInt32. _file must be a pointer to a valid RtFile.

#define RtFileSystemGetFileSize _file       _GetSize(_file)
 

RtFileSystemGetFileSize returns the file size as a RwInt32. _file must be a pointer to a valid RtFile.

#define RtFileSystemGetFileStatus _file       (((RtFile *)_file)->status)
 

RtFileSystemGetFileStatus returns the current file status. _file must be a pointer to a valid RtFile.

#define RTFS_MAX_NAME_LENGTH   5
 

RTFS_MAX_NAME_LENGTH is the maximum length of a file system name. The file system name passed to any OS specific file system must not exceed RTFS_MAX_NAME_LENGTH (please refer to the OS specific documentation for more information).


Typedef Documentation

typedef RwBool(* RtFileAbortFunc)( RtFile *file )
 

RtFileAbortFunc represents the function used to cancel any outstanding asynchronous operation as rapidly as possible.

Parameters:
file  The file object used.
Returns:
TRUE if successful, FALSE otherwise.

typedef void(* RtFileCloseFunc)( RtFile *file )
 

RtFileCloseFunc represents the function used to close a specific file in a defined file system.

Parameters:
file  The file object used to open the file.

typedef RwBool(* RtFileEofFunc)( RtFile *file )
 

RtFileEofFunc represents the function used to determine whether the file pointer is at the end of the file.

Parameters:
file  The file object used.
Returns:
TRUE if EOF, FALSE otherwise.

typedef RwBool(* RtFileExistsFunc)( RtFileSystem *fs, const RwChar *fileName )
 

RtFileExistsFunc represents the function used to determine whether a file exists.

This function must be implemented by any custom file system.

Parameters:
fs  The file system on which to check whether the file exists.
fileName  Name of the file to check.
Returns:
TRUE if the file exists, FALSE otherwise

typedef RtFileStatus(* RtFileGetStatusFunc)( RtFile *file )
 

RtFileGetStatusFunc returns the status of this file system. This is used in asynchronous mode.

Returns:
The file system status.

typedef RtFileSystemError(* RtFileOpenFunc)( RtFileSystem *fs, RtFile *file, const RwChar *filename, RwUInt32 flags)
 

RtFileOpenFunc represents the function used to open a specific file in a defined file system.

Parameters:
fs  The file system on which this file will be opened.
file  The file object used to open the file.
filename  Name of the file.
flags  Flags used to open the file.
Returns:
An error if the open operation failed, or RTFS_ERROR_NOERROR on success.

typedef RwUInt32(* RtFileReadFunc)( RtFile *file, void *pBuffer, RwUInt32 nBytes )
 

RtFileReadFunc represents the function used to read a file.

Parameters:
file  The file object used to open the file.
pBuffer  The buffer used to read the file.
nBytes  The number of bytes to used to read the file.
Returns:
The number of bytes read.

typedef RtInt64(* RtFileSetPositionFunc)( RtFile *file, RwInt32 nOffset, RtFileSeekMethod fPosition)
 

RtFileSetPositionFunc represents the function used to set the pointer position in a file.

Parameters:
file  The file object .
nOffset  File offset.
fPosition  Position to calculate the actual offset from. RtFile RtFileSeekMethod
Returns:
The new file position

typedef RtFileStatus(* RtFileSyncFunc)( RtFile *file, RwBool block )
 

RtFileSyncFunc represents the function used to determine whether an operation is complete (blocking if necessary).

Parameters:
file  The file object used.
block  TRUE if blocking, FALSE otherwise. RtFile
Returns:
The file status
See also:
RtFileStatus

typedef void(* RtFileSystemCallBack)( RwChar *fsName )
 

RtFileSystemCallBack is the generic file system callback function prototype. The file system currently allows you to set a callback that will be triggered on file system registration and unregistration (see RtFileSystemCallBackCode).

Parameters:
fsName  The file system name.

typedef void(* RtFileSystemCloseFunc)( RtFileSystem *fs )
 

RtFileSystemCloseFunc represents the function used to close a file system.
This function must be implemented by any custom file system.

Parameters:
fs  The file system to close.

typedef RwChar*(* RtFileSystemGetDeviceNameFunc)( RtFileSystem *fs )
 

RtFileSystemGetDeviceNameFunc represents the function used to get a specific device name from a file system.

This function must be implemented by any custom file system.

Parameters:
fs  The file system to get the file from (note that there may. be several of the same file systems registered, with different names and device names).
Returns:
The device name.

typedef RtFile*(* RtFileSystemGetFileFunc)( RtFileSystem *fs, RwUInt32 index )
 

RtFileSystemGetFileFunc represents the function used to get a file object from a specific file system.

This function must be implemented by any custom file system.

Parameters:
fs  The file system to get the file from (note that there may. be several of the same file systems registered, with different names and device names).
index  Index from which to get the object.
Returns:
A pointer to an available RtFile object, NULL otherwise.

typedef RwUInt32(* RtFileWriteFunc)( RtFile *file, const void *pBuffer, RwUInt32 nBytes )
 

RtFileWriteFunc represents the function used to write to a file.

Parameters:
file  The file object used to write to the file.
pBuffer  The buffer used to read the file to the file.
nBytes  The number of bytes used to write to the file.
Returns:
Returns The number of bytes written to the file.


Enumeration Type Documentation

enum RtFileAccessFlag
 

RtFileAccessFlag File Access Flags.

Enumeration values:
RTFILE_ACCESS_OPEN_READ  Flag specifying that a file will be opened in read mode.
RTFILE_ACCESS_OPEN_WRITE  Flag specifying that a file will be opened in write mode.
RTFILE_ACCESS_OPEN_CREATE  Flag specifying that a file will be created if it does not exist.
RTFILE_ACCESS_OPEN_APPEND  Flag specifying that all write will be appended to the file.
RTFILE_ACCESS_OPEN_ASYNC  Flag specifying that all write will be appended to the file.

enum RtFileError
 

RtFileError File Error Codes.

Enumeration values:
RTFILE_ERROR_NOERROR  The last operation completed successfully.
RTFILE_ERROR_FILESYSTEM  The last operation failed because of a file system error.
RTFILE_ERROR_FILE  The last operation failed because of an internal error with this file.
RTFILE_ERROR_DISKFULL  The last write operation failed because the disk was full.

enum RtFileSeekMethod
 

RtFileSeekMethod File System Seek Method.

Enumeration values:
RTFILE_POS_BEGIN  Seek from the start of the file.
RTFILE_POS_CURRENT  Seek from the current file pointer position.
RTFILE_POS_END  Seek from the end of the file.

enum RtFileStatus
 

RtFileStatus File System Status.

Enumeration values:
RTFILE_STATUS_CLOSED  The file is not in use.
RTFILE_STATUS_READY  The file is ready to accept commands.
RTFILE_STATUS_BUSY  The file is performing an operation.
RTFILE_STATUS_ERROR  The last command did not complete successfully, use GetLastError to determine the error. However, the file is ready to accept commands.
RTFILE_STATUS_OPENING  The file is in the process of being opened

enum RtFileSystemCallBackCode
 

RtFileSystemCallBackCode represents the file system callback codes.

See also:
RtFileSystemSetCallBack
Enumeration values:
RTFS_CALLBACKCODE_FSREGISTER  File system registration callback code. This callback will be triggered when a file system is registered successfully. This typically happens during a call to RtFSManagerRegister.
RTFS_CALLBACKCODE_FSUNREGISTER  File system unregistration callback code. This callback will be triggered when a file system is unregistered. This typically happens during a call to RtFSManagerUnregister.

enum RtFileSystemError
 

RtFileSystemError File System Error Codes.

Enumeration values:
RTFS_ERROR_NOERROR  No error
RTFS_ERROR_TOOMANYFILESYSTEMS  Too many file systems have been registered (set during file system initialization).
RTFS_ERROR_FILENOTFOUND  File not found error (set during a file open operation).
RTFS_ERROR_WRITEPROTECTED  Write protected device (set during a file open operation).
RTFS_ERROR_FILENAMETOOLONG  File name is too long (set during a file open operation).
RTFS_ERROR_FILESYSTEMNAMEINUSE  The file system name is already in use (set during file system initialization).
RTFS_ERROR_FILESYSTEMDEVICENAMEREGISTERED  A file system has already been registered for this device name

enum RtFileSystemStatus
 

RtFileSystemStatus File System Status Codes.

Enumeration values:
RTFS_STATUS_NOTREADY  The file system is not ready.
RTFS_STATUS_READY  The file system is ready to accept commands.
RTFS_STATUS_DOOROPEN  The drive door is detected as being open.
RTFS_STATUS_NOMEDIA  There is no disc in the drive.
RTFS_STATUS_WRONGMEDIA  The wrong disc is in the drive.
RTFS_STATUS_RETRYING  The filesystem is having problems completing an operation.
RTFS_STATUS_FATAL  Fatal Error

enum RtFSFileOperation
 

RtFSFileOperation File System Operations. These are passed to the outstanding operation callback for each asynchronous operation.

Enumeration values:
RTFS_FILEOP_NONE  There are no outstanding operations.
RTFS_FILEOP_OPEN  Notifies an open operation.
RTFS_FILEOP_CLOSE  Notifies an close operation.
RTFS_FILEOP_SEEK  Notifies a seek operation.
RTFS_FILEOP_READ  Notifies a read operation.


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:10 2004. Send Feedback