pubsub_connect.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright (c) 2001, Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * @file pubsub_connect.h
  8. * @brief Header for functions that add relationships to a pubsub builder.
  9. *
  10. * These functions are used by modules that need to add publication and
  11. * subscription requests.
  12. **/
  13. #ifndef TOR_PUBSUB_CONNECT_H
  14. #define TOR_PUBSUB_CONNECT_H
  15. #include "lib/dispatch/msgtypes.h"
  16. struct pub_binding_t;
  17. struct pubsub_connector_t;
  18. int pubsub_add_pub_(struct pubsub_connector_t *con,
  19. struct pub_binding_t *out,
  20. channel_id_t channel,
  21. message_id_t msg,
  22. msg_type_id_t type,
  23. unsigned flags,
  24. const char *file,
  25. unsigned line);
  26. int pubsub_add_sub_(struct pubsub_connector_t *con,
  27. recv_fn_t recv_fn,
  28. channel_id_t channel,
  29. message_id_t msg,
  30. msg_type_id_t type,
  31. unsigned flags,
  32. const char *file,
  33. unsigned line);
  34. int pubsub_connector_define_type_(struct pubsub_connector_t *,
  35. msg_type_id_t,
  36. dispatch_typefns_t *,
  37. const char *file,
  38. unsigned line);
  39. #endif