/*************************************************************************

	formZ by autodessys, Inc.
	Copyright c 1994 autodessys, Inc.  All rights reserved.
	
	
	File :	fz_iost_api.h
	
	By :	Tim Hanes
	
	Created on :  		21 Aug 2002
	Last Updated on :  	21 Aug 2002
	
	Description :	
					
***************************************************************************/

#ifndef __FORMZ_IOST_API_H
#define __FORMZ_IOST_API_H 1


#include "fzpl_plugin.h"
#include "fz_type_api.h"

#ifdef __cplusplus
extern "C" {
#endif

/* @doc EXTERNAL FZ_IOST */
/********************************************************************************************************

	@module IO Stream

	@desc	formZ IO stream functions.
			This is a set of general stream IO functions.  Although only file
			IO os currently implemented, this may later be extended to handle
			IO to blocks of memory, network sockets, or some other streaming
			device.  Each IO function os capable of reading and writing.  Which
			operation a function performs depends on how the iost was created. <nl>

			The IO streams handle byte swapping where appropriate.<nl>
			All functions follow the same form. <nl>
				- They return an error code (fzrt_error_td). <nl>
				- The first parameter is iost. <nl>
				- The second parameter is a pointer to the data. <nl>
				- The third parameter is count of data items. <nl>
			The iost functions reads/write IFF style streams. <nl>
				- The stream of data has a header (ID, size). <nl>
				- Each block of data has a header (ID, version, size). <nl>
				- Each block of data can be independently versioned. <nl>
				- Data blocks can be nested. <nl>
				- Blocks can be individually versioned. <nl>
				- UUIDs are used for block id's.  These id's are used to
					determine what kind of data is in the block.  This id will
					usually match the id of the plugin, tool, etc that wrote the data.

	@toc	fz_iost

***************************************************************************/



/********************************************************************************************************

	@enum

	@desc	formZ file IO direction.  Specifies whether file IO is read or write.
			
	@avail	5.0.0.0

	@toc	fz_iost

*********************************************************************************************************/
typedef enum fz_io_direction_td_enum
{
	FZ_IO_DIR_READ = 0,		/* @emem file read */
	FZ_IO_DIR_WRITE			/* @emem file write */

}	fz_io_direction_td_enum;

/********************************************************************************************************

	@def
	
	@desc	No IOST flags are set.
			
	@avail	5.0.0.0

	@toc	fz_iost

*********************************************************************************************************/
#define FZ_IOST_FLAGS_NONE	0

/********************************************************************************************************

	@enum

	@desc	formZ file IO Stream direction.
			Specifies whether file IO Stream is read or write.
			
	@avail	5.0.0.0

	@toc	fz_iost

*********************************************************************************************************/
typedef enum fz_iost_dir_td_enum
{
	FZ_IOST_READ=0,		/* @emem file read */
	FZ_IOST_WRITE		/* @emem file write */
}	fz_iost_dir_td_enum;



/************************************************************************

	@fsfunc_t

	@desc		Opens a file as an IO stream for writing.
				The file name should be pathless.  It will thus reside in the current
				working directory (set by fzrt_file_vspec_set_crnt).  This will avoid
				any platform dependencies on path strings.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@see		fz_iost_file_open_read, fz_iost_file_close

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_file_open_write_func)(
			fzrt_floc_ptr		floc,			/* @parm <in> | The file location for the file . */
			fzrt_int				flags,			/* @parm <in> | IOST flags.  Must be FZ_IOST_FLAGS_NONE. */
			fz_iost_ptr			*iost_ptr,		/* @parm <out> | The created IO stream. */
			fzrt_unsigned_int		version,		/* @parm <in> | The version to write to the stream's header. */
			char 				endian			/* @parm <in> | The endianness of the data to be written to the stream. */
			);

