X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fnotmuch-private.h;h=9957164dd9022dc49ff8e050a2830671b79fbd92;hb=2f94b3090c03bb56b43c4adfb94f7eeb28a6bf18;hp=926707d82d12a2173d858d1ac1cd55c308197cd4;hpb=bc11759dd1fd198661657b741bc0143c9af309a4;p=notmuch diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 926707d8..9957164d 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -46,7 +46,7 @@ NOTMUCH_BEGIN_DECLS #include -#include +#include "gmime-extra.h" #include "xutil.h" #include "error_util.h" @@ -74,12 +74,6 @@ NOTMUCH_BEGIN_DECLS #define unused(x) x __attribute__ ((unused)) -#ifdef __cplusplus -# define visible __attribute__((visibility("default"))) -#else -# define visible -#endif - /* Thanks to Andrew Tridgell's (SAMBA's) talloc for this definition of * unlikely. The talloc source code comes to us via the GNU LGPL v. 3. */ @@ -453,7 +447,7 @@ typedef struct _notmuch_message_list { * somewhere with some nasty C++ objects in it. We'll try to maintain * ignorance of that here. (See notmuch_mset_messages_t in query.cc) */ -struct visible _notmuch_messages { +struct _notmuch_messages { notmuch_bool_t is_of_list_type; notmuch_doc_id_set_t *excluded_doc_ids; notmuch_message_node_t *iterator; @@ -498,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 */ @@ -522,7 +530,7 @@ typedef struct _notmuch_string_node { struct _notmuch_string_node *next; } notmuch_string_node_t; -typedef struct visible _notmuch_string_list { +typedef struct _notmuch_string_list { int length; notmuch_string_node_t *head; notmuch_string_node_t **tail;