00001 #ifndef __NEURO_READERS_H
00002 #define __NEURO_READERS_H
00003
00004
00005 struct NSBlockReader;
00006 struct NSLineReader;
00007 struct NSCompositeReader;
00008
00009 struct NSBlockHandler {
00010 void (*handleBlock)(const char *block, int blockLen, const void *udata);
00011 };
00012
00013 struct NSLineHandler {
00014 void (*handleLine)(const char *line, int lineLen, const void *data);
00015 };
00016
00017 struct NSCompositeHandler {
00018 void (*handleBlock)(const char *block, int blockLen, const void *udata);
00019 void (*handleLine)(const char *line, int lineLen, const void *data);
00020 };
00021
00022 struct NSBlockReader *newNSBlockReader(int howManyBytes, const struct NSBlockHandler *block, void *udata);
00023 struct NSLineReader *newNSLineReader(const struct NSLineHandler *line, void *udata);
00024 struct NSCompositeReader *newNSCompositeReader(const struct NSCompositeHandler *nsc, void *udata);
00025
00026 void readNewBlock(struct NSCompositeReader *nsc, int howManyBytes);
00027
00028 void freeNSBlockReader(struct NSBlockReader *nsb);
00029 void freeNSLineReader(struct NSLineReader *nsl);
00030 void freeNSCompositeReader(struct NSCompositeReader *nsc);
00031
00032 #endif
00033