/************************************************************************

	@fsfunc_t

	@desc		Opens a file as an IO stream for reading.
				The file name should be pathless.  It will thus reside in the current
				working directory (set by fzrt_file_vspec_set_crnt).  This will avoid
				any platform dependencies on path strings.


	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@see		fz_iost_file_open_write, fz_iost_file_close

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_file_open_read_func)(
			fzrt_floc_ptr		floc,			/* @parm <in> | The file location for the file. */
			fzrt_int				flags,			/* @parm <in> | IOST flags.  Must be FZ_IOST_FLAGS_NONE. */
			fz_iost_ptr			*iost_ptr,		/* @parm <out> | The created IO stream. */
			fzrt_unsigned_int		*version,		/* @parm <out_opt> | The version read from the stream's header. */
			char 				*endian			/* @parm <out_opt> | The endianness of the data to in the stream. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Closes an IO stream.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@see		fz_iost_file_open_write, fz_iost_file_open_read

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_file_close_func)(
			fz_iost_ptr	*iost				/* @parm <in> | The IO stream. */
			);

#if 0 /* NOT READY YET */
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_memory_open_write_func)(char *fname, fzrt_volm_spec_td *vspec, fzrt_int flags, fz_iost_ptr *iost_ptr);
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_memory_open_read_func)(char *fname, fzrt_volm_spec_td *vspec, fzrt_int flags, fz_iost_ptr *iost);
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_memory_get_data_func)(iost_ptr iost, void *data, fzrt_unsigned_int *size);
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_memory_close_func)(fz_iost_ptr *iost);
#endif /* 0 */


/************************************************************************

	@fsfunc_t

	@desc		Starts writing an IO stream block.
				This function must be called at the beginning of writing each 
				block of data.  This will set the blocks id and version.  After
				the data os written, fz_iost_block_write_end must be called.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_block_write_start_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_UUID_td	block_id,		/* @parm <in> | The id of the block. */
			fzpl_vers_td	version			/* @parm <out> | The version of the block. */
			);

/************************************************************************

	@fsfunc_t

	@desc		Ends writing an IO stream block.
				This is called at the conclusion of writing a block of data.
				This function will go back to the block header (determined by
				the block id)and insert the size.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_block_write_end_func)(
			fz_iost_ptr		iost,				/* @parm <in> | The IO stream. */
			fzrt_UUID_td	block_id,			/* @parm <in> | The id of the block. */
			fzpl_vers_td	version				/* @parm <out> | The version of the block. */
			);		/* TAH 10/11/02 */


/************************************************************************

	@fsfunc_t

	@desc		Starts reading an IO stream block.
				This function must be called at the beginning of reading each 
				block of data.  This function reads the header of a data block.
				After the data os read, fz_iost_block_read_end must be called.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_block_read_start_func)(
			fz_iost_ptr		iost,				/* @parm <in> | The IO stream. */
			fzrt_UUID_td	block_id,			/* @parm <out> | The id of the block. */
			fzrt_unsigned_int	*block_size,		/* @parm <out> | The size of the block. */
			fzpl_vers_td	*version			/* @parm <out> | The version of the block. */
			);		/* TAH 02/19/03 */

/************************************************************************

	@fsfunc_t

	@desc		Ends reading an IO stream block.
				This function must be called at the conclusion of reading each 
				block of data.  This function checks that we haven't read past
				the end of the block; if so it returns and error.
				It also checks that we have read the whole block; if it not skips
				ahead to beginning of next block.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_block_read_end_func)(
			fz_iost_ptr		iost			/* @parm <in> | The IO stream. */
			);	

/************************************************************************

	@fsfunc_t
	
	@desc		Gets the size of an IO stream block header.

	@return		The size of an IO stream block header.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_unsigned_int	 (FZRT_SPEC *fz_iost_block_header_size_func)(
			fz_iost_ptr	iost		/* @parm <in> | The IO stream. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Skips the the current block.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_block_skip_func)(
			fz_iost_ptr	iost,				/* @parm <in> | The IO stream. */
			fzrt_int		block_size			/* @parm <in> | The number of bytes to skip. */
			);

/************************************************************************

	@fsfunc_t

	@desc		Gets the byte order of the IO stream.
				Gets the byte order of the IO stream.  This value, file_endian will be
				either FZ_ENDIAN_SMALL or FZ_ENDIAN_BIG.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_get_endian_func)(
			fz_iost_ptr	iost,				/* @parm <in> | The IO stream. */
			char		*file_endian		/* @parm <out> | The byte order. Must be allocated by the caller. */
			);

