]> git.cworth.org Git - notmuch/blobdiff - lib/notmuch.h
lib: add "verbose" versions of notmuch_database_{open,create}
[notmuch] / lib / notmuch.h
index f0662454c42b439e4d920d223cce9d00707fe253..c671d8229b39ba4700e72d9160b7382e97653382 100644 (file)
@@ -229,6 +229,16 @@ typedef struct _notmuch_filenames notmuch_filenames_t;
 notmuch_status_t
 notmuch_database_create (const char *path, notmuch_database_t **database);
 
+/**
+ * Like notmuch_database_create, except optionally return an error
+ * message. This message is allocated by malloc and should be freed by
+ * the caller.
+ */
+notmuch_status_t
+notmuch_database_create_verbose (const char *path,
+                                notmuch_database_t **database,
+                                char **error_message);
+
 /**
  * Database open mode for notmuch_database_open.
  */
@@ -279,6 +289,17 @@ notmuch_status_t
 notmuch_database_open (const char *path,
                       notmuch_database_mode_t mode,
                       notmuch_database_t **database);
+/**
+ * Like notmuch_database_open, except optionally return an error
+ * message. This message is allocated by malloc and should be freed by
+ * the caller.
+ */
+
+notmuch_status_t
+notmuch_database_open_verbose (const char *path,
+                              notmuch_database_mode_t mode,
+                              notmuch_database_t **database,
+                              char **error_message);
 
 /**
  * Commit changes and close the given notmuch database.