/* voc 2.1.0 [2025/05/18] for gcc LP64 on slackware xtspaF */

#ifndef oocBinaryRider__h
#define oocBinaryRider__h

#include "SYSTEM.h"
#include "oocChannel.h"
#include "oocMsg.h"

typedef
	struct oocBinaryRider_ErrorContextDesc { /* oocChannel_ErrorContextDesc */
		oocMsg_StringPtr id;
	} oocBinaryRider_ErrorContextDesc;

typedef
	struct oocBinaryRider_ReaderDesc *oocBinaryRider_Reader;

typedef
	struct oocBinaryRider_ReaderDesc {
		oocMsg_Msg res;
		INT8 byteOrder;
		oocChannel_Reader byteReader;
		oocChannel_Channel base;
	} oocBinaryRider_ReaderDesc;

import INT32 oocBinaryRider_Reader_Available (oocBinaryRider_Reader r);
import void oocBinaryRider_Reader_ClearError (oocBinaryRider_Reader r);
import INT32 oocBinaryRider_Reader_Pos (oocBinaryRider_Reader r);
import void oocBinaryRider_Reader_ReadBool (oocBinaryRider_Reader r, BOOLEAN *bool);
import void oocBinaryRider_Reader_ReadBytes (oocBinaryRider_Reader r, SYSTEM_BYTE *x, ADDRESS x__len, INT32 start, INT32 n);
import void oocBinaryRider_Reader_ReadChar (oocBinaryRider_Reader r, CHAR *ch);
import void oocBinaryRider_Reader_ReadInt (oocBinaryRider_Reader r, INT16 *int_);
import void oocBinaryRider_Reader_ReadLChar (oocBinaryRider_Reader r, CHAR *ch);
import void oocBinaryRider_Reader_ReadLInt (oocBinaryRider_Reader r, INT32 *lint);
import void oocBinaryRider_Reader_ReadLReal (oocBinaryRider_Reader r, LONGREAL *lreal);
import void oocBinaryRider_Reader_ReadLString (oocBinaryRider_Reader r, CHAR *s, ADDRESS s__len);
import void oocBinaryRider_Reader_ReadNum (oocBinaryRider_Reader r, INT32 *num);
import void oocBinaryRider_Reader_ReadReal (oocBinaryRider_Reader r, REAL *real);
import void oocBinaryRider_Reader_ReadSInt (oocBinaryRider_Reader r, INT8 *sint);
import void oocBinaryRider_Reader_ReadSet (oocBinaryRider_Reader r, UINT32 *s);
import void oocBinaryRider_Reader_ReadString (oocBinaryRider_Reader r, CHAR *s, ADDRESS s__len);
import void oocBinaryRider_Reader_SetByteOrder (oocBinaryRider_Reader r, INT8 order);
import void oocBinaryRider_Reader_SetPos (oocBinaryRider_Reader r, INT32 newPos);
#define __oocBinaryRider_Reader_Available(r) __SEND(__TYPEOF(r), 0, INT32(*)(oocBinaryRider_Reader), (r))
#define __oocBinaryRider_Reader_ClearError(r) __SEND(__TYPEOF(r), 1, void(*)(oocBinaryRider_Reader), (r))
#define __oocBinaryRider_Reader_Pos(r) __SEND(__TYPEOF(r), 2, INT32(*)(oocBinaryRider_Reader), (r))
#define __oocBinaryRider_Reader_ReadBool(r, bool) __SEND(__TYPEOF(r), 3, void(*)(oocBinaryRider_Reader, BOOLEAN*), (r, bool))
#define __oocBinaryRider_Reader_ReadBytes(r, x, x__len, start, n) __SEND(__TYPEOF(r), 4, void(*)(oocBinaryRider_Reader, SYSTEM_BYTE*, ADDRESS , INT32, INT32), (r, x, x__len, start, n))
#define __oocBinaryRider_Reader_ReadChar(r, ch) __SEND(__TYPEOF(r), 6, void(*)(oocBinaryRider_Reader, CHAR*), (r, ch))
#define __oocBinaryRider_Reader_ReadInt(r, int) __SEND(__TYPEOF(r), 7, void(*)(oocBinaryRider_Reader, INT16*), (r, int))
#define __oocBinaryRider_Reader_ReadLChar(r, ch) __SEND(__TYPEOF(r), 8, void(*)(oocBinaryRider_Reader, CHAR*), (r, ch))
#define __oocBinaryRider_Reader_ReadLInt(r, lint) __SEND(__TYPEOF(r), 9, void(*)(oocBinaryRider_Reader, INT32*), (r, lint))
#define __oocBinaryRider_Reader_ReadLReal(r, lreal) __SEND(__TYPEOF(r), 10, void(*)(oocBinaryRider_Reader, LONGREAL*), (r, lreal))
#define __oocBinaryRider_Reader_ReadLString(r, s, s__len) __SEND(__TYPEOF(r), 11, void(*)(oocBinaryRider_Reader, CHAR*, ADDRESS ), (r, s, s__len))
#define __oocBinaryRider_Reader_ReadNum(r, num) __SEND(__TYPEOF(r), 12, void(*)(oocBinaryRider_Reader, INT32*), (r, num))
#define __oocBinaryRider_Reader_ReadReal(r, real) __SEND(__TYPEOF(r), 13, void(*)(oocBinaryRider_Reader, REAL*), (r, real))
#define __oocBinaryRider_Reader_ReadSInt(r, sint) __SEND(__TYPEOF(r), 14, void(*)(oocBinaryRider_Reader, INT8*), (r, sint))
#define __oocBinaryRider_Reader_ReadSet(r, s) __SEND(__TYPEOF(r), 15, void(*)(oocBinaryRider_Reader, UINT32*), (r, s))
#define __oocBinaryRider_Reader_ReadString(r, s, s__len) __SEND(__TYPEOF(r), 16, void(*)(oocBinaryRider_Reader, CHAR*, ADDRESS ), (r, s, s__len))
#define __oocBinaryRider_Reader_SetByteOrder(r, order) __SEND(__TYPEOF(r), 17, void(*)(oocBinaryRider_Reader, INT8), (r, order))
#define __oocBinaryRider_Reader_SetPos(r, newPos) __SEND(__TYPEOF(r), 18, void(*)(oocBinaryRider_Reader, INT32), (r, newPos))