/************************************************************************

	@fsfunc_t

	@desc		Sets the byte order of the IO stream to be written.
				Sets the byte order of the IO stream to be written to
				either FZ_ENDIAN_SMALL or FZ_ENDIAN_BIG.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_set_endian_func)(
			fz_iost_ptr	iost,				/* @parm <in> | The IO stream. */
			char		file_endian			/* @parm <out> | The byte order. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Gets the version of the IO stream.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_get_version_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzpl_vers_td	*version		/* @parm <out> | The version. Must be allocated by the caller. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Sets the version of the IO stream to be written.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_set_version_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzpl_vers_td	version			/* @parm <out> | The version. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Gets the IO direction of an IO stream.
				Used to determine if an IO stream was created for read or write.
				The direction will be either FZ_IOST_READ or FZ_IOST_WRITE.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_get_dir_func)(
			fz_iost_ptr			iost,			/* @parm <in> | The IO stream. */
			fz_iost_dir_td_enum		*dir			/* @parm <out> | The direction. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Gets the size of the IO stream.
				TODO.  This function currently always returns 0.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_get_size_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_unsigned_int	*size			/* @parm <out> | The size. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		boolean value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_boolean_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_boolean	*data,			/* @parm <in> | A pointer to a boolean value or an array of boolean values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of boolean values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Single byte signed integer (signed char) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_char_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			char			*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Single byte unsigned integer (unsigned char) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_uchar_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			unsigned char	*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte signed integer (short) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_short_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			short			*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte unsigned integer (unsigned short) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_ushort_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			unsigned short	*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Four byte signed integer (fzrt_int) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_int_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_int			*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Four byte unsigned integer (fzrt_unsigned_int) value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_uint_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_unsigned_int	*data,			/* @parm <in> | A pointer to a integer value or an array of integer values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of integer values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision floating point value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			float			*data,			/* @parm <in> | A pointer to a single precision value or an array of single precision values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of single precision values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision floating point value IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_double_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			double			*data,			/* @parm <in> | A pointer to a double precision value or an array of double precision values. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of double precision values. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 2D x,y coordinate IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xy_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_td			*data,			/* @parm <in> | A pointer to a coordinate or an array of coordinates. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of coordinates. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 3D x,y,z coordinate IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xyz_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_td			*data,			/* @parm <in> | A pointer to a coordinate or an array of coordinates. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of coordinates. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 4D x,y,z,w coordinate IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xyzw_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyzw_td			*data,			/* @parm <in> | A pointer to a coordinate or an array of coordinates. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of coordinates. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		2D x,y minimum/maximum pair IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xy_mm_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_mm_td		*data,			/* @parm <in> | A pointer to a min/max pair or an array of min/max pairs. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of min/max pairs. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		3D x,y,z minimum/maximum pair IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xyz_mm_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_mm_td		*data,			/* @parm <in> | A pointer to a min/max pair or an array of min/max pairs. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of min/max pairs. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision 2D x,y coordinate IO.
				TODO - do we want to exposet this?  Should we just expose the 
				double precision types only?

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xy_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_float_td		*data,			/* @parm <in> | A pointer to a coordinate or an array of coordinates. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of coordinates. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision 3D x,y,z coordinate IO.
				TODO - do we want to expose this?  Should we just expose the 
				double precision types only?

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_xyz_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_float_td	*data,			/* @parm <in> | A pointer to a coordinate or an array of coordinates. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of coordinates. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Plane equation IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_equ_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_plane_equ_td			*data,			/* @parm <in> | A pointer to a plane equation or an array of plane equations. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of plane equations. */
			);


