00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GETEVT
00018 #define GETEVT
00019
00020 #include "typedefs.h"
00021
00022 #define MAX_BUF_LGTH 32768
00023 #define MIN_BUF_LGTH 512
00024 #define MAX_BUFS_IN_STREAM 100
00025 #define MAX_LONG 99999999
00026
00027 typedef struct
00028 {
00029 INTS4 l_endian;
00030 INTS4 l_version;
00031 INTS4 l_bufsize;
00032 INTS4 l_buffers;
00033 INTS4 l_events;
00034 INTS4 l_filesize;
00035 INTS4 l_first;
00036 INTS4 l_last;
00037 INTS4 l_linear;
00038 } s_taghe;
00039 typedef struct
00040 {
00041 INTS4 l_event;
00042 INTS4 l_offset;
00043 } s_tag;
00044 typedef struct
00045 {
00046 INTS4 l_server_type;
00047 INTS4 l_buf_type;
00048 INTS4 l_buf_subtype;
00049 INTS4 l_channel_no;
00050 INTS4 l_buf_size;
00051 INTS4 l_buf_no;
00052 INTS4 l_buf_posi;
00053 INTS4 l_buf_lmt;
00054 INTS4 l_bufs_in_stream;
00055 INTS4 l_stream_bufs;
00056 INTS4 l_io_buf_size;
00057 INTS4 l_io_buf_posi;
00058 INTS4 l_evt_buf_size;
00059 INTS4 l_evt_buf_posi;
00060 INTS4 l_evt_size;
00061 INTS4 l_timeout;
00062 INTS4 l_events;
00063 INTS4 l_buffers;
00064 INTS4 l_kbytes;
00065 INTS4 l_first_get;
00066 INTS4 l_first_put;
00067 INTS4 l_first_buf;
00068 INTS4 l_frag_len;
00069 CHARS *pc_io_buf;
00070 CHARS *pc_evt_buf;
00071 s_bufhe *ps_bufhe;
00072 s_bufhe s_bufhe_1;
00073 s_ve10_1 *ps_ve10_1;
00074 CHARS c_channel[128];
00075 INTS4 l_tagfile_no;
00076 INTS4 l_tagswap;
00077 INTS4 l_lmdswap;
00078 s_taghe *ps_taghe;
00079 s_tag *ps_tag;
00080 } s_evt_channel;
00081
00082 INTS4 f_evt_cre_tagfile(CHARS *,CHARS *, INTS4 (*)());
00083 INTS4 f_evt_get_tagopen(s_evt_channel *,CHARS *,CHARS *,CHARS **,INTS4);
00084 INTS4 f_evt_get_tagevent(s_evt_channel *,INTS4,INTS4,INTS4 **);
00085 INTS4 f_evt_get_tagnext(s_evt_channel *,INTS4,INTS4 **);
00086 INTS4 f_evt_get_tagclose(s_evt_channel *);
00087 INTS4 f_evt_get_open(INTS4, CHARS *, s_evt_channel *, CHARS **, INTS4, INTS4);
00088 INTS4 f_evt_get_event(s_evt_channel *, INTS4 **, INTS4 **);
00089 INTS4 f_evt_get_subevent(s_ve10_1 *,INTS4,INTS4 **,INTS4 **,INTS4 *);
00090 INTS4 f_evt_get_buffer(s_evt_channel *, INTS4 *);
00091 INTS4 f_evt_get_close(s_evt_channel *);
00092 CHARS * f_evt_get_buffer_ptr(s_evt_channel *);
00093 INTS4 f_evt_skip_buffer(s_evt_channel *, INTS4);
00094 INTS4 f_evt_put_open(CHARS *,INTS4,INTS4,INTS4,INTS4,s_evt_channel *,CHARS *);
00095 INTS4 f_evt_put_event(s_evt_channel *, INTS4 *);
00096 INTS4 f_evt_put_buffer(s_evt_channel *, s_bufhe *);
00097 INTS4 f_evt_put_close(s_evt_channel *);
00098 INTS4 f_evt_type(s_bufhe *,s_evhe *,INTS4,INTS4,INTS4,INTS4);
00099 INTS4 f_evt_error( INTS4 , CHARS * , INTS4 );
00100 INTS4 f_evt_timeout(s_evt_channel *, INTS4 );
00101 INTS4 f_evt_rev_port(INTS4);
00102 INTS4 f_evt_swap(CHARS *, INTS4);
00103
00104
00105
00106
00107 #define GETEVT__FILE 1
00108 #define GETEVT__STREAM 2
00109 #define GETEVT__TRANS 3
00110 #define GETEVT__EVENT 4
00111 #define GETEVT__REVSERV 5
00112 #define GETEVT__RFIO 6
00113 #define GETEVT__TAGINDEX 10
00114 #define GETEVT__TAGNUMBER 11
00115
00116
00117
00118 #define GETEVT__SUCCESS 0
00119 #define GETEVT__FAILURE 1
00120 #define GETEVT__FRAGMENT 2
00121 #define GETEVT__NOMORE 3
00122 #define GETEVT__NOFILE 4
00123 #define GETEVT__NOSERVER 5
00124 #define GETEVT__RDERR 6
00125 #define GETEVT__CLOSE_ERR 7
00126 #define GETEVT__NOCHANNEL 8
00127 #define GETEVT__TIMEOUT 9
00128 #define GETEVT__NOTAGFILE 10
00129 #define GETEVT__NOTAG 11
00130 #define GETEVT__TAGRDERR 12
00131 #define GETEVT__TAGWRERR 13
00132 #define GETEVT__NOLMDFILE 14
00133
00134 #define PUTEVT__SUCCESS 0
00135 #define PUTEVT__FILE_EXIST 101
00136 #define PUTEVT__FAILURE 102
00137 #define PUTEVT__TOOBIG 103
00138 #define PUTEVT__TOO_SMALLS 104
00139 #define PUTEVT__CLOSE_ERR 105
00140 #define PUTEVT__WRERR 106
00141 #define PUTEVT__NOCHANNEL 107
00142
00143 #endif
00144
00145
00146