aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-08-09 20:04:44 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-08-09 20:08:58 +0300
commitc943867f5f6c374e44ff0297fc388a3e4edb09e9 (patch)
tree7d46363d488ad5f291a9167b84ebdfc54cd0069d /src/include/microhttpd2.h
parentf454457953a718c9306e06c595d614ce31e1d351 (diff)
downloadlibmicrohttpd-c943867f5f6c374e44ff0297fc388a3e4edb09e9.tar.gz
libmicrohttpd-c943867f5f6c374e44ff0297fc388a3e4edb09e9.zip
Updated MHD_*_get_information() functions.
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 f4e6443c..352e54cd 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
@@ -53,6 +54,7 @@
53 * at the same time avoid symbol conflict with legacy names 54 * at the same time avoid symbol conflict with legacy names
54 * (so we can have one binary implementing old and new 55 * (so we can have one binary implementing old and new
55 * library API at the same time via compatibility layer). 56 * library API at the same time via compatibility layer).
57 * - improve thread-safety
56 */ 58 */
57 59
58 60
@@ -1885,18 +1887,41 @@ union MHD_ConnectionInformation
1885 1887
1886/** 1888/**
1887 * Obtain information about the given connection. 1889 * Obtain information about the given connection.
1890 * Use wrapper macro #MHD_connection_get_information() instead of direct use
1891 * of this function.
1888 * 1892 *
1889 * @param connection what connection to get information about 1893 * @param connection what connection to get information about
1890 * @param info_type what information is desired? 1894 * @param info_type what information is desired?
1891 * @param ... depends on @a info_type 1895 * @param[out] return_value pointer to union where requested information will
1892 * @return NULL if this information is not available 1896 * be stored
1893 * (or if the @a info_type is unknown) 1897 * @param return_value_size size of union MHD_DaemonInformation at compile
1898 * time
1899 * @return #MHD_YES on success, #MHD_NO on error
1900 * (@a info_type is unknown, NULL pointer etc.)
1894 * @ingroup specialized 1901 * @ingroup specialized
1895 */ 1902 */
1896_MHD_EXTERN const union MHD_ConnectionInformation * 1903_MHD_EXTERN enum MHD_Bool
1897MHD_connection_get_information (struct MHD_Connection *connection, 1904MHD_connection_get_information_sz (struct MHD_Connection *connection,
1898 enum MHD_ConnectionInformationType info_type, 1905 enum MHD_ConnectionInformationType info_type,
1899 ...); 1906 union MHD_ConnectionInformation *return_value,
1907 size_t return_value_size);
1908
1909
1910/**
1911 * Obtain information about the given connection.
1912 *
1913 * @param connection what connection to get information about
1914 * @param info_type what information is desired?
1915 * @param[out] return_value pointer to union where requested information will
1916 * be stored
1917 * @return #MHD_YES on success, #MHD_NO on error
1918 * (@a info_type is unknown, NULL pointer etc.)
1919 * @ingroup specialized
1920 */
1921#define MHD_connection_get_information(connection, \
1922 info_type, \
1923 return_value) \
1924 MHD_connection_get_information_sz ((connection),(info_type),(return_value),sizeof(enum MHD_ConnectionInformationType))
1900 1925
1901 1926
1902/** 1927/**
@@ -1960,19 +1985,42 @@ enum MHD_RequestInformationType
1960 1985
1961 1986
1962/** 1987/**
1963 * Obtain information about the given connection. 1988 * Obtain information about the given request.
1989 * Use wrapper macro #MHD_request_get_information() instead of direct use
1990 * of this function.
1964 * 1991 *
1965 * @param connection what connection to get information about 1992 * @param request what request to get information about
1966 * @param info_type what information is desired? 1993 * @param info_type what information is desired?
1967 * @param ... depends on @a info_type 1994 * @param[out] return_value pointer to union where requested information will
1968 * @return NULL if this information is not available 1995 * be stored
1969 * (or if the @a info_type is unknown) 1996 * @param return_value_size size of union MHD_DaemonInformation at compile
1997 * time
1998 * @return #MHD_YES on success, #MHD_NO on error
1999 * (@a info_type is unknown, NULL pointer etc.)
1970 * @ingroup specialized 2000 * @ingroup specialized
1971 */ 2001 */
1972_MHD_EXTERN const union MHD_RequestInformation * 2002_MHD_EXTERN enum MHD_Bool
1973MHD_request_get_information (struct MHD_Request *request, 2003MHD_request_get_information_sz (struct MHD_Request *request,
1974 enum MHD_RequestInformationType info_type, 2004 enum MHD_RequestInformationType info_type,
1975 ...); 2005 union MHD_RequestInformation *return_value,
2006 size_t return_value_size);
2007
2008
2009/**
2010 * Obtain information about the given request.
2011 *
2012 * @param request what request to get information about
2013 * @param info_type what information is desired?
2014 * @param[out] return_value pointer to union where requested information will
2015 * be stored
2016 * @return #MHD_YES on success, #MHD_NO on error
2017 * (@a info_type is unknown, NULL pointer etc.)
2018 * @ingroup specialized
2019 */
2020#define MHD_request_get_information (request, \
2021 info_type, \
2022 return_value) \
2023 MHD_request_get_information_sz ((request), (info_type), (return_value), sizeof(union MHD_RequestInformation))
1976 2024
1977 2025
1978/** 2026/**
@@ -2043,18 +2091,38 @@ union MHD_DaemonInformation
2043 2091
2044 2092
2045/** 2093/**
2046 * Obtain information about the given daemon 2094 * Obtain information about the given daemon.
2047 * (not fully implemented!). 2095 * Use wrapper macro #MHD_daemon_get_information() instead of direct use
2096 * of this function.
2048 * 2097 *
2049 * @param daemon what daemon to get information about 2098 * @param daemon what daemon to get information about
2050 * @param info_type what information is desired? 2099 * @param info_type what information is desired?
2051 * @param ... depends on @a info_type 2100 * @param[out] return_value pointer to union where requested information will
2052 * @return NULL if this information is not available 2101 * be stored
2053 * (or if the @a info_type is unknown) 2102 * @param return_value_size size of union MHD_DaemonInformation at compile
2103 * time
2104 * @return #MHD_YES on success, #MHD_NO on error
2105 * (@a info_type is unknown, NULL pointer etc.)
2054 * @ingroup specialized 2106 * @ingroup specialized
2055 */ 2107 */
2056_MHD_EXTERN const union MHD_DaemonInformation * 2108_MHD_EXTERN enum MHD_Bool
2057MHD_daemon_get_information (struct MHD_Daemon *daemon, 2109MHD_daemon_get_information_sz (struct MHD_Daemon *daemon,
2058 enum MHD_DaemonInformationType info_type, 2110 enum MHD_DaemonInformationType info_type,
2059 ...); 2111 union MHD_DaemonInformation *return_value,
2112 size_t return_value_size);
2060 2113
2114/**
2115 * Obtain information about the given daemon.
2116 *
2117 * @param daemon what daemon to get information about
2118 * @param info_type what information is desired?
2119 * @param[out] return_value pointer to union where requested information will
2120 * be stored
2121 * @return #MHD_YES on success, #MHD_NO on error
2122 * (@a info_type is unknown, NULL pointer etc.)
2123 * @ingroup specialized
2124 */
2125#define MHD_daemon_get_information(daemon, \
2126 info_type, \
2127 return_value) \
2128 MHD_daemon_get_information_sz((daemon), (info_type), (return_value), sizeof(union MHD_DaemonInformation));