2 This file is part of GNUnet.
3 Copyright (C) 2009 GNUnet e.V.
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * @file hostlist/gnunet-daemon-hostlist_client.h
20 * @brief hostlist support. Downloads HELLOs via HTTP.
21 * @author Christian Grothoff
23 #ifndef GNUNET_DAEMON_HOSTLIST_CLIENT_H
24 #define GNUNET_DAEMON_HOSTLIST_CLIENT_H
26 #include "gnunet_core_service.h"
27 #include "gnunet_statistics_service.h"
28 #include "gnunet_util_lib.h"
32 * Function that handles an advertised URI.
34 * @param uri 0-termianted URI of a hostlist
37 (*GNUNET_HOSTLIST_UriHandler)(const char *uri);
41 * Start downloading hostlists from hostlist servers as necessary.
43 * @param c configuration to use
44 * @param st statistics handle to use
45 * @param[out] ch set to handler for CORE connect events
46 * @param[out] dh set to handler for CORE disconnect events
47 * @param[out] msgh set to handler for CORE advertisement messages
48 * @param learn should we learn hostlist URLs from CORE
49 * @return #GNUNET_OK on success
52 GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
53 struct GNUNET_STATISTICS_Handle *st,
54 GNUNET_CORE_ConnectEventHandler *ch,
55 GNUNET_CORE_DisconnectEventHandler *dh,
56 GNUNET_HOSTLIST_UriHandler *msgh,
61 * Stop downloading hostlists from hostlist servers as necessary.
64 GNUNET_HOSTLIST_client_stop (void);
68 /* end of gnunet-daemon-hostlist_client.h */