diff options
| author | David Bremner <david@tethera.net> | 2020-08-26 08:41:48 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-02-06 19:14:11 -0400 |
| commit | a4af7a2a1b56efb11f2ed0c365202a8f234b4438 (patch) | |
| tree | 65e46e09c86689c17e0185fdfe94e9fea8a5f797 /lib/notmuch.h | |
| parent | 53f27aaf73192babf831e907ade71dc16f6880be (diff) | |
lib: add notmuch_config_get_bool
Booleans have no out of band values, so return a status for errors.
Diffstat (limited to 'lib/notmuch.h')
| -rw-r--r-- | lib/notmuch.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h index 39f39423..4a513b44 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -2533,6 +2533,25 @@ void notmuch_config_values_destroy (notmuch_config_values_t *values); /** + * get a configuration value from an open database as Boolean + * + * This value reflects all configuration information given at the time + * the database was opened. + * + * @param[in] notmuch database + * @param[in] key configuration key + * @param[out] val configuration value, converted to Boolean + * + * @since libnotmuch 5.4 (notmuch 0.32) + * + * @retval #NOTMUCH_STATUS_ILLEGAL_ARGUMENT if either key is unknown + * or the corresponding value does not convert to Boolean. + */ +notmuch_status_t +notmuch_config_get_bool (notmuch_database_t *notmuch, + notmuch_config_key_t key, + notmuch_bool_t *val); +/** * get the current default indexing options for a given database. * * This object will survive until the database itself is destroyed, |
