]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
lib: introduce notmuch_database_create_with_config
[notmuch] / lib / notmuch.h
index 6d22d328ce1b57f1b04ee445aaa2e44d9efb54e6..5e07a01a48c5ecd90874fac520101aa3e81109c7 100644 (file)
@@ -442,6 +442,33 @@ notmuch_database_open_with_config (const char *database_path,
                                   const char *profile,
                                   notmuch_database_t **database,
                                   char **error_message);
+/**
+ * Create a new notmuch database located at 'database_path', using
+ * configuration in 'config_path'.
+ *
+ * For description of arguments, @see notmuch_database_open_with_config
+ *
+ * @retval NOTMUCH_STATUS_SUCCESS: Successfully created the database.
+ *
+ * @retval NOTMUCH_STATUS_DATABASE_EXISTS: Database already exists, not created
+ *
+ * @retval NOTMUCH_STATUS_OUT_OF_MEMORY: Out of memory.
+ *
+ * @retval NOTMUCH_STATUS_FILE_ERROR: An error occurred trying to open the
+ *     database or config file (such as permission denied, or file not found,
+ *     etc.)
+ *
+ * @retval NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred.
+ *
+ * @since libnotmuch 5.4 (notmuch 0.32)
+ */
+
+notmuch_status_t
+notmuch_database_create_with_config (const char *database_path,
+                                    const char *config_path,
+                                    const char *profile,
+                                    notmuch_database_t **database,
+                                    char **error_message);
 
 /**
  * Retrieve last status string for given database.