/************************************************************************

	@fsfunc_t
	
	@desc		Single byte (unsigned char) RGB color IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_rgb_uchar_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_rgb_uchar_td	*data,			/* @parm <in> | A pointer to a color or an array of colors. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of colors. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte (short) RGB color IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_rgb_ushort_func)(
			fz_iost_ptr iost,			/* @parm <in> | The IO stream. */
			fz_rgb_ushort_td *data,		/* @parm <in> | A pointer to a color or an array of colors. */
			fzrt_unsigned_int ndata			/* @parm <in> | The number of colors. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Floating point RGB color IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_rgb_float_func)(
			fz_iost_ptr iost,			/* @parm <in> | The IO stream. */
			fz_rgb_float_td *data,			/* @parm <in> | A pointer to a color or an array of colors. */
			fzrt_unsigned_int ndata			/* @parm <in> | The number of colors. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		UUID IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_uuid_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_UUID_td	*data,			/* @parm <in> | A pointer to a UUID or an array of UUIDs. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of UUIDs. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		4char IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_4char_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_4char_td		*data,			/* @parm <in> | A pointer to a 4char or an array of 4chars. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of 4chars. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		String IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_string_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_string_td	*data,			/* @parm <in> | A pointer to a string or an array of strings. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of strings. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Point IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_pnt_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_point		*data,			/* @parm <in> | A pointer to a point or an array of points. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of points. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Rectangle IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_rect_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_rect		*data,			/* @parm <in> | A pointer to a rectangle or an array of rectangles. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of rectangles. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		4x4 matrix IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_mat4x4_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_mat4x4_td	*data,			/* @parm <in> | A pointer to a 4x4 matrix or an array of 4x4 matrices. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of 4x4 matrices. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		3x3 matrix IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_mat3x3_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_mat3x3_td	*data,			/* @parm <in> | A pointer to a 3x3 matrix or an array of 3x3 matrices. */
			fzrt_unsigned_int	ndata			/* @parm <in> | The number of 3x3 matrices. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		File Spec IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_floc_func)(
			fz_iost_ptr			iost,		/* @parm <in> | The IO stream. */
			fzrt_floc_ptr	  	*floc,		/* @parm <in> | A pointer to a volume spec or an array of file specs. */
			fzrt_unsigned_int		ndata		/* @parm <in> | The number of file specs. */
			);		/* TAH 09/19/02 */

/************************************************************************

	@fsfunc_t
	
	@desc		boolean value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_boolean_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_boolean	*data			/* @parm <in> | A pointer to a boolean value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Single byte signed integer (signed char) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_char_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			char			*data			/* @parm <in> | A pointer to a integer value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Single byte unsigned integer (unsigned char) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_uchar_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			unsigned char	*data			/* @parm <in> | A pointer to a integer value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte signed integer (short) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_short_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			short			*data			/* @parm <in> | A pointer to a integer value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte unsigned integer (unsigned short) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_ushort_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			unsigned short	*data			/* @parm <in> | A pointer to a integer value. */
			);


/************************************************************************

	@fsfunc_t
	
	@desc		Four byte signed integer (fzrt_int) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_int_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_int			*data			/* @parm <in> | A pointer to a integer value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Four byte unsigned integer (fzrt_unsigned_int) value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_uint_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_unsigned_int	*data			/* @parm <in> | A pointer to a integer value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision floating point value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			float			*data			/* @parm <in> | A pointer to a single precision value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision floating point value IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_double_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			double			*data			/* @parm <in> | A pointer to a double precision value. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 2D x,y coordinate IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xy_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_td			*data			/* @parm <in> | A pointer to a coordinate. */

			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 3D x,y,z coordinate IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xyz_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_td			*data			/* @parm <in> | A pointer to a coordinate. */

			);

/************************************************************************

	@fsfunc_t
	
	@desc		double precision 4D x,y,z,w coordinate IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xyzw_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyzw_td			*data			/* @parm <in> | A pointer to a coordinate. */

			);

/************************************************************************

	@fsfunc_t
	
	@desc		2D x,y minimum/maximum pair IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xy_mm_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_mm_td		*data			/* @parm <in> | A pointer to a min/max pair. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		3D x,y,z minimum/maximum pair IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xyz_mm_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_mm_td		*data			/* @parm <in> | A pointer to a min/max pair. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision 2D x,y coordinate IO for one item.
				TODO - do we want to exposet this?  Should we just expose the 
				double precision types only?

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xy_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xy_float_td		*data			/* @parm <in> | A pointer to a coordinate. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		single precision 3D x,y,z coordinate IO for one item.
				TODO - do we want to expose this?  Should we just expose the 
				double precision types only?

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_xyz_float_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_xyz_float_td	*data			/* @parm <in> | A pointer to a coordinate. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Plane equation IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_equ_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_plane_equ_td			*data			/* @parm <in> | A pointer to a plane equation. */
			);


