X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=0ed4db5f641d7885db36f3f85bc16c86fba6c0f7;hp=bfa2ced88a3f3893bc43b63ec495ce68fb41cd29;hb=7a8046ced8c0e61ddd0ff463cfc17ed63e6edad3;hpb=59d2457bcc5e19f287006cea8da0c7c7a003200d diff --git a/lib/notmuch.h b/lib/notmuch.h index bfa2ced8..0ed4db5f 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -356,6 +356,22 @@ notmuch_message_t * notmuch_database_find_message (notmuch_database_t *database, const char *message_id); +/* Find a message with the given filename. + * + * If the database contains a message with the given filename, then a + * new notmuch_message_t object is returned. The caller should call + * notmuch_message_destroy when done with the message. + * + * This function returns NULL in the following situations: + * + * * No message is found with the given filename + * * An out-of-memory situation occurs + * * A Xapian exception occurs + */ +notmuch_message_t * +notmuch_database_find_message_by_filename (notmuch_database_t *notmuch, + const char *filename); + /* Return a list of all tags found in the database. * * This function creates a list of all tags found in the database. The