summaryrefslogtreecommitdiff
path: root/src/chunk.h
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
commit8b2630a82fbecfd57fa38aebb397a755936690e5 (patch)
treea9cfcd7bb5bea87d63fc8ef81c8456a130a249bc /src/chunk.h
parente57c8295ebe92b58ca3e68fa8ea8f70d4b0b4cee (diff)
downloadlighttpd-master.tar.gz
add README to point to lighttpd-1.4.x as stableHEADmaster
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@3041 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/chunk.h')
-rw-r--r--src/chunk.h94
1 files changed, 0 insertions, 94 deletions
diff --git a/src/chunk.h b/src/chunk.h
deleted file mode 100644
index 63793b2f..00000000
--- a/src/chunk.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef _CHUNK_H_
-#define _CHUNK_H_
-
-#include "buffer.h"
-#include "array.h"
-#include "sys-mmap.h"
-
-typedef struct chunk {
- enum { UNUSED_CHUNK, MEM_CHUNK, FILE_CHUNK } type;
-
- buffer *mem; /* either the storage of the mem-chunk or the read-ahead buffer */
-
- struct {
- /* filechunk */
- buffer *name; /* name of the file */
- off_t start; /* starting offset in the file */
- off_t length; /* octets to send from the starting offset */
-
- int fd;
- struct {
- char *start; /* the start pointer of the mmap'ed area */
- size_t length; /* size of the mmap'ed area */
- off_t offset; /* start is <n> octets away from the start of the file */
- } mmap;
-
- int is_temp; /* file is temporary and will be deleted on cleanup */
-
- struct {
- int fd;
- off_t length;
- off_t offset;
- } copy;
- } file;
-
- off_t offset; /* octets sent from this chunk
- the size of the chunk is either
- - mem-chunk: mem->used - 1
- - file-chunk: file.length
- */
-
- struct {
- off_t written;
- int ret_val;
- } async;
-
- struct chunk *next;
-} chunk;
-
-typedef struct {
- chunk *first;
- chunk *last;
-
- array *tempdirs;
-
- int is_closed; /* the input to this CQ is closed */
-
- off_t bytes_in, bytes_out;
-} chunkqueue;
-
-LI_API void chunkpool_free(void);
-
-LI_API chunkqueue* chunkqueue_init(void);
-LI_API int chunkqueue_set_tempdirs(chunkqueue *c, array *tempdirs);
-LI_API int chunkqueue_append_file(chunkqueue *c, buffer *fn, off_t offset, off_t len);
-LI_API int chunkqueue_append_mem(chunkqueue *c, const char *mem, size_t len);
-LI_API int chunkqueue_append_buffer(chunkqueue *c, buffer *mem);
-LI_API int chunkqueue_prepend_buffer(chunkqueue *c, buffer *mem);
-
-LI_API buffer * chunkqueue_get_append_buffer(chunkqueue *c);
-LI_API buffer * chunkqueue_get_prepend_buffer(chunkqueue *c);
-LI_API chunk * chunkqueue_get_append_tempfile(chunkqueue *cq);
-LI_API int chunkqueue_steal_tempfile(chunkqueue *cq, chunk *in);
-LI_API off_t chunkqueue_steal_chunk(chunkqueue *cq, chunk *c);
-LI_API off_t chunkqueue_steal_chunks_len(chunkqueue *cq, chunk *c, off_t max_len);
-LI_API off_t chunkqueue_steal_all_chunks(chunkqueue *cq, chunkqueue *in);
-LI_API off_t chunkqueue_skip(chunkqueue *cq, off_t skip);
-LI_API void chunkqueue_remove_empty_last_chunk(chunkqueue *cq);
-
-LI_API int chunkqueue_remove_finished_chunks(chunkqueue *cq);
-
-LI_API off_t chunkqueue_length(chunkqueue *c);
-LI_API off_t chunkqueue_written(chunkqueue *c);
-LI_API void chunkqueue_free(chunkqueue *c);
-LI_API void chunkqueue_reset(chunkqueue *c);
-
-LI_API int chunkqueue_is_empty(chunkqueue *c);
-
-LI_API void chunkqueue_print(chunkqueue *cq);
-
-LI_API int chunk_is_done(chunk *c);
-LI_API void chunk_set_done(chunk *c);
-LI_API off_t chunk_length(chunk *c);
-
-#endif