]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - chunk_queue.h
Move chunk_queue stuff to own files chunk_queue.[ch].
[paraslash.git] / chunk_queue.h
diff --git a/chunk_queue.h b/chunk_queue.h
new file mode 100644 (file)
index 0000000..6d981a3
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2007 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file chunk_queue.h Exported symbols from chunk_queue.c. */
+
+struct chunk_queue;
+struct queued_chunk;
+
+int cq_enqueue(struct chunk_queue *cq, long unsigned chunk_num, size_t sent);
+struct queued_chunk *cq_peek(struct chunk_queue *cq);
+void cq_dequeue(struct chunk_queue *cq);
+void cq_update(struct chunk_queue *cq, size_t sent);
+int cq_get(struct queued_chunk *qc, char **buf, size_t *len);
+struct chunk_queue *cq_new(size_t max_pending);
+void cq_destroy(struct chunk_queue *cq);