]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: Added imap_parser_set_streams().
authorTimo Sirainen <tss@iki.fi>
Sat, 13 Feb 2010 03:44:20 +0000 (05:44 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 13 Feb 2010 03:44:20 +0000 (05:44 +0200)
--HG--
branch : HEAD

src/lib-imap/imap-parser.c
src/lib-imap/imap-parser.h

index 730f9d4a10dffe8fdb16ebdc5564fee775329c09..a0e03b49addac7fcb59b4fb72384586cf0ad5e65 100644 (file)
@@ -97,6 +97,13 @@ void imap_parser_reset(struct imap_parser *parser)
        parser->literal_size_return = FALSE;
 }
 
+void imap_parser_set_streams(struct imap_parser *parser, struct istream *input,
+                            struct ostream *output)
+{
+       parser->input = input;
+       parser->output = output;
+}
+
 const char *imap_parser_get_error(struct imap_parser *parser, bool *fatal)
 {
         *fatal = parser->fatal_error;
index b9ff84da96184f792ba1bd159df2907a3257e3ea..7fb28a329d78f8486996576466ae6e247aa6156f 100644 (file)
@@ -107,6 +107,10 @@ void imap_parser_destroy(struct imap_parser **parser);
 /* Reset the parser to initial state. */
 void imap_parser_reset(struct imap_parser *parser);
 
+/* Change parser's input and output streams */
+void imap_parser_set_streams(struct imap_parser *parser, struct istream *input,
+                            struct ostream *output);
+
 /* Return the last error in parser. fatal is set to TRUE if there's no way to
    continue parsing, currently only if too large non-sync literal size was
    given. */