typedef
	struct oocBinaryRider_WriterDesc *oocBinaryRider_Writer;

typedef
	struct oocBinaryRider_WriterDesc {
		oocMsg_Msg res;
		INT8 byteOrder;
		oocChannel_Writer byteWriter;
		oocChannel_Channel base;
	} oocBinaryRider_WriterDesc;

import void oocBinaryRider_Writer_ClearError (oocBinaryRider_Writer w);
import INT32 oocBinaryRider_Writer_Pos (oocBinaryRider_Writer w);
import void oocBinaryRider_Writer_SetByteOrder (oocBinaryRider_Writer w, INT8 order);
import void oocBinaryRider_Writer_SetPos (oocBinaryRider_Writer w, INT32 newPos);
import void oocBinaryRider_Writer_WriteBool (oocBinaryRider_Writer w, BOOLEAN bool);
import void oocBinaryRider_Writer_WriteBytes (oocBinaryRider_Writer w, SYSTEM_BYTE *x, ADDRESS x__len, INT32 start, INT32 n);
import void oocBinaryRider_Writer_WriteChar (oocBinaryRider_Writer w, CHAR ch);
import void oocBinaryRider_Writer_WriteInt (oocBinaryRider_Writer w, INT16 int_);
import void oocBinaryRider_Writer_WriteLChar (oocBinaryRider_Writer w, CHAR ch);
import void oocBinaryRider_Writer_WriteLInt (oocBinaryRider_Writer w, INT32 lint);
import void oocBinaryRider_Writer_WriteLReal (oocBinaryRider_Writer w, LONGREAL lreal);
import void oocBinaryRider_Writer_WriteLString (oocBinaryRider_Writer w, CHAR *s, ADDRESS s__len);
import void oocBinaryRider_Writer_WriteNum (oocBinaryRider_Writer w, INT32 lint);
import void oocBinaryRider_Writer_WriteReal (oocBinaryRider_Writer w, REAL real);
import void oocBinaryRider_Writer_WriteSInt (oocBinaryRider_Writer w, INT8 sint);
import void oocBinaryRider_Writer_WriteSet (oocBinaryRider_Writer w, UINT32 s);
import void oocBinaryRider_Writer_WriteString (oocBinaryRider_Writer w, CHAR *s, ADDRESS s__len);
#define __oocBinaryRider_Writer_ClearError(w) __SEND(__TYPEOF(w), 0, void(*)(oocBinaryRider_Writer), (w))
#define __oocBinaryRider_Writer_Pos(w) __SEND(__TYPEOF(w), 1, INT32(*)(oocBinaryRider_Writer), (w))
#define __oocBinaryRider_Writer_SetByteOrder(w, order) __SEND(__TYPEOF(w), 2, void(*)(oocBinaryRider_Writer, INT8), (w, order))
#define __oocBinaryRider_Writer_SetPos(w, newPos) __SEND(__TYPEOF(w), 3, void(*)(oocBinaryRider_Writer, INT32), (w, newPos))
#define __oocBinaryRider_Writer_WriteBool(w, bool) __SEND(__TYPEOF(w), 4, void(*)(oocBinaryRider_Writer, BOOLEAN), (w, bool))
#define __oocBinaryRider_Writer_WriteBytes(w, x, x__len, start, n) __SEND(__TYPEOF(w), 5, void(*)(oocBinaryRider_Writer, SYSTEM_BYTE*, ADDRESS , INT32, INT32), (w, x, x__len, start, n))
#define __oocBinaryRider_Writer_WriteChar(w, ch) __SEND(__TYPEOF(w), 7, void(*)(oocBinaryRider_Writer, CHAR), (w, ch))
#define __oocBinaryRider_Writer_WriteInt(w, int) __SEND(__TYPEOF(w), 8, void(*)(oocBinaryRider_Writer, INT16), (w, int))
#define __oocBinaryRider_Writer_WriteLChar(w, ch) __SEND(__TYPEOF(w), 9, void(*)(oocBinaryRider_Writer, CHAR), (w, ch))
#define __oocBinaryRider_Writer_WriteLInt(w, lint) __SEND(__TYPEOF(w), 10, void(*)(oocBinaryRider_Writer, INT32), (w, lint))
#define __oocBinaryRider_Writer_WriteLReal(w, lreal) __SEND(__TYPEOF(w), 11, void(*)(oocBinaryRider_Writer, LONGREAL), (w, lreal))
#define __oocBinaryRider_Writer_WriteLString(w, s, s__len) __SEND(__TYPEOF(w), 12, void(*)(oocBinaryRider_Writer, CHAR*, ADDRESS ), (w, s, s__len))
#define __oocBinaryRider_Writer_WriteNum(w, lint) __SEND(__TYPEOF(w), 13, void(*)(oocBinaryRider_Writer, INT32), (w, lint))
#define __oocBinaryRider_Writer_WriteReal(w, real) __SEND(__TYPEOF(w), 14, void(*)(oocBinaryRider_Writer, REAL), (w, real))
#define __oocBinaryRider_Writer_WriteSInt(w, sint) __SEND(__TYPEOF(w), 15, void(*)(oocBinaryRider_Writer, INT8), (w, sint))
#define __oocBinaryRider_Writer_WriteSet(w, s) __SEND(__TYPEOF(w), 16, void(*)(oocBinaryRider_Writer, UINT32), (w, s))
#define __oocBinaryRider_Writer_WriteString(w, s, s__len) __SEND(__TYPEOF(w), 17, void(*)(oocBinaryRider_Writer, CHAR*, ADDRESS ), (w, s, s__len))



import ADDRESS *oocBinaryRider_ReaderDesc__typ;
import ADDRESS *oocBinaryRider_WriterDesc__typ;
import ADDRESS *oocBinaryRider_ErrorContextDesc__typ;

import oocBinaryRider_Reader oocBinaryRider_ConnectReader (oocChannel_Channel ch);
import oocBinaryRider_Writer oocBinaryRider_ConnectWriter (oocChannel_Channel ch);
import void oocBinaryRider_InitReader (oocBinaryRider_Reader r, oocChannel_Channel ch, INT8 byteOrder);
import void oocBinaryRider_InitWriter (oocBinaryRider_Writer w, oocChannel_Channel ch, INT8 byteOrder);
import void *oocBinaryRider__init(void);


#endif // oocBinaryRider
