diff options
| author | Federico Angelilli <code@fedang.net> | 2024-11-24 12:37:39 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-11-24 12:37:39 +0100 |
| commit | 57f91ef34cb8a8a1db2c18b468165a4273f13fa8 (patch) | |
| tree | e1f1bbd1b674e1cde68271c8a66276d407bb9080 /src/block.h | |
| parent | 9ff1b4a86bd44d4dfe984de41a85062c2b014655 (diff) | |
Refactor
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[]; |
