refactor(ltm): rename loops to nested

This commit is contained in:
Jef Roosens 2023-12-16 16:29:08 +01:00
parent ba320a4250
commit 0ef51ccada
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 112 additions and 54 deletions

View file

@ -28,4 +28,33 @@ ltm_err ltm_template_compile(ltm_template **out, const char *template);
ltm_err ltm_template_compile_n(ltm_template **out, const char *template,
size_t len);
/**
* Represents a specific instance of a template.
*/
typedef struct ltm_instance ltm_instance;
/**
* Create a new instance of the given template.
*/
ltm_err ltm_template_instantiate(ltm_instance **out,
const ltm_template *template);
typedef enum ltm_instance_block_type {
ltm_instance_block_type_buf = 0,
} ltm_instance_block_type;
/**
* Add a new variable to the template.
*/
ltm_err ltm_instance_block_add_var(ltm_instance *instance, const char *name,
ltm_instance_block_type type, void *data,
size_t len);
/**
* Add a new nested instance to the instance, returning a handle to the nested
* instance.
*/
ltm_err ltm_instance_block_add_nested(ltm_instance **out,
ltm_instance *instance, const char *name);
#endif