aboutsummaryrefslogtreecommitdiff
path: root/src/lib/daemon_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/daemon_info.c')
-rw-r--r--src/lib/daemon_info.c55
1 files changed, 45 insertions, 10 deletions
diff --git a/src/lib/daemon_info.c b/src/lib/daemon_info.c
index b724094d..47009687 100644
--- a/src/lib/daemon_info.c
+++ b/src/lib/daemon_info.c
@@ -1,20 +1,52 @@
1/*
2 This file is part of libmicrohttpd
3 Copyright (C) 2007-2018 Daniel Pittman and Christian Grothoff
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
1 19
2/** 20/**
3 * Obtain information about the given daemon 21 * @file lib/daemon_info.c
4 * (not fully implemented!). 22 * @brief implementation of MHD_daemon_get_information_sz()
23 * @author Christian Grothoff
24 */
25#include "internal.h"
26
27
28/**
29 * Obtain information about the given daemon.
30 * Use wrapper macro #MHD_daemon_get_information() instead of direct use
31 * of this function.
5 * 32 *
6 * @param daemon what daemon to get information about 33 * @param daemon what daemon to get information about
7 * @param info_type what information is desired? 34 * @param info_type what information is desired?
8 * @param ... depends on @a info_type 35 * @param[out] return_value pointer to union where requested information will
9 * @return NULL if this information is not available 36 * be stored
10 * (or if the @a info_type is unknown) 37 * @param return_value_size size of union MHD_DaemonInformation at compile
38 * time
39 * @return #MHD_YES on success, #MHD_NO on error
40 * (@a info_type is unknown, NULL pointer etc.)
11 * @ingroup specialized 41 * @ingroup specialized
12 */ 42 */
13const union MHD_DaemonInfo * 43enum MHD_Bool
14MHD_get_daemon_info (struct MHD_Daemon *daemon, 44MHD_daemon_get_information_sz (struct MHD_Daemon *daemon,
15 enum MHD_DaemonInfoType info_type, 45 enum MHD_DaemonInformationType info_type,
16 ...) 46 union MHD_DaemonInformation *return_value,
47 size_t return_value_size)
17{ 48{
49#if OLD
18 if (NULL == daemon) 50 if (NULL == daemon)
19 return NULL; 51 return NULL;
20 switch (info_type) 52 switch (info_type)
@@ -55,6 +87,9 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon,
55 default: 87 default:
56 return NULL; 88 return NULL;
57 } 89 }
90#else
91 return MHD_NO;
92#endif
58} 93}
59 94
60 95/* end of daemon_info.c */