mainloop_pubsub.h 762 B

123456789101112131415161718192021222324
  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. #ifndef TOR_MAINLOOP_PUBSUB_H
  7. #define TOR_MAINLOOP_PUBSUB_H
  8. struct pubsub_builder_t;
  9. typedef enum {
  10. DELIV_NEVER=0,
  11. DELIV_PROMPT,
  12. DELIV_IMMEDIATE,
  13. } deliv_strategy_t;
  14. int tor_mainloop_connect_pubsub(struct pubsub_builder_t *builder);
  15. void tor_mainloop_connect_pubsub_events(void);
  16. int tor_mainloop_set_delivery_strategy(const char *msg_channel_name,
  17. deliv_strategy_t strategy);
  18. void tor_mainloop_disconnect_pubsub(void);
  19. #endif /* !defined(TOR_MAINLOOP_PUBSUB_H) */