#include <nitro/fs.h>
typedef enum
{
FS_RESULT_SUCCESS = 0,
FS_RESULT_FAILURE,
FS_RESULT_BUSY,
FS_RESULT_CANCELED,
FS_RESULT_UNSUPPORTED,
FS_RESULT_ERROR,
FS_RESULT_PROC_ASYNC,
FS_RESULT_PROC_DEFAULT,
FS_RESULT_PROC_UNKNOWN
} FSResult;
These are the enumerator types representing the results of the file system API and the user procedures of the archive.
They are defined as follows.
The following are used both for execution results of API and for user procedure return values. | |
FS_RESULT_SUCCESS | Indicates success in correctly processing results. Example: FS_ReadFile attempts to read file, foo.dat , which contains 100 BYTE s of data… but reached the end after only being able to read 50 BYTE s, this is normal behavior and so is treated as a "success". |
FS_RESULT_FAILURE | Indicates failure to correctly process results. Example: This indicates a failure in the expected return value for the process when you have read to the end using FS_ReadDir function. |
FS_RESULT_ERROR | Indicates failure in the results where a detectable error occurred during processing. Indicates an unrecognized error, such as a problem in the argument range, or the occurrence of a NULL pointer during processing. |
FS_RESULT_UNSUPPORTED | Indicates that the archive is not supported by the specified command. This error occurs when an unsupported archive is explicitly returned as a return value of a user procedure. The user must understand the particular specifications of the target archive. |
The following are only returned as the results of API execution. |
|
FS_RESULT_BUSY | Indicates that the current command is busy. Strictly speaking, this is not an error because the operation is incomplete. However, we have included this with the errors for the sake of convenience. |
FS_RESULT_CANCELED | Indicates that the command was canceled. There are two types of cancels: explicit command cancel by the user forced cancel during archive unload |
The following are used only as user procedure return values: |
|
FS_RESULT_PROC_ASYNC | Return value when the user procedure returns a temporary control for asynchronous processing. When this value is returned, you must notify the read/write callback as well as the process completion using the FS_NotifyArchiveAsyncEnd function. |
FS_RESULT_PROC_DEFAULT | The default return value passed to a user procedure. This is the value passed unless a different value/type is called expicitly. The user procedure for the corresponding command will be called the next time as well. If you simply want to hook a command, this value is returned every time. |
FS_RESULT_PROC_UNKNOWN | The default return value passed to a user procedure when the procedure call flag to the associated command is canceled. The command will not be called again. |
FSArchive FS_ARCHIVE_PROC_FUNC
FS_SetArchiveProc
07/12/2004 Added enumerators and their descriptions
07/01/2004 Initial version