16 #ifndef _ISTREAM68_DEF_H_
17 #define _ISTREAM68_DEF_H_
30 #define ISTREAM_OPEN_READ_BIT 0
33 #define ISTREAM_OPEN_READ (1<<ISTREAM_OPEN_READ_BIT)
36 #define ISTREAM_OPEN_WRITE_BIT 1
39 #define ISTREAM_OPEN_WRITE (1<<ISTREAM_OPEN_WRITE_BIT)
42 #define ISTREAM_IS_OPEN(V) (!!((V)&(ISTREAM_OPEN_READ|ISTREAM_OPEN_WRITE)))
45 #define ISTREAM_IS_OPEN_READ(V) (((V)>>ISTREAM_OPEN_READ_BIT)&1)
48 #define ISTREAM_IS_OPEN_WRITE(V) (((V)>>ISTREAM_OPEN_WRITE_BIT)&1)
55 typedef const char * (* istream_name_t) (
istream_t *);
56 typedef int (* istream_open_t) (
istream_t *);
57 typedef int (* istream_close_t) (
istream_t *);
58 typedef int (* istream_length_t) (
istream_t *);
59 typedef int (* istream_tell_t) (
istream_t *);
60 typedef int (* istream_seek_t) (
istream_t *, int);
61 typedef int (* istream_read_t) (istream_t *,
void *, int);
62 typedef int (* istream_write_t) (istream_t *,
const void *, int);
63 typedef void (* istream_destroy_t) (istream_t *);
istream_close_t close
Close stream.
Definition: istream68_def.h:70
istream_tell_t tell
Get stream position.
Definition: istream68_def.h:74
istream_length_t length
Get stream data length.
Definition: istream68_def.h:73
istream_read_t read
Read data from stream.
Definition: istream68_def.h:71
istream_seek_t seekf
Seek forward.
Definition: istream68_def.h:75
istream_seek_t seekb
Seek backward.
Definition: istream68_def.h:76
istream_destroy_t destroy
Destructor .
Definition: istream68_def.h:77
istream_name_t name
Get stream name.
Definition: istream68_def.h:68
Input stream structure.
Definition: istream68_def.h:67
istream_open_t open
Open stream.
Definition: istream68_def.h:69
istream_write_t write
Write data to stream/.
Definition: istream68_def.h:72
generic stream operation.