From 6c5054ebee5beb72c22d91a57c66b8ecdc65f7bf Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 21 Oct 2009 15:37:51 -0700 Subject: database: Add new notmuch_database_find_message With this function, and the recently added support for notmuch_message_get_thread_ids, we now recode the find_thread_ids function to work just the way we expect a user of the public notmuch API to work. Not too bad really. --- notmuch.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'notmuch.h') diff --git a/notmuch.h b/notmuch.h index 41987b58..93bb66e9 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 -- cgit v1.2.3