]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - buffer_tree.h
Introduce btr_node_status() and add btr support to the file writer.
[paraslash.git] / buffer_tree.h
index 04217801f70b934eb25987aeb4237e919d13bc4c..a95d1671079bf2d67d959635f9bb84f5d4caa723 100644 (file)
@@ -1,7 +1,11 @@
 
 struct btr_node;
 
-struct btr_node *btr_new_node(char *name, struct btr_node *parent);
+typedef int (*btr_command_handler)(struct btr_node *btrn,
+               const char *command, char **result);
+
+struct btr_node *btr_new_node(const char *name, struct btr_node *parent,
+               btr_command_handler handler, void *context);
 void btr_del_node(struct btr_node *btrn);
 void btr_add_output(char *buf, size_t size, struct btr_node *btrn);
 bool btr_no_children(struct btr_node *btrn);
@@ -10,3 +14,14 @@ size_t btr_get_input_queue_size(struct btr_node *btrn);
 bool btr_no_parent(struct btr_node *btrn);
 size_t btr_next_buffer(struct btr_node *btrn, char **bufp);
 void btr_consume(struct btr_node *btrn, size_t numbytes);
+int btr_exec(struct btr_node *btrn, const char *command, char **value_result);
+int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result);
+void btr_splice_out_node(struct btr_node *btrn);
+void btr_pushdown(struct btr_node *btrn);
+void *btr_context(struct btr_node *btrn);
+void btr_merge(struct btr_node *btrn, size_t dest_size);
+bool btr_eof(struct btr_node *btrn);
+void btr_log_tree(struct btr_node *btrn, int loglevel);
+int btr_pushdown_one(struct btr_node *btrn);
+bool btr_inplace_ok(struct btr_node *btrn);
+int btr_node_status(struct btr_node *btrn, size_t min_iqs);