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-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
8 * @file pub_binding_st.h
9 * @brief Declaration of pub_binding_t.
11 * This is an internal type for the pubsub implementation.
14 #ifndef TOR_PUB_BINDING_ST_H
15 #define TOR_PUB_BINDING_ST_H
17 #include "lib/dispatch/msgtypes.h"
21 * A pub_binding_t is an opaque object that subsystems use to publish
22 * messages. The DISPATCH_ADD_PUB*() macros set it up.
24 typedef struct pub_binding_t
{
26 * A pointer to a configured dispatch_t object. This is filled in
27 * when the dispatch_t is finally constructed.
29 struct dispatch_t
*dispatch_ptr
;
31 * A template for the msg_t fields that are filled in for this message.
32 * This is copied into outgoing messages, ensuring that their fields are set
38 #endif /* !defined(TOR_PUB_BINDING_ST_H) */