add ec_node_bypass
[protos/libecoli.git] / include / ecoli_node_dynamic.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2017, Olivier MATZ <zer0@droids-corp.org>
3  */
4
5 #ifndef ECOLI_NODE_DYNAMIC_
6 #define ECOLI_NODE_DYNAMIC_
7
8 struct ec_node;
9 struct ec_parse;
10
11 /* callback invoked by parse() or complete() to build the dynamic node
12  * the behavior of the node can depend on what is already parsed */
13 typedef struct ec_node *(*ec_node_dynamic_build_t)(
14         struct ec_parse *state, void *opaque);
15
16 struct ec_node *ec_node_dynamic(const char *id, ec_node_dynamic_build_t build,
17                                 void *opaque);
18
19 #endif