*
* NOTMUCH_STATUS_SUCCESS: No error occurred.
*
+ * XXX: We don't really want to expose this lame XAPIAN_EXCEPTION
+ * value. Instead we should map to things like DATABASE_LOCKED or
+ * whatever.
+ *
* NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred
*
+ * NOTMUCH_STATUS_FILE_ERROR: An error occurred trying to read or
+ * write to a file (this could be file not found, permission
+ * denied, etc.)
+ *
* NOTMUCH_STATUS_FILE_NOT_EMAIL: A file was presented that doesn't
* appear to be an email message.
*
typedef enum _notmuch_status {
NOTMUCH_STATUS_SUCCESS = 0,
NOTMUCH_STATUS_XAPIAN_EXCEPTION,
+ NOTMUCH_STATUS_FILE_ERROR,
NOTMUCH_STATUS_FILE_NOT_EMAIL,
NOTMUCH_STATUS_NULL_POINTER,
NOTMUCH_STATUS_TAG_TOO_LONG,
NOTMUCH_STATUS_LAST_STATUS
} notmuch_status_t;
+/* Get a string representation of a notmuch_status_t value.
+ *
+ * The result is readonly.
+ */
+const char *
+notmuch_status_to_string (notmuch_status_t status);
+
/* Various opaque data types. For each notmuch_<foo>_t see the various
* notmuch_<foo> functions below. */
typedef struct _notmuch_database notmuch_database_t;
*
* NOTMUCH_STATUS_SUCCESS: Message successfully added to database.
*
+ * NOTMUCH_STATUS_FILE_ERROR: an error occurred trying to open the
+ * file, (such as permission denied, or file not found,
+ * etc.). Nothing added to the database.
+ *
* NOTMUCH_STATUS_FILE_NOT_EMAIL: the contents of filename don't look
* like an email message. Nothing added to the database.
*/