pub_binding_st.h (1093B)
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 */ 6 7 /** 8 * @file pub_binding_st.h 9 * @brief Declaration of pub_binding_t. 10 * 11 * This is an internal type for the pubsub implementation. 12 */ 13 14 #ifndef TOR_PUB_BINDING_ST_H 15 #define TOR_PUB_BINDING_ST_H 16 17 #include "lib/dispatch/msgtypes.h" 18 struct dispatch_t; 19 20 /** 21 * A pub_binding_t is an opaque object that subsystems use to publish 22 * messages. The DISPATCH_ADD_PUB*() macros set it up. 23 **/ 24 typedef struct pub_binding_t { 25 /** 26 * A pointer to a configured dispatch_t object. This is filled in 27 * when the dispatch_t is finally constructed. 28 **/ 29 struct dispatch_t *dispatch_ptr; 30 /** 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 33 * correctly. 34 **/ 35 msg_t msg_template; 36 } pub_binding_t; 37 38 #endif /* !defined(TOR_PUB_BINDING_ST_H) */