X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;fp=lib%2Fnotmuch.h;h=5e07a01a48c5ecd90874fac520101aa3e81109c7;hp=6d22d328ce1b57f1b04ee445aaa2e44d9efb54e6;hb=ac67cd84eea1148680ab3a377d35ae346073f138;hpb=55f5e87096fda96280ccc4b191393c7e59b4df57 diff --git a/lib/notmuch.h b/lib/notmuch.h index 6d22d328..5e07a01a 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -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.