diff options
Diffstat (limited to 'src/block.h')
| -rw-r--r-- | src/block.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/block.h b/src/block.h index 715c017..6b3b2c5 100644 --- a/src/block.h +++ b/src/block.h @@ -92,7 +92,7 @@ typedef struct { // Called to allocate a block with its default state // -typedef void (*block_init_t)(block_t *block, const block_scheme_t *scheme); +typedef void (*block_init_t)(block_t *block); // Called to cleanup a block and free its memory // NOTE: This should NOT free any other block! @@ -101,7 +101,11 @@ typedef void (*block_clean_t)(block_t *block); // Called to validate the block after parsing the config // -typedef int (*block_validate_t)(block_t *block, const block_scheme_t *scheme); +typedef int (*block_validate_t)(block_t *block); + +// Called to validate changes to a block variable +// +typedef int (*block_change_t)(block_t *block, const char *key, const char *value); struct block_scheme { const char *name; @@ -110,6 +114,7 @@ struct block_scheme { block_init_t init_fn; block_clean_t clean_fn; block_validate_t validate_fn; + block_change_t change_fn; }; extern const block_scheme_t *block_schemes[]; |
