First draft of the libosl patch series.
[paraslash.git] / chunk_queue.h
1 /*
2 * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file chunk_queue.h Exported symbols from chunk_queue.c. */
8
9 struct chunk_queue;
10 struct queued_chunk;
11
12 int cq_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes);
13 struct queued_chunk *cq_peek(struct chunk_queue *cq);
14 void cq_dequeue(struct chunk_queue *cq);
15 void cq_update(struct chunk_queue *cq, size_t sent);
16 int cq_get(struct queued_chunk *qc, const char **buf, size_t *len);
17 struct chunk_queue *cq_new(size_t max_pending);
18 void cq_destroy(struct chunk_queue *cq);