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 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.
16 * @file hostlist/gnunet-daemon-hostlist_client.h
17 * @brief hostlist support. Downloads HELLOs via HTTP.
18 * @author Christian Grothoff
20 #ifndef GNUNET_DAEMON_HOSTLIST_CLIENT_H
21 #define GNUNET_DAEMON_HOSTLIST_CLIENT_H
23 #include "gnunet_core_service.h"
24 #include "gnunet_statistics_service.h"
25 #include "gnunet_util_lib.h"
29 * Function that handles an advertised URI.
31 * @param uri 0-termianted URI of a hostlist
34 (*GNUNET_HOSTLIST_UriHandler)(const char *uri);
38 * Start downloading hostlists from hostlist servers as necessary.
40 * @param c configuration to use
41 * @param st statistics handle to use
42 * @param[out] ch set to handler for CORE connect events
43 * @param[out] dh set to handler for CORE disconnect events
44 * @param[out] msgh set to handler for CORE advertisement messages
45 * @param learn should we learn hostlist URLs from CORE
46 * @return #GNUNET_OK on success
49 GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
50 struct GNUNET_STATISTICS_Handle *st,
51 GNUNET_CORE_ConnectEventHandler *ch,
52 GNUNET_CORE_DisconnectEventHandler *dh,
53 GNUNET_HOSTLIST_UriHandler *msgh,
58 * Stop downloading hostlists from hostlist servers as necessary.
61 GNUNET_HOSTLIST_client_stop (void);
65 /* end of gnunet-daemon-hostlist_client.h */