diff options
| author | David Bremner <david@tethera.net> | 2021-02-21 07:34:52 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-03-27 09:26:14 -0300 |
| commit | f5d4349921ded021756d6754d347420e68b23111 (patch) | |
| tree | 9d900e9d913e7309d94619413112c1c76bee0335 /lib/notmuch.h | |
| parent | 217f8196088f200972d35ee9181bfe361cccc04a (diff) | |
lib: provide notmuch_config_path
Since the library searches in several locations for a config file, the
caller does not know which of these is chosen in the usual case of
passing NULL as a config file. This changes provides an API for the
caller to retrieve the name of the config file chosen. It will be
tested in a following commit.
Diffstat (limited to 'lib/notmuch.h')
| -rw-r--r-- | lib/notmuch.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h index 9ea05fc5..4b053932 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -454,7 +454,12 @@ notmuch_database_open_with_config (const char *database_path, * * For description of arguments, @see notmuch_database_open_with_config * - * @retval NOTMUCH_STATUS_SUCCESS: Successfully loaded (some) configuration. + * @retval NOTMUCH_STATUS_SUCCESS: Successfully loaded configuration. + * + * @retval NOTMUCH_STATUS_NO_CONFIG: No config file was loaded. Not fatal. + * + * @retval NOTMUCH_STATUS_NO_DATABASE: No config information was + * loaded from a database. Not fatal. * * @retval NOTMUCH_STATUS_OUT_OF_MEMORY: Out of memory. * @@ -2737,6 +2742,15 @@ notmuch_status_t notmuch_config_get_bool (notmuch_database_t *notmuch, notmuch_config_key_t key, notmuch_bool_t *val); + +/** + * return the path of the config file loaded, if any + * + * @retval NULL if no config file was loaded + */ +const char * +notmuch_config_path (notmuch_database_t *notmuch); + /** * get the current default indexing options for a given database. * |
