X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fetchmail.h;h=d759d391e6bbd7d4de651e67d2669b2a08e81922;hb=91644ff0b2e6eb3b26c5544a4a769ca4aaf08a14;hp=f6c6a4ec7ef90d435da4c3d03dbd7179b89b7f2c;hpb=c0db499f36439269c81c0d83fc4655502985bbc5;p=~andy%2Ffetchmail diff --git a/fetchmail.h b/fetchmail.h index f6c6a4ec..d759d391 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -402,11 +402,11 @@ struct query struct query *next; /* next query control block in chain */ }; -struct msgblk /* message header parsed for open_sink() */ +struct msgblk /** message header parsed for open_sink() */ { - char *headers; /* raw message headers */ - struct idlist *recipients; /* addressees */ - char return_path[HOSTLEN + USERNAMELEN + 4]; + char *headers; /**< raw message headers */ + struct idlist *recipients; /**< addressees */ + char return_path[HOSTLEN + USERNAMELEN + 4]; /**< envelope sender */ int msglen; int reallen; }; @@ -517,6 +517,16 @@ void resetidletimeout(void); int do_protocol(struct query *, const struct method *); /* transact.c: transaction support */ +/** \ingroup gen_recv_split + * Data structure to cache data between \func gen_recv_split calls, + * must be initialized before use by calling \func gen_recv_split_init. */ +struct RecvSplit +{ + char prefix[100]; /**< prefix to match/repeat when splitting lines */ + int cached; /**< flag to record if we have data cached in \a buf */ + char buf[MSGBUFSIZE]; /**< buffer for cached data */ +}; + void init_transact(const struct method *); int readheaders(int sock, long fetchlen, @@ -530,12 +540,16 @@ void gen_send(int sock, const char *, ... ) __attribute__ ((format (printf, 2, 3))) ; int gen_recv(int sock, char *buf, int size); +void gen_recv_split_init(const char *prefix, struct RecvSplit *rs); +int gen_recv_split(int sock, char *buf, int size, struct RecvSplit *rs); int gen_transact(int sock, const char *, ... ) __attribute__ ((format (printf, 2, 3))) ; #else void gen_send(); int gen_recv(); +void gen_recv_split_init(); +int gen_recv_split(); int gen_transact(); #endif extern struct msgblk msgblk;