X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.h;h=559ac3ab5b4ca90d260f21e8f7157b678ff74592;hp=103d233118e0d4f27f0e46770809ec6cc3e8df73;hb=0e72d6a9ecf392ec65a23b7c81d33025eaee3e1a;hpb=03c40c2bb04a762539e5fbc9924a1ce1e5548cc8 diff --git a/notmuch.h b/notmuch.h index 103d2331..559ac3ab 100644 --- a/notmuch.h +++ b/notmuch.h @@ -104,6 +104,19 @@ typedef struct _notmuch_message notmuch_message_t; typedef struct _notmuch_tags notmuch_tags_t; typedef struct _notmuch_thread_ids notmuch_thread_ids_t; +/* Lookup the default database path. + * + * This is the path that will be used by notmuch_database_create and + * notmuch_database_open if given a NULL path. Specifically it will be + * the value of the NOTMUCH_BASE environment variable if set, + * otherwise ${HOME}/mail + * + * Returns a newly allocated string which the caller should free() + * when finished with it. + */ +char * +notmuch_database_default_path (void); + /* Create a new, empty notmuch database located at 'path'. * * The path should be a top-level directory to a collection of @@ -131,6 +144,9 @@ typedef struct _notmuch_thread_ids notmuch_thread_ids_t; notmuch_database_t * notmuch_database_create (const char *path); +/* XXX: I think I'd like this to take an extra argument of + * notmuch_status_t* for returning a status value on failure. */ + /* Open a an existing notmuch database located at 'path'. * * The database should have been created at some time in the past, @@ -159,19 +175,6 @@ notmuch_database_open (const char *path); void notmuch_database_close (notmuch_database_t *database); -/* Lookup the default database path. - * - * This is the path that will be used by notmuch_database_create and - * notmuch_database_open if given a NULL path. Specifically it will be - * the value of the NOTMUCH_BASE environment variable if set, - * otherwise ${HOME}/mail - * - * Returns a newly allocated string which the caller should free() - * when finished with it. - */ -char * -notmuch_database_default_path (void); - /* Return the database path of the given database. * * The return value is a string owned by notmuch so should not be