config_option_pre_set

March 26, 2020 Contributors

Name

config_option_pre_set

Synopsis

#include "hooks/core/config_option_set.h"

| int **config_option_pre_set** ( | closure, |   |
|   | cfghdr, |   |
|   | opt, |   |
|   | container); |   |

void * <var class="pdparam">closure</var>;
ec_config_header * <var class="pdparam">cfghdr</var>;
ec_config_option * <var class="pdparam">opt</var>;
void ** <var class="pdparam">container</var>;

| int **has_core_config_option_pre_set_hook** ( | ); |   |

| void **register_core_config_option_pre_set_hook_first** ( | hook, |   |
|   | closure); |   |

ec_hook_core_config_option_pre_set_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **register_core_config_option_pre_set_hook_last** ( | hook, |   |
|   | closure); |   |

ec_hook_core_config_option_pre_set_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| int **call_core_config_option_pre_set_hook** ( | cfghdr, |   |
|   | opt, |   |
|   | container); |   |

ec_config_header * <var class="pdparam">cfghdr</var>;
ec_config_option * <var class="pdparam">opt</var>;
void ** <var class="pdparam">container</var>;

Description

This hook is called prior to setting a config option but after the new value has been validated. If a hook returns 1, then it will cause no further hooks to run and will bypass changing the core configuration store; the set will be considered successfull.