X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=e6e5cc2e01ca84f8a739d44fd6bd7f10891c3171;hp=44b0c4608c39302a3d79666a7b3180eed683cae7;hb=ba5729421825e0ec9d38aa9d656553f329aa6f09;hpb=5fddc07dc31481453c1af186bf7da241c00cdbf1 diff --git a/lib/notmuch.h b/lib/notmuch.h index 44b0c460..e6e5cc2e 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -140,11 +140,25 @@ typedef struct _notmuch_filenames notmuch_filenames_t; * contained within 'path' can be added to the database by calling * notmuch_database_add_message. * - * In case of any failure, this function returns NULL, (after printing - * an error message on stderr). + * In case of any failure, this function returns an error status and + * sets *database to NULL (after printing an error message on stderr). + * + * Return value: + * + * NOTMUCH_STATUS_SUCCESS: Successfully created the database. + * + * NOTMUCH_STATUS_NULL_POINTER: The given 'path' argument is NULL. + * + * NOTMUCH_STATUS_OUT_OF_MEMORY: Out of memory. + * + * NOTMUCH_STATUS_FILE_ERROR: An error occurred trying to create the + * database file (such as permission denied, or file not found, + * etc.), or the database already exists. + * + * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred. */ -notmuch_database_t * -notmuch_database_create (const char *path); +notmuch_status_t +notmuch_database_create (const char *path, notmuch_database_t **database); typedef enum { NOTMUCH_DATABASE_MODE_READ_ONLY = 0,