aboutsummaryrefslogtreecommitdiff
path: root/src/tuberia.h
diff options
context:
space:
mode:
authorNicolas Dato <nicolas.dato@gmail.com>2024-10-13 19:57:49 -0300
committerNicolas Dato <nicolas.dato@gmail.com>2024-10-13 19:57:49 -0300
commit4a4e956c26d2f73534e504c36e2ca6a2617644b8 (patch)
tree72bc232f93514b3206da986e4d4aad1e3024e7d8 /src/tuberia.h
parent37e2f4899b5d3e594c1080e25c04b40bc29d53a4 (diff)
downloadlibtuberia-4a4e956c26d2f73534e504c36e2ca6a2617644b8.tar.gz
adding tests for the main library
Diffstat (limited to 'src/tuberia.h')
-rw-r--r--src/tuberia.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tuberia.h b/src/tuberia.h
index d410bab..9b3c56c 100644
--- a/src/tuberia.h
+++ b/src/tuberia.h
@@ -1,5 +1,5 @@
-#ifndef __LIBTUBERIA_H__
-#define __LIBTUBERIA_H__
+#ifndef LIBTUBERIA_H__
+#define LIBTUBERIA_H__
typedef struct tube tube;
typedef struct tube_source tube_source;
@@ -17,15 +17,18 @@ void tube_source_and_stages_free(tube_source **source);
int tube_stage_append(tube_source *source, tube_stage *stage);
-tube *tube_create(tube_source *source, tube_sink sink, void *opaque);
+tube *tube_alloc(const tube_source *source, tube_sink sink, void *opaque);
int tube_start(tube *ctx);
int tube_stop(tube *ctx);
void tube_free(tube **ctx);
int tube_inject(tube *ctx, int timeout_ms, void *element);
void *tube_retrive(tube *ctx, int timeout_ms);
-void tube_flush(tube *ctx);
-void tube_drop(tube *ctx);
+void tube_wait_empty(tube *ctx);
+void tube_discard_all(tube *ctx);
-#endif //__LIBTUBERIA_H__
+int tube_get_queued(const tube *ctx, int stage);
+int tube_get_slots(const tube *ctx, int stage);
+
+#endif //LIBTUBERIA_H__