]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-private.h
add_message: Propagate error status from notmuch_message_create_for_message_id
[notmuch] / notmuch-private.h
index 602d1a9ece954905c468934e25e8563bbb35f3db..53ea75fa4d1c7bb09f2f08af50afd821b3ab0c5d 100644 (file)
@@ -40,6 +40,7 @@ NOTMUCH_BEGIN_DECLS
 #include <fcntl.h>
 #include <unistd.h>
 #include <ctype.h>
+#include <assert.h>
 
 #include <talloc.h>
 
@@ -71,8 +72,7 @@ NOTMUCH_BEGIN_DECLS
 
 typedef enum {
     NOTMUCH_VALUE_TIMESTAMP = 0,
-    NOTMUCH_VALUE_MESSAGE_ID,
-    NOTMUCH_VALUE_THREAD
+    NOTMUCH_VALUE_MESSAGE_ID
 } notmuch_value_t;
 
 /* Xapian (with flint backend) complains if we provide a term longer
@@ -83,6 +83,7 @@ typedef enum {
 typedef enum _notmuch_private_status {
     /* First, copy all the public status values. */
     NOTMUCH_PRIVATE_STATUS_SUCCESS = NOTMUCH_STATUS_SUCCESS,
+    NOTMUCH_PRIVATE_STATUS_OUT_OF_MEMORY = NOTMUCH_STATUS_OUT_OF_MEMORY,
     NOTMUCH_PRIVATE_STATUS_XAPIAN_EXCEPTION = NOTMUCH_STATUS_XAPIAN_EXCEPTION,
     NOTMUCH_PRIVATE_STATUS_FILE_NOT_EMAIL = NOTMUCH_STATUS_FILE_NOT_EMAIL,
     NOTMUCH_PRIVATE_STATUS_NULL_POINTER = NOTMUCH_STATUS_NULL_POINTER,
@@ -100,12 +101,14 @@ typedef enum _notmuch_private_status {
 notmuch_message_t *
 _notmuch_message_create (const void *talloc_owner,
                         notmuch_database_t *notmuch,
-                        unsigned int doc_id);
+                        unsigned int doc_id,
+                        notmuch_private_status_t *status);
 
 notmuch_message_t *
 _notmuch_message_create_for_message_id (const void *talloc_owner,
                                        notmuch_database_t *notmuch,
-                                       const char *message_id);
+                                       const char *message_id,
+                                       notmuch_status_t *status);
 
 /* Lookup a prefix value by name.
  *