gnunet-service-fs_pe.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. This file is part of GNUnet.
  3. (C) 2011 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 fs/gnunet-service-fs_pe.h
  19. * @brief API to manage query plan
  20. * @author Christian Grothoff
  21. */
  22. #ifndef GNUNET_SERVICE_FS_PE_H
  23. #define GNUNET_SERVICE_FS_PE_H
  24. #include "gnunet-service-fs.h"
  25. /**
  26. * Create a new query plan entry.
  27. *
  28. * @param cp peer with the entry
  29. * @param pr request with the entry
  30. */
  31. void
  32. GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr);
  33. /**
  34. * Notify the plan about a peer being no longer available;
  35. * destroy all entries associated with this peer.
  36. *
  37. * @param cp connected peer
  38. */
  39. void
  40. GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
  41. /**
  42. * Notify the plan about a request being done;
  43. * destroy all entries associated with this request.
  44. *
  45. * @param pr request that is done
  46. */
  47. void
  48. GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
  49. /**
  50. * Initialize plan subsystem.
  51. */
  52. void
  53. GSF_plan_init (void);
  54. /**
  55. * Shutdown plan subsystem.
  56. */
  57. void
  58. GSF_plan_done (void);
  59. #endif
  60. /* end of gnunet-service-fs_pe.h */