* reference the filename, and will not copy the entire contents of
* the file.
*
+ * If 'message' is not NULL, then '*message' will be initialized to a
+ * message object that can be used for things such as adding tags to
+ * the just-added message. The user should call
+ * notmuch_message_destroy when done with the message.
+ *
* Return value:
*
* NOTMUCH_STATUS_SUCCESS: Message successfully added to database.
*/
notmuch_status_t
notmuch_database_add_message (notmuch_database_t *database,
- const char *filename);
+ const char *filename,
+ notmuch_message_t **message);
/* Find a message with the given messsage_id.
*
const char *
notmuch_thread_get_thread_id (notmuch_thread_t *thread);
+/* Get the subject of 'thread'
+ *
+ * The subject is taken from the first message (according to the query
+ * order---see notmuch_query_set_sort) in the query results that
+ * belongs to this thread.
+ *
+ * The returned string belongs to 'thread' and as such, should not be
+ * modified by the caller and will only be valid for as long as the
+ * thread is valid, (which is until notmuch_thread_destroy or until
+ * the query from which it derived is destroyed).
+ */
+const char *
+notmuch_thread_get_subject (notmuch_thread_t *thread);
+
/* Get the tags for 'thread', returning a notmuch_tags_t object which
* can be used to iterate over all tags.
*