pub_binding_st.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 pub_binding_st.h
  8. * @brief Declaration of pub_binding_t.
  9. *
  10. * This is an internal type for the pubsub implementation.
  11. */
  12. #ifndef TOR_PUB_BINDING_ST_H
  13. #define TOR_PUB_BINDING_ST_H
  14. #include "lib/dispatch/msgtypes.h"
  15. struct dispatch_t;
  16. /**
  17. * A pub_binding_t is an opaque object that subsystems use to publish
  18. * messages. The DISPATCH_ADD_PUB*() macros set it up.
  19. **/
  20. typedef struct pub_binding_t {
  21. /**
  22. * A pointer to a configured dispatch_t object. This is filled in
  23. * when the dispatch_t is finally constructed.
  24. **/
  25. struct dispatch_t *dispatch_ptr;
  26. /**
  27. * A template for the msg_t fields that are filled in for this message.
  28. * This is copied into outgoing messages, ensuring that their fields are set
  29. * corretly.
  30. **/
  31. msg_t msg_template;
  32. } pub_binding_t;
  33. #endif /* !defined(TOR_PUB_BINDING_ST_H) */