/*---------------------------------------------------------------------------*
  Project:  NitroSDK - MI - include
  File:     stream.h

  Copyright 2003-2004 Nintendo.  All rights reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law.  They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Log: stream.h,v $
  Revision 1.2  2004/09/09 09:29:33  yada
  only fix comment

  $NoKeywords: $
 *---------------------------------------------------------------------------*/

#ifndef NITRO_MI_STREAM_H_
#define NITRO_MI_STREAM_H_

#include <nitro/types.h>

#ifdef __cplusplus
extern "C" {
#endif


// Type declaration for stream reading callback function  (Normally used for reading a device.) 
typedef s32 (* MIi_InitReadStreamCallback      )( const u8 *devicep, void *ramp, const void *paramp );
typedef s32 (* MIi_TerminateReadStreamCallback )( const u8 *devicep );
typedef u8  (* MIi_ReadByteStreamCallback      )( const u8 *devicep );
typedef u16 (* MIi_ReadShortStreamCallback     )( const u8 *devicep );
typedef u32 (* MIi_ReadWordStreamCallback      )( const u8 *devicep );

//  Structure for stream loading callback function  (Normally used for reading a device.) 
typedef struct {
    MIi_InitReadStreamCallback      initStream;      // Initialization function
    MIi_TerminateReadStreamCallback terminateStream; // Termination function
    MIi_ReadByteStreamCallback      readByteStream;  // Byte stream reading function
    MIi_ReadShortStreamCallback     readShortStream; // Half-word stream reading function 
    MIi_ReadWordStreamCallback      readWordStream;  // Word stream reading function
} MIReadStreamCallbacks;


// Fetch the stream reading callback function structure from memory
MIReadStreamCallbacks *MI_GetReadStreamFromMemoryCallbacks( void );


#ifdef __cplusplus
} /* extern "C" */
#endif

/* NITRO_MI_STREAM_H_ */
#endif
