add meson support
[protos/libecoli.git] / include / ecoli_node_dynamic.h
diff --git a/include/ecoli_node_dynamic.h b/include/ecoli_node_dynamic.h
new file mode 100644 (file)
index 0000000..4f2535e
--- /dev/null
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2017, Olivier MATZ <zer0@droids-corp.org>
+ */
+
+#ifndef ECOLI_NODE_DYNAMIC_
+#define ECOLI_NODE_DYNAMIC_
+
+struct ec_node;
+struct ec_parse;
+
+/* callback invoked by parse() or complete() to build the dynamic node
+ * the behavior of the node can depend on what is already parsed */
+typedef struct ec_node *(*ec_node_dynamic_build_t)(
+       struct ec_parse *state, void *opaque);
+
+struct ec_node *ec_node_dynamic(const char *id, ec_node_dynamic_build_t build,
+                               void *opaque);
+
+#endif