summaryrefslogtreecommitdiff
path: root/src/ivyfifo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ivyfifo.h')
-rw-r--r--src/ivyfifo.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ivyfifo.h b/src/ivyfifo.h
new file mode 100644
index 0000000..14d0106
--- /dev/null
+++ b/src/ivyfifo.h
@@ -0,0 +1,35 @@
+#ifndef IVYFIFO_H
+#define IVYFIFO_H
+
+typedef struct IvyFifoBuffer {
+ char *buffer;
+ char *rptr, *wptr, *end;
+ int full;
+} IvyFifoBuffer;
+
+
+int IvyFifoInit(IvyFifoBuffer *f);
+
+void IvyFifoFree(IvyFifoBuffer *f);
+
+IvyFifoBuffer* IvyFifoNew (void);
+
+void IvyFifoDelete (IvyFifoBuffer *f);
+
+unsigned int IvyFifoLength(const IvyFifoBuffer *f);
+
+unsigned int IvyFifoSize(const IvyFifoBuffer *f);
+
+unsigned int IvyFifoAvail(const IvyFifoBuffer *f);
+
+unsigned int IvyFifoRead(IvyFifoBuffer *f, char *buf, int buf_size);
+
+unsigned int IvyFifoSendSocket (IvyFifoBuffer *f, const int fd);
+
+int IvyFifoIsFull (const IvyFifoBuffer *f) ;
+
+void IvyFifoWrite(IvyFifoBuffer *f, const char *buf, int size);
+
+
+
+#endif /* IVYFIFO_H */