summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/tipidee/response.h20
-rw-r--r--src/include/tipidee/util.h5
2 files changed, 16 insertions, 9 deletions
diff --git a/src/include/tipidee/response.h b/src/include/tipidee/response.h
index 31b8df4..f912cd3 100644
--- a/src/include/tipidee/response.h
+++ b/src/include/tipidee/response.h
@@ -10,6 +10,7 @@
#include <skalibs/gccattributes.h>
#include <skalibs/stat.h>
+#include <skalibs/uint64.h>
#include <skalibs/buffer.h>
#include <skalibs/strerr.h>
#include <skalibs/tai.h>
@@ -35,21 +36,24 @@ extern size_t tipidee_response_header_date_G (char *, size_t) ;
extern size_t tipidee_response_header_lastmodified (char *, size_t, struct stat const *) ;
+extern size_t tipidee_response_header_write (buffer *, tipidee_response_header const *, uint32_t) ;
extern size_t tipidee_response_header_writeall (buffer *, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
extern size_t tipidee_response_header_writeall_G (buffer *, tipidee_response_header const *, uint32_t, uint32_t) ;
-#define tipidee_response_header_writeall_g(b, rhdr, rhdrn, options) tipidee_response_header_writeall(b, rhdr, rhdrn, (options), &STAMP)
+
+extern size_t tipidee_response_header_end (buffer *) ;
+
extern size_t tipidee_response_header_writemerge (buffer *, tipidee_response_header const *, uint32_t, tipidee_headers const *, uint32_t, tain const *) ;
extern size_t tipidee_response_header_writemerge_G (buffer *, tipidee_response_header const *, uint32_t, tipidee_headers const *, uint32_t) ;
-#define tipidee_response_header_writemerge_g(b, rhdr, rhdrn, hdr, options) tipidee_response_header_writemerge(b, rhdr, rhdrn, hdr, (options), &STAMP)
-size_t tipidee_response_file (buffer *, tipidee_rql const *, unsigned int, char const *, struct stat const *, char const *, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
-size_t tipidee_response_file_G (buffer *, tipidee_rql const *, unsigned int, char const *, struct stat const *, char const *, tipidee_response_header const *, uint32_t, uint32_t) ;
-#define tipidee_response_file_g(b, rql, status, reason, st, ct, rhdr, rhdrn, options) tipidee_response_file(b, rql, status, reason, st, ct, rhdr, rhdrn, (options), &STAMP)
+size_t tipidee_response_file (buffer *, tipidee_rql const *, unsigned int, char const *, struct stat const *, uint64_t, char const *, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
+size_t tipidee_response_file_G (buffer *, tipidee_rql const *, unsigned int, char const *, struct stat const *, uint64_t, char const *, tipidee_response_header const *, uint32_t, uint32_t) ;
+
+size_t tipidee_response_partial (buffer *, tipidee_rql const *, struct stat const *, uint64_t, uint64_t, char const *, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
+size_t tipidee_response_partial_G (buffer *, tipidee_rql const *, struct stat const *, uint64_t, uint64_t, char const *, tipidee_response_header const *, uint32_t, uint32_t) ;
-extern size_t tipidee_response_error_nofile (buffer *, tipidee_rql const *, unsigned int, char const *, char const *, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
-extern size_t tipidee_response_error_nofile_G (buffer *, tipidee_rql const *, unsigned int, char const *, char const *, tipidee_response_header const *, uint32_t, uint32_t) ;
-#define tipidee_response_error_nofile_g(b, rql, status, reason, text, rhdr, rhdrn, options) tipidee_response_error_nofile(b, rql, status, reason, text, rhdr, rhdrn, (options), &STAMP)
+extern size_t tipidee_response_error_nofile (buffer *, tipidee_rql const *, unsigned int, char const *, char const *, tipidee_response_header const *, uint32_t, tipidee_response_header const *, uint32_t, uint32_t, tain const *) ;
+extern size_t tipidee_response_error_nofile_G (buffer *, tipidee_rql const *, unsigned int, char const *, char const *, tipidee_response_header const *, uint32_t, tipidee_response_header const *, uint32_t, uint32_t) ;
extern int tipidee_response_header_preparebuiltin (tipidee_response_header *, uint32_t, char const *, size_t) ;
diff --git a/src/include/tipidee/util.h b/src/include/tipidee/util.h
index 7870a23..18eb2ce 100644
--- a/src/include/tipidee/util.h
+++ b/src/include/tipidee/util.h
@@ -3,9 +3,10 @@
#ifndef TIPIDEE_UTIL_H
#define TIPIDEE_UTIL_H
-#include <stddef.h>
+#include <sys/types.h>
#include <stdint.h>
+#include <skalibs/uint64.h>
#include <skalibs/buffer.h>
#include <skalibs/tai.h>
#include <skalibs/stralloc.h>
@@ -31,4 +32,6 @@ extern int tipidee_util_chunked_read (buffer *, stralloc *, size_t, tain const *
extern int tipidee_util_httpdate (char const *, tain *) ;
extern int tipidee_util_defaulttext (unsigned int, tipidee_defaulttext *) ;
+extern int tipidee_util_parse_range (char const *, off_t, uint64_t *, uint64_t *) ;
+
#endif