X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.h;h=3b4f980d0c25c4bc2b8db2a2c632150c2b36b68d;hp=41987b588c1acfbb646edee2988f84e004a4fcd7;hb=0383ae2a070555bd3de3bbd7e723d16fccd9b015;hpb=8ad4350fef132b016bbab5eeb1c4a713e51035c6 diff --git a/notmuch.h b/notmuch.h index 41987b58..3b4f980d 100644 --- a/notmuch.h +++ b/notmuch.h @@ -164,6 +164,19 @@ notmuch_status_t notmuch_database_add_message (notmuch_database_t *database, const char *filename); +/* Find a message with the given messsage_id. + * + * If the database contains a message with the given message_id, then + * a new notmuch_message_t object is returned. The caller should call + * notmuch_message_destroy when done with the message. + * + * If no message is found with the given message_id, this function + * returns NULL. + */ +notmuch_message_t * +notmuch_database_find_message (notmuch_database_t *database, + const char *message_id); + /* Create a new query for 'database'. * * Here, 'database' should be an open database, (see @@ -369,7 +382,7 @@ notmuch_message_get_thread_ids (notmuch_message_t *message); void notmuch_message_destroy (notmuch_message_t *message); -/* Does the given notmuch_tags_t object contain any more results. +/* Does the given notmuch_tags_t object contain any more tags. * * When this function returns TRUE, notmuch_tags_get will return a * valid string. Whereas when this function returns FALSE, @@ -381,7 +394,7 @@ notmuch_message_destroy (notmuch_message_t *message); notmuch_bool_t notmuch_tags_has_more (notmuch_tags_t *tags); -/* Get the current result from 'tags' as a string. +/* Get the current tag from 'tags' as a string. * * Note: The returned string belongs to 'tags' and has a lifetime * identical to it (and the query to which it utlimately belongs). @@ -398,7 +411,7 @@ notmuch_tags_get (notmuch_tags_t *tags); * showing how to iterate over a notmuch_tags_t object. */ void -notmuch_tags_advance (notmuch_tags_t *results); +notmuch_tags_advance (notmuch_tags_t *tags); /* Destroy a notmuch_tags_t object. *