]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
lib: add notmuch_config_get_bool
[notmuch] / lib / notmuch.h
index 39f39423a3fe7dbe665f23bf95d461d4f3c0668d..4a513b44789558df8f080eddb4a9d1c6bb0ba032 100644 (file)
@@ -2532,6 +2532,25 @@ notmuch_config_values_start (notmuch_config_values_t *values);
 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.
  *