gnunet-daemon-hostlist_server.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_server.h
  19. * @brief hostlist support. Downloads HELLOs via HTTP.
  20. * @author Christian Grothoff
  21. */
  22. #ifndef GNUNET_DAEMON_HOSTLIST_SERVER_H
  23. #define GNUNET_DAEMON_HOSTLIST_SERVER_H
  24. #include "gnunet_core_service.h"
  25. #include "gnunet_statistics_service.h"
  26. #include "gnunet_util_lib.h"
  27. /**
  28. * Start server offering our hostlist.
  29. *
  30. * @param c configuration to use
  31. * @param st statistics handle to use
  32. * @param co core handle to use
  33. * @param[out] server_ch set to handler for CORE connect events
  34. * @param[out] server_dh set to handler for CORE disconnect events
  35. * @param advertise #GNUNET_YES if we should advertise our hostlist
  36. * @return #GNUNET_OK on success
  37. */
  38. int
  39. GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
  40. struct GNUNET_STATISTICS_Handle *st,
  41. struct GNUNET_CORE_Handle *core,
  42. GNUNET_CORE_ConnectEventHandler *server_ch,
  43. GNUNET_CORE_DisconnectEventHandler *server_dh,
  44. int advertise);
  45. /**
  46. * Stop server offering our hostlist.
  47. */
  48. void
  49. GNUNET_HOSTLIST_server_stop (void);
  50. #endif
  51. /* end of gnunet-daemon-hostlist_server.h */