]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
lib: Add an API to find a message by filename.
[notmuch] / lib / notmuch.h
index bfa2ced88a3f3893bc43b63ec495ce68fb41cd29..0ed4db5f641d7885db36f3f85bc16c86fba6c0f7 100644 (file)
@@ -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