gnunet-daemon-hostlist_client.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. This file is part of GNUnet.
  3. (C) 2009 Christian Grothoff (and other contributing authors)
  4. GNUnet is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published
  6. by the Free Software Foundation; either version 3, or (at your
  7. option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNUnet; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17. /**
  18. * @file hostlist/gnunet-daemon-hostlist_client.h
  19. * @brief hostlist support. Downloads HELLOs via HTTP.
  20. * @author Christian Grothoff
  21. */
  22. #ifndef GNUNET_DAEMON_HOSTLIST_CLIENT_H
  23. #define GNUNET_DAEMON_HOSTLIST_CLIENT_H
  24. #include "gnunet_core_service.h"
  25. #include "gnunet_statistics_service.h"
  26. #include "gnunet_util_lib.h"
  27. /**
  28. * Start downloading hostlists from hostlist servers as necessary.
  29. *
  30. * @param c configuration to use
  31. * @param st statistics handle to use
  32. * @param[out] ch set to handler for CORE connect events
  33. * @param[out] dh set to handler for CORE disconnect events
  34. * @param[out] msgh set to handler for CORE advertisement messages
  35. * @param learn should we learn hostlist URLs from CORE
  36. * @return #GNUNET_OK on success
  37. */
  38. int
  39. GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
  40. struct GNUNET_STATISTICS_Handle *st,
  41. GNUNET_CORE_ConnectEventHandler *ch,
  42. GNUNET_CORE_DisconnectEventHandler *dh,
  43. GNUNET_CORE_MessageCallback *msgh,
  44. int learn);
  45. /**
  46. * Stop downloading hostlists from hostlist servers as necessary.
  47. */
  48. void
  49. GNUNET_HOSTLIST_client_stop (void);
  50. #endif
  51. /* end of gnunet-daemon-hostlist_client.h */