aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r--src/include/microhttpd.h47
1 files changed, 16 insertions, 31 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 680e6d23..2197d9d9 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -84,7 +84,7 @@ extern "C"
84/** 84/**
85 * Current version of the library. 85 * Current version of the library.
86 */ 86 */
87#define MHD_VERSION 0x00000100 87#define MHD_VERSION 0x00000200
88 88
89/** 89/**
90 * MHD-internal return codes. 90 * MHD-internal return codes.
@@ -373,6 +373,11 @@ enum MHD_ValueKind
373 */ 373 */
374 MHD_GET_ARGUMENT_KIND = 8, 374 MHD_GET_ARGUMENT_KIND = 8,
375 375
376 /**
377 * HTTP footer (only for http 1.1 chunked encodings).
378 */
379 MHD_FOOTER_KIND = 16,
380
376}; 381};
377 382
378/** 383/**
@@ -544,9 +549,15 @@ typedef int
544 * libmicrohttpd guarantees that "pos" will be 549 * libmicrohttpd guarantees that "pos" will be
545 * the sum of all non-negative return values 550 * the sum of all non-negative return values
546 * obtained from the content reader so far. 551 * obtained from the content reader so far.
547 * @return -1 on error (libmicrohttpd will no longer 552 * @return -1 for the end of transmission (or on error);
548 * try to read content and instead close the connection 553 * if a content transfer size was pre-set and the callback
549 * with the client). 554 * has provided fewer than that amount of data,
555 * MHD will close the connection with the client;
556 * if no content size was specified and this is an
557 * http 1.1 connection using chunked encoding, MHD will
558 * interpret "-1" as the normal end of the transfer
559 * (possibly allowing the client to perform additional
560 * requests using the same TCP connection).
550 */ 561 */
551typedef int 562typedef int
552 (*MHD_ContentReaderCallback) (void *cls, size_t pos, char *buf, int max); 563 (*MHD_ContentReaderCallback) (void *cls, size_t pos, char *buf, int max);
@@ -596,7 +607,7 @@ typedef int
596 * in which case connections from any IP will be 607 * in which case connections from any IP will be
597 * accepted 608 * accepted
598 * @param apc_cls extra argument to apc 609 * @param apc_cls extra argument to apc
599 * @param dh default handler for all URIs 610 * @param dh handler called for all requests (repeatedly)
600 * @param dh_cls extra argument to dh 611 * @param dh_cls extra argument to dh
601 * @param ... list of options (type-value pairs, 612 * @param ... list of options (type-value pairs,
602 * terminated with MHD_OPTION_END). 613 * terminated with MHD_OPTION_END).
@@ -655,32 +666,6 @@ int MHD_get_timeout (struct MHD_Daemon *daemon, unsigned long long *timeout);
655 */ 666 */
656int MHD_run (struct MHD_Daemon *daemon); 667int MHD_run (struct MHD_Daemon *daemon);
657 668
658
659/**
660 * Register an access handler for all URIs beginning with uri_prefix.
661 *
662 * @param uri_prefix
663 * @return MRI_NO if a handler for this exact prefix
664 * already exists
665 */
666int
667MHD_register_handler (struct MHD_Daemon *daemon,
668 const char *uri_prefix,
669 MHD_AccessHandlerCallback dh, void *dh_cls);
670
671/**
672 * Unregister an access handler for the URIs beginning with
673 * uri_prefix.
674 *
675 * @param uri_prefix
676 * @return MHD_NO if a handler for this exact prefix
677 * is not known for this daemon
678 */
679int
680MHD_unregister_handler (struct MHD_Daemon *daemon,
681 const char *uri_prefix,
682 MHD_AccessHandlerCallback dh, void *dh_cls);
683
684/** 669/**
685 * Get all of the headers from the request. 670 * Get all of the headers from the request.
686 * 671 *