aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r--src/include/microhttpd2.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 7a67fbd3..c69d8731 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2006-2017 Christian Grothoff, Karlson2k (Evgeny Grin) 3 Copyright (C) 2006-2018 Christian Grothoff, Karlson2k (Evgeny Grin)
4 (and other contributing authors) 4 (and other contributing authors)
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
@@ -23,8 +23,9 @@
23 * Note that we do not indicate which of the OLD APIs 23 * Note that we do not indicate which of the OLD APIs
24 * simply need to be kept vs. deprecated. 24 * simply need to be kept vs. deprecated.
25 * 25 *
26 *
26 * The goal is to provide a basis for discussion! 27 * The goal is to provide a basis for discussion!
27 * None of this is implemented yet. 28 * Little of this is implemented yet.
28 * 29 *
29 * Main goals: 30 * Main goals:
30 * - simplify application callbacks by splitting header/upload/post 31 * - simplify application callbacks by splitting header/upload/post
@@ -64,7 +65,13 @@
64 * supported (include the descriptive string) by using an enum; 65 * supported (include the descriptive string) by using an enum;
65 * - simplify API for common-case of one-shot responses by 66 * - simplify API for common-case of one-shot responses by
66 * eliminating need for destroy response in most cases; 67 * eliminating need for destroy response in most cases;
68 *
69 * TODO:
70 * - varargs in upgrade is still there and ugly (and not even used!)
71 * - migrate event loop apis (get fdset, timeout, MHD_run(), etc.)
67 */ 72 */
73#ifndef MICROHTTPD2_H
74#define MICROHTTPD2_H
68 75
69 76
70/** 77/**
@@ -1018,8 +1025,8 @@ MHD_daemon_tls_key_and_cert_from_memory (struct MHD_Daemon *daemon,
1018 * @return #MHD_SC_OK upon success; TODO: define failure modes 1025 * @return #MHD_SC_OK upon success; TODO: define failure modes
1019 */ 1026 */
1020_MHD_EXTERN enum MHD_StatusCode 1027_MHD_EXTERN enum MHD_StatusCode
1021 MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon, 1028MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon,
1022 const char *dh); 1029 const char *dh);
1023 1030
1024 1031
1025/** 1032/**
@@ -1356,17 +1363,16 @@ MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon,
1356 1363
1357 1364
1358/** 1365/**
1359 * Generate option to set a custom timeout for the given connection. 1366 * Set custom timeout for the given connection.
1360 * Specified as the number of seconds. Use zero for no timeout. If 1367 * Specified as the number of seconds. Use zero for no timeout.
1361 * timeout was set to zero (or unset) before, setting of a new value 1368 * Calling this function will reset timeout timer.
1362 * by MHD_connection_set_option() will reset timeout timer.
1363 * 1369 *
1364 * @param connection connection to configure timeout for 1370 * @param connection connection to configure timeout for
1365 * @param timeout_s new timeout in seconds 1371 * @param timeout_s new timeout in seconds
1366 */ 1372 */
1367_MHD_EXTERN struct MHD_ConnectionOption 1373_MHD_EXTERN void
1368MHD_connection_timeout (struct MHD_Connection *connection, 1374MHD_connection_set_timeout (struct MHD_Connection *connection,
1369 unsigned int timeout_s); 1375 unsigned int timeout_s);
1370 1376
1371 1377
1372/* **************** Request handling functions ***************** */ 1378/* **************** Request handling functions ***************** */
@@ -1792,6 +1798,9 @@ struct MHD_UpgradeResponseHandle;
1792 * It allows applications to perform 'special' actions on 1798 * It allows applications to perform 'special' actions on
1793 * the underlying socket from the upgrade. 1799 * the underlying socket from the upgrade.
1794 * 1800 *
1801 * FIXME: this API still uses the untyped, ugly varargs.
1802 * Should we not modernize this one as well?
1803 *
1795 * @param urh the handle identifying the connection to perform 1804 * @param urh the handle identifying the connection to perform
1796 * the upgrade @a action on. 1805 * the upgrade @a action on.
1797 * @param operation which operation should be performed 1806 * @param operation which operation should be performed
@@ -1987,6 +1996,7 @@ MHD_response_get_header (struct MHD_Response *response,
1987 1996
1988/* ************Upload and PostProcessor functions ********************** */ 1997/* ************Upload and PostProcessor functions ********************** */
1989 1998
1999
1990/** 2000/**
1991 * Action telling MHD to continue processing the upload. 2001 * Action telling MHD to continue processing the upload.
1992 * 2002 *
@@ -2493,3 +2503,6 @@ MHD_daemon_get_information_sz (struct MHD_Daemon *daemon,
2493 info_type, \ 2503 info_type, \
2494 return_value) \ 2504 return_value) \
2495 MHD_daemon_get_information_sz((daemon), (info_type), (return_value), sizeof(union MHD_DaemonInformation)); 2505 MHD_daemon_get_information_sz((daemon), (info_type), (return_value), sizeof(union MHD_DaemonInformation));
2506
2507
2508#endif