/************************************************************************

	@fsfunc_t
	
	@desc		Single byte (unsigned char) RGB color IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_rgb_uchar_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_rgb_uchar_td	*data			/* @parm <in> | A pointer to a color. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Two byte (short) RGB color IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_rgb_ushort_func)(
			fz_iost_ptr iost,			/* @parm <in> | The IO stream. */
			fz_rgb_ushort_td *data			/* @parm <in> | A pointer to a color. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Floating point RGB color IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_rgb_float_func)(
			fz_iost_ptr iost,			/* @parm <in> | The IO stream. */
			fz_rgb_float_td *data			/* @parm <in> | A pointer to a color. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		UUID IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_uuid_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_UUID_td	*data			/* @parm <in> | A pointer to a UUID. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		4char IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_4char_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_4char_td		*data			/* @parm <in> | A pointer to a 4char. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		String IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_string_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_string_td	*data			/* @parm <in> | A pointer to a string. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Point IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_pnt_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_point		*data			/* @parm <in> | A pointer to a point. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Rectangle IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_rect_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_rect		*data			/* @parm <in> | A pointer to a rectangle. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		4x4 matrix IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_mat4x4_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_mat4x4_td	*data			/* @parm <in> | A pointer to a 4x4 matrix. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		3x3 matrix IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_mat3x3_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fz_mat3x3_td	*data			/* @parm <in> | A pointer to a 3x3 matrix. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		File Spec IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_floc_func)(
			fz_iost_ptr			iost,		/* @parm <in> | The IO stream. */
			fzrt_floc_ptr	  	*floc		/* @parm <in> | A pointer to a volume spec. */
			);		/* TAH 09/19/02 */

/************************************************************************

	@fsfunc_t
	
	@desc		map plane IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_map_plane_func)(
			fz_iost_ptr			iost,			/* @parm <in> | The IO stream. */
			fz_map_plane_td	  	*map_plane,		/* @parm <in> | A pointer to an array of mapping planes. */
			fzrt_unsigned_int		ndata			/* @parm <in> | The number of mapping planes. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Mapping plane IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_map_plane_func)(
			fz_iost_ptr			iost,			/* @parm <in> | The IO stream. */
			fz_map_plane_td		*map_plane		/* @parm <in> | A pointer to a mapping plane. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		tag IO.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_tag_func)(
			fz_iost_ptr			iost,			/* @parm <in> | The IO stream. */
			fz_tag_td	  		*tag,			/* @parm <in> | A pointer to an array of tags. */
			fzrt_unsigned_int		ndata			/* @parm <in> | The number of tags. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		Tag IO for one item.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.0.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_one_tag_func)(
			fz_iost_ptr			iost,			/* @parm <in> | The IO stream. */
			fz_tag_td			*tag			/* @parm <in> | A pointer to a tag. */
			);

/************************************************************************

	@fsfunc_t
	
	@desc		IO for a given number of bytes. The byte data is written
				and read in the same order. That is, no endian swapping
				is performed if the data is written / read on platforms
				with different byte ordering.

	@return		FZRT_NOERR on success.  Otherwise, an error code.

	@avail		5.5.0.0

	@toc		fz_iost

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_iost_bytes_func)(
			fz_iost_ptr		iost,			/* @parm <in> | The IO stream. */
			fzrt_ptr		bytes,			/* @parm <in> | A pointer to a block of bytes in memory. */
			fzrt_unsigned_int	nbytes			/* @parm <in> | The number of bytes. */
			);

/************************************************************************

	@fset	fz_iost_fset
	
	@desc	formZ IO stream Function Set

	@avail	5.0.0.0

	@toc	fz_iost

*************************************************************************/

/********************************************************************************************************

	@fsdef	formZ IO stream function set UUID.

*********************************************************************************************************/
/* UUID : {b21cf154-c20d-4f65-881b-ba8335c7a78e} */
#define FZ_IOST_FSET_TYPE			"\xb2\x1c\xf1\x54\xc2\x0d\x4f\x65\x88\x1b\xba\x83\x35\xc7\xa7\x8e"	/* Reference : 1242 */
/********************************************************************************************************

	@fsdef	formZ IO stream function set name.

*********************************************************************************************************/
#define FZ_IOST_FSET_NAME			"formZ io stream funcs"
/********************************************************************************************************

	@fsdef	formZ IO stream function set version.

*********************************************************************************************************/
#define FZ_IOST_FSET_VERSION		FZPL_VERS_MAKE(5,5,0,0)

typedef struct fz_iost_fset
{
	fzpl_fset_prvt_data_td				prvt_data;

	fz_iost_file_open_write_func		fz_iost_file_open_write;	/* @fsfunc */
	fz_iost_file_open_read_func			fz_iost_file_open_read;		/* @fsfunc */
	fz_iost_file_close_func				fz_iost_file_close;			/* @fsfunc */

	fz_iost_block_write_start_func		fz_iost_block_write_start;	/* @fsfunc */
	fz_iost_block_write_end_func		fz_iost_block_write_end;	/* @fsfunc */

	fz_iost_block_read_start_func		fz_iost_block_read_start;	/* @fsfunc */
	fz_iost_block_read_end_func			fz_iost_block_read_end;		/* @fsfunc */
	fz_iost_block_header_size_func		fz_iost_block_header_size;	/* @fsfunc */
	fz_iost_block_skip_func				fz_iost_block_skip;			/* @fsfunc */

	fz_iost_get_endian_func				fz_iost_get_endian;			/* @fsfunc */
	fz_iost_set_endian_func				fz_iost_set_endian;			/* @fsfunc */
	fz_iost_get_version_func			fz_iost_get_version;		/* @fsfunc */
	fz_iost_set_version_func			fz_iost_set_version;		/* @fsfunc */
	fz_iost_get_dir_func				fz_iost_get_dir;			/* @fsfunc */
	fz_iost_get_size_func				fz_iost_get_size;			/* @fsfunc */

	fz_iost_boolean_func				fz_iost_boolean;			/* @fsfunc */
	fz_iost_char_func					fz_iost_char;				/* @fsfunc */
	fz_iost_uchar_func					fz_iost_uchar;				/* @fsfunc */
	fz_iost_short_func					fz_iost_short;				/* @fsfunc */
	fz_iost_ushort_func					fz_iost_ushort;				/* @fsfunc */
	fz_iost_int_func					fz_iost_int;				/* @fsfunc */
	fz_iost_uint_func					fz_iost_uint;				/* @fsfunc */
	fz_iost_float_func					fz_iost_float;				/* @fsfunc */
	fz_iost_double_func					fz_iost_double;				/* @fsfunc */

	fz_iost_xy_func						fz_iost_xy;					/* @fsfunc */
	fz_iost_xyz_func					fz_iost_xyz;				/* @fsfunc */
	fz_iost_xyzw_func					fz_iost_xyzw;				/* @fsfunc */
	fz_iost_xy_mm_func					fz_iost_xy_mm;				/* @fsfunc */
	fz_iost_xyz_mm_func					fz_iost_xyz_mm;				/* @fsfunc */
	fz_iost_xy_float_func				fz_iost_xy_float;			/* @fsfunc */
	fz_iost_xyz_float_func				fz_iost_xyz_float;			/* @fsfunc */
	fz_iost_equ_func					fz_iost_equ;				/* @fsfunc */
	fz_iost_rgb_uchar_func				fz_iost_rgb_uchar;			/* @fsfunc */
	fz_iost_rgb_ushort_func				fz_iost_rgb_ushort;			/* @fsfunc */
	fz_iost_rgb_float_func				fz_iost_rgb_float;			/* @fsfunc */

	fz_iost_uuid_func					fz_iost_uuid;				/* @fsfunc */
	fz_iost_4char_func					fz_iost_4char;				/* @fsfunc */
	fz_iost_string_func					fz_iost_string;				/* @fsfunc */

	fz_iost_pnt_func					fz_iost_pnt;				/* @fsfunc */
	fz_iost_rect_func					fz_iost_rect;				/* @fsfunc */

	fz_iost_mat4x4_func					fz_iost_mat4x4;				/* @fsfunc */
	fz_iost_mat3x3_func					fz_iost_mat3x3;				/* @fsfunc */
	
	fz_iost_floc_func					fz_iost_floc;				/* @fsfunc */

	fz_iost_one_boolean_func			fz_iost_one_boolean;		/* @fsfunc */
	fz_iost_one_char_func				fz_iost_one_char;			/* @fsfunc */
	fz_iost_one_uchar_func				fz_iost_one_uchar;			/* @fsfunc */
	fz_iost_one_short_func				fz_iost_one_short;			/* @fsfunc */
	fz_iost_one_ushort_func				fz_iost_one_ushort;			/* @fsfunc */
	fz_iost_one_int_func				fz_iost_one_int;			/* @fsfunc */
	fz_iost_one_uint_func				fz_iost_one_uint;			/* @fsfunc */
	fz_iost_one_float_func				fz_iost_one_float;			/* @fsfunc */
	fz_iost_one_double_func				fz_iost_one_double;			/* @fsfunc */
	fz_iost_one_xy_func					fz_iost_one_xy;				/* @fsfunc */
	fz_iost_one_xyz_func				fz_iost_one_xyz;			/* @fsfunc */
	fz_iost_one_xyzw_func				fz_iost_one_xyzw;			/* @fsfunc */
	fz_iost_one_xy_mm_func				fz_iost_one_xy_mm;			/* @fsfunc */
	fz_iost_one_xyz_mm_func				fz_iost_one_xyz_mm;			/* @fsfunc */
	fz_iost_one_xy_float_func			fz_iost_one_xy_float;		/* @fsfunc */
	fz_iost_one_xyz_float_func			fz_iost_one_xyz_float;		/* @fsfunc */
	fz_iost_one_equ_func				fz_iost_one_equ;			/* @fsfunc */
	fz_iost_one_rgb_uchar_func			fz_iost_one_rgb_uchar;		/* @fsfunc */
	fz_iost_one_rgb_ushort_func			fz_iost_one_rgb_ushort;		/* @fsfunc */
	fz_iost_one_rgb_float_func			fz_iost_one_rgb_float;		/* @fsfunc */
	fz_iost_one_uuid_func				fz_iost_one_uuid;			/* @fsfunc */
	fz_iost_one_4char_func				fz_iost_one_4char;			/* @fsfunc */
	fz_iost_one_string_func				fz_iost_one_string;			/* @fsfunc */
	fz_iost_one_pnt_func				fz_iost_one_pnt;			/* @fsfunc */
	fz_iost_one_rect_func				fz_iost_one_rect;			/* @fsfunc */
	fz_iost_one_mat4x4_func				fz_iost_one_mat4x4;			/* @fsfunc */
	fz_iost_one_mat3x3_func				fz_iost_one_mat3x3;			/* @fsfunc */
	fz_iost_one_floc_func				fz_iost_one_floc;			/* @fsfunc */
	
	fz_iost_map_plane_func				fz_iost_map_plane;			/* @fsfunc */
	fz_iost_one_map_plane_func			fz_iost_one_map_plane;		/* @fsfunc */
	
	fz_iost_tag_func					fz_iost_tag;				/* @fsfunc */
	fz_iost_one_tag_func				fz_iost_one_tag;			/* @fsfunc */
	
	/************************************************************************************
	 *																					*
	 *		DO NOT MAKE ANY CHANGES TO THE ABOVE FUNCTIONS!!!							*
	 *		DO NOT ADD ANY FUNCTION ABOVE THIS LINE!!!									*
	 *		@comm  End of version 5.0.0.0 functions.									*
	 *																					*
	 ************************************************************************************/
	
	fz_iost_bytes_func					fz_iost_bytes;				/* @fsfunc */

#if 0 /* NOT READY YET */
	fz_iost_memory_open_write_func		fz_iost_memory_open_write;
	fz_iost_memory_open_read_func		fz_iost_memory_open_read;
	fz_iost_memory_get_data_func		fz_iost_memory_get_data;
	fz_iost_memory_close_func			fz_iost_memory_close;			
#endif /* 0 */
}  fz_iost_fset;


#define		fz_iost_long					fz_iost_int
#define		fz_iost_ulong					fz_iost_uint
#define		fz_iost_one_long				fz_iost_one_int
#define		fz_iost_one_ulong				fz_iost_one_uint

#ifdef __cplusplus
}
#endif

#endif /*__FORMZ_IOST_API_H */

