typedef enum _notmuch_status {
NOTMUCH_STATUS_SUCCESS = 0,
NOTMUCH_STATUS_OUT_OF_MEMORY,
typedef enum _notmuch_status {
NOTMUCH_STATUS_SUCCESS = 0,
NOTMUCH_STATUS_OUT_OF_MEMORY,
NOTMUCH_STATUS_XAPIAN_EXCEPTION,
NOTMUCH_STATUS_FILE_ERROR,
NOTMUCH_STATUS_FILE_NOT_EMAIL,
NOTMUCH_STATUS_XAPIAN_EXCEPTION,
NOTMUCH_STATUS_FILE_ERROR,
NOTMUCH_STATUS_FILE_NOT_EMAIL,
/* XXX: I think I'd like this to take an extra argument of
* notmuch_status_t* for returning a status value on failure. */
/* XXX: I think I'd like this to take an extra argument of
* notmuch_status_t* for returning a status value on failure. */
/* Open an existing notmuch database located at 'path'.
*
* The database should have been created at some time in the past,
* (not necessarily by this process), by calling
/* Open an existing notmuch database located at 'path'.
*
* The database should have been created at some time in the past,
* (not necessarily by this process), by calling
- * notmuch_database_create with 'path'.
+ * notmuch_database_create with 'path'. By default the database should be
+ * opened for reading only. In order to write to the database you need to
+ * pass the NOTMUCH_DATABASE_MODE_WRITABLE mode.
*
* An existing notmuch database can be identified by the presence of a
* directory named ".notmuch" below 'path'.
*
* An existing notmuch database can be identified by the presence of a
* directory named ".notmuch" below 'path'.
/* Close the given notmuch database, freeing all associated
* resources. See notmuch_database_open. */
/* Close the given notmuch database, freeing all associated
* resources. See notmuch_database_open. */
* 'database' (see notmuch_database_get_path), or else should be an
* absolute filename with initial components that match the path of
* 'database'.
* 'database' (see notmuch_database_get_path), or else should be an
* absolute filename with initial components that match the path of
* 'database'.
*
* If the database contains a message with the given message_id, then
* a new notmuch_message_t object is returned. The caller should call
*
* If the database contains a message with the given message_id, then
* a new notmuch_message_t object is returned. The caller should call
/* Destroy a notmuch_messages_t object.
*
* It's not strictly necessary to call this function. All memory from
/* Destroy a notmuch_messages_t object.
*
* It's not strictly necessary to call this function. All memory from
/* Get the current tag from 'tags' as a string.
*
* Note: The returned string belongs to 'tags' and has a lifetime
/* Get the current tag from 'tags' as a string.
*
* Note: The returned string belongs to 'tags' and has a lifetime
*
* See the documentation of notmuch_message_get_tags for example code
* showing how to iterate over a notmuch_tags_t object.
*
* See the documentation of notmuch_message_get_tags for example code
* showing how to iterate over a notmuch_tags_t object.
/* Destroy a notmuch_tags_t object.
*
* It's not strictly necessary to call this function. All memory from
/* Destroy a notmuch_tags_t object.
*
* It's not strictly necessary to call this function. All memory from