aboutsummaryrefslogtreecommitdiff
path: root/lib/notmuch.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2014-12-27 19:12:49 +0100
committerDavid Bremner <david@tethera.net>2015-03-29 00:34:15 +0100
commit84d3b15d251623cbb66e5eca7ddb8d61aa596d33 (patch)
tree73e7cca41e1b9e720f1e57eea58dc56e496cb4a3 /lib/notmuch.h
parent83298fa0f8e7717a260c1f88edd7bf545709562d (diff)
lib: add "verbose" versions of notmuch_database_{open,create}
The compatibility wrapper ensures that clients calling notmuch_database_open will receive consistent output for now. The changes to notmuch-{new,search} and test/symbol-test are just to make the test suite pass. The use of IGNORE_RESULT is justified by two things. 1) I don't know what else to do. 2) asprintf guarantees the output string is NULL if an error occurs, so at least we are not passing garbage back.
Diffstat (limited to 'lib/notmuch.h')
-rw-r--r--lib/notmuch.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index f0662454..c671d822 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -230,6 +230,16 @@ 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.
*/
typedef enum {
@@ -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.