* migrate convert_internet_message to StrBuf, the new approach saves tons of strlens...
[citadel.git] / citadel / msgbase.h
index 854cefee4cee71cce0cfb4c11fbf292d355250e5..3202c1e6f6953c68afee54429d8021c574509107 100644 (file)
@@ -147,6 +147,15 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
                                int do_repl_check, struct CtdlMessage *supplied_msg);
 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
 char *CtdlReadMessageBody(char *terminator, long tlen, size_t maxlen, char *exist, int crlf, int sock);
+StrBuf *CtdlReadMessageBodyBuf(char *terminator,       /* token signalling EOT */
+                              long tlen,
+                              size_t maxlen,           /* maximum message length */
+                              char *exist,             /* if non-null, append to it;
+                                                          exist is ALWAYS freed  */
+                              int crlf,                /* CRLF newlines instead of LF */
+                              int sock         /* socket handle or 0 for this session's client socket */
+       );
+
 int CtdlOutputMsg(long msg_num,                /* message number (local) to fetch */
                  int mode,             /* how would you like that message? */
                  int headers_only,     /* eschew the message body? */