aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-08-13 12:44:16 +0200
committerChristian Grothoff <christian@grothoff.org>2017-08-13 12:44:16 +0200
commit4233bad6a1a6832cbeb007f726a0dbbfc11b8b7b (patch)
tree19d1e62b8bb5a938bd429d30dab8d1d800e62550 /src/include/microhttpd2.h
parent8a60c4cf02157b5a8afea02a9fb06c2f69cb5c44 (diff)
parent9b6340ff77e407c1061199259ea0ca7808353d4d (diff)
downloadlibmicrohttpd-4233bad6a1a6832cbeb007f726a0dbbfc11b8b7b.tar.gz
libmicrohttpd-4233bad6a1a6832cbeb007f726a0dbbfc11b8b7b.zip
merge
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r--src/include/microhttpd2.h120
1 files changed, 94 insertions, 26 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index f2c65761..ec15d5dd 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -1,6 +1,7 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2006-2017 Christian Grothoff (and other contributing authors) 3 Copyright (C) 2006-2017 Christian Grothoff, Karlson2k (Evgeny Grin)
4 (and other contributing authors)
4 5
5 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 7 modify it under the terms of the GNU Lesser General Public
@@ -58,6 +59,7 @@
58 * supported (include the descriptive string) by using an enum; 59 * supported (include the descriptive string) by using an enum;
59 * - simplify API for common-case of one-shot responses by 60 * - simplify API for common-case of one-shot responses by
60 * eliminating need for destroy response in those cases; 61 * eliminating need for destroy response in those cases;
62 * - improve thread-safety
61 */ 63 */
62 64
63 65
@@ -1895,18 +1897,41 @@ union MHD_ConnectionInformation
1895 1897
1896/** 1898/**
1897 * Obtain information about the given connection. 1899 * Obtain information about the given connection.
1900 * Use wrapper macro #MHD_connection_get_information() instead of direct use
1901 * of this function.
1898 * 1902 *
1899 * @param connection what connection to get information about 1903 * @param connection what connection to get information about
1900 * @param info_type what information is desired? 1904 * @param info_type what information is desired?
1901 * @param ... depends on @a info_type 1905 * @param[out] return_value pointer to union where requested information will
1902 * @return NULL if this information is not available 1906 * be stored
1903 * (or if the @a info_type is unknown) 1907 * @param return_value_size size of union MHD_ConnectionInformation at compile
1908 * time
1909 * @return #MHD_YES on success, #MHD_NO on error
1910 * (@a info_type is unknown, NULL pointer etc.)
1904 * @ingroup specialized 1911 * @ingroup specialized
1905 */ 1912 */
1906_MHD_EXTERN const union MHD_ConnectionInformation * 1913_MHD_EXTERN enum MHD_Bool
1907MHD_connection_get_information (struct MHD_Connection *connection, 1914MHD_connection_get_information_sz (struct MHD_Connection *connection,
1908 enum MHD_ConnectionInformationType info_type, 1915 enum MHD_ConnectionInformationType info_type,
1909 ...); 1916 union MHD_ConnectionInformation *return_value,
1917 size_t return_value_size);
1918
1919
1920/**
1921 * Obtain information about the given connection.
1922 *
1923 * @param connection what connection to get information about
1924 * @param info_type what information is desired?
1925 * @param[out] return_value pointer to union where requested information will
1926 * be stored
1927 * @return #MHD_YES on success, #MHD_NO on error
1928 * (@a info_type is unknown, NULL pointer etc.)
1929 * @ingroup specialized
1930 */
1931#define MHD_connection_get_information(connection, \
1932 info_type, \
1933 return_value) \
1934 MHD_connection_get_information_sz ((connection),(info_type),(return_value),sizeof(union MHD_ConnectionInformation))
1910 1935
1911 1936
1912/** 1937/**
@@ -1970,19 +1995,42 @@ enum MHD_RequestInformationType
1970 1995
1971 1996
1972/** 1997/**
1973 * Obtain information about the given connection. 1998 * Obtain information about the given request.
1999 * Use wrapper macro #MHD_request_get_information() instead of direct use
2000 * of this function.
1974 * 2001 *
1975 * @param connection what connection to get information about 2002 * @param request what request to get information about
1976 * @param info_type what information is desired? 2003 * @param info_type what information is desired?
1977 * @param ... depends on @a info_type 2004 * @param[out] return_value pointer to union where requested information will
1978 * @return NULL if this information is not available 2005 * be stored
1979 * (or if the @a info_type is unknown) 2006 * @param return_value_size size of union MHD_RequestInformation at compile
2007 * time
2008 * @return #MHD_YES on success, #MHD_NO on error
2009 * (@a info_type is unknown, NULL pointer etc.)
1980 * @ingroup specialized 2010 * @ingroup specialized
1981 */ 2011 */
1982_MHD_EXTERN const union MHD_RequestInformation * 2012_MHD_EXTERN enum MHD_Bool
1983MHD_request_get_information (struct MHD_Request *request, 2013MHD_request_get_information_sz (struct MHD_Request *request,
1984 enum MHD_RequestInformationType info_type, 2014 enum MHD_RequestInformationType info_type,
1985 ...); 2015 union MHD_RequestInformation *return_value,
2016 size_t return_value_size);
2017
2018
2019/**
2020 * Obtain information about the given request.
2021 *
2022 * @param request what request to get information about
2023 * @param info_type what information is desired?
2024 * @param[out] return_value pointer to union where requested information will
2025 * be stored
2026 * @return #MHD_YES on success, #MHD_NO on error
2027 * (@a info_type is unknown, NULL pointer etc.)
2028 * @ingroup specialized
2029 */
2030#define MHD_request_get_information (request, \
2031 info_type, \
2032 return_value) \
2033 MHD_request_get_information_sz ((request), (info_type), (return_value), sizeof(union MHD_RequestInformation))
1986 2034
1987 2035
1988/** 2036/**
@@ -2053,18 +2101,38 @@ union MHD_DaemonInformation
2053 2101
2054 2102
2055/** 2103/**
2056 * Obtain information about the given daemon 2104 * Obtain information about the given daemon.
2057 * (not fully implemented!). 2105 * Use wrapper macro #MHD_daemon_get_information() instead of direct use
2106 * of this function.
2058 * 2107 *
2059 * @param daemon what daemon to get information about 2108 * @param daemon what daemon to get information about
2060 * @param info_type what information is desired? 2109 * @param info_type what information is desired?
2061 * @param ... depends on @a info_type 2110 * @param[out] return_value pointer to union where requested information will
2062 * @return NULL if this information is not available 2111 * be stored
2063 * (or if the @a info_type is unknown) 2112 * @param return_value_size size of union MHD_DaemonInformation at compile
2113 * time
2114 * @return #MHD_YES on success, #MHD_NO on error
2115 * (@a info_type is unknown, NULL pointer etc.)
2064 * @ingroup specialized 2116 * @ingroup specialized
2065 */ 2117 */
2066_MHD_EXTERN const union MHD_DaemonInformation * 2118_MHD_EXTERN enum MHD_Bool
2067MHD_daemon_get_information (struct MHD_Daemon *daemon, 2119MHD_daemon_get_information_sz (struct MHD_Daemon *daemon,
2068 enum MHD_DaemonInformationType info_type, 2120 enum MHD_DaemonInformationType info_type,
2069 ...); 2121 union MHD_DaemonInformation *return_value,
2122 size_t return_value_size);
2070 2123
2124/**
2125 * Obtain information about the given daemon.
2126 *
2127 * @param daemon what daemon to get information about
2128 * @param info_type what information is desired?
2129 * @param[out] return_value pointer to union where requested information will
2130 * be stored
2131 * @return #MHD_YES on success, #MHD_NO on error
2132 * (@a info_type is unknown, NULL pointer etc.)
2133 * @ingroup specialized
2134 */
2135#define MHD_daemon_get_information(daemon, \
2136 info_type, \
2137 return_value) \
2138 MHD_daemon_get_information_sz((daemon), (info_type), (return_value), sizeof(union MHD_DaemonInformation));