]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch-private.h
lib: factor out message-id parsing to separate file.
[notmuch] / lib / notmuch-private.h
index ac315e4c99b77ae316571d3b0d686612100f05c3..9957164dd9022dc49ff8e050a2830671b79fbd92 100644 (file)
@@ -46,7 +46,7 @@ NOTMUCH_BEGIN_DECLS
 
 #include <talloc.h>
 
-#include <gmime/gmime.h>
+#include "gmime-extra.h"
 
 #include "xutil.h"
 #include "error_util.h"
@@ -492,6 +492,20 @@ notmuch_status_t
 _notmuch_query_count_documents (notmuch_query_t *query,
                                const char *type,
                                unsigned *count_out);
+/* message-id.c */
+
+/* Parse an RFC 822 message-id, discarding whitespace, any RFC 822
+ * comments, and the '<' and '>' delimiters.
+ *
+ * If not NULL, then *next will be made to point to the first character
+ * not parsed, (possibly pointing to the final '\0' terminator.
+ *
+ * Returns a newly talloc'ed string belonging to 'ctx'.
+ *
+ * Returns NULL if there is any error parsing the message-id. */
+char *
+_notmuch_message_id_parse (void *ctx, const char *message_id, const char **next);
+
 
 /* message.cc */