hostlist-server.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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/hostlist-server.h
  19. * @brief hostlist support. Downloads HELLOs via HTTP.
  20. * @author Christian Grothoff
  21. */
  22. #ifndef HOSTLIST_SERVER_H
  23. #define HOSTLIST_SERVER_H
  24. #include "gnunet_core_service.h"
  25. #include "gnunet_statistics_service.h"
  26. #include "gnunet_util_lib.h"
  27. #define GNUNET_ADV_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
  28. /**
  29. * Start server offering our hostlist.
  30. *
  31. * @return GNUNET_OK on success
  32. */
  33. int
  34. GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
  35. struct GNUNET_STATISTICS_Handle *st,
  36. struct GNUNET_CORE_Handle *core,
  37. GNUNET_CORE_ConnectEventHandler *server_ch,
  38. GNUNET_CORE_DisconnectEventHandler *server_dh,
  39. int advertise);
  40. /**
  41. * Stop server offering our hostlist.
  42. */
  43. void
  44. GNUNET_HOSTLIST_server_stop (void);
  45. #endif
  46. /* end of hostlist-server.h */