add meson support
[protos/libecoli.git] / include / ecoli_yaml.h
diff --git a/include/ecoli_yaml.h b/include/ecoli_yaml.h
new file mode 100644 (file)
index 0000000..a63d837
--- /dev/null
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2018, Olivier MATZ <zer0@droids-corp.org>
+ */
+
+/**
+ * Interface to import/export ecoli data structures in YAML.
+ */
+
+#ifndef ECOLI_NODE_YAML_
+#define ECOLI_NODE_YAML_
+
+struct ec_node;
+
+/**
+ * Parse a YAML file and build an ec_node tree from it.
+ *
+ * @param filename
+ *   The path to the file to be parsed.
+ * @return
+ *   The ec_node tree on success, or NULL on error (errno is set).
+ *   The returned node must be freed by the caller with ec_node_free().
+ */
+struct ec_node *ec_yaml_import(const char *filename);
+
+#endif