Merge branch 'maint-0.3.5' into maint-0.4.5
[tor.git] / src / lib / dispatch / dispatch_cfg_st.h
blob3c99adf2f7be84f7d65d8a3c078ece1b24d2f112
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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * @file dispatch_cfg_st.h
9 * @brief Declarations for dispatch-configuration types.
10 **/
12 #ifndef TOR_DISPATCH_CFG_ST_H
13 #define TOR_DISPATCH_CFG_ST_H
15 struct smartlist_t;
17 /** Information needed to create a dispatcher, but in a less efficient, more
18 * mutable format.
20 * Nearly everybody should use the \refdir{lib/pubsub} module to configure
21 * dispatchers, instead of using this. */
22 struct dispatch_cfg_t {
23 /** A list of msg_type_id_t (cast to void*), indexed by msg_t. */
24 struct smartlist_t *type_by_msg;
25 /** A list of channel_id_t (cast to void*), indexed by msg_t. */
26 struct smartlist_t *chan_by_msg;
27 /** A list of dispatch_rcv_t, indexed by msg_type_id_t. */
28 struct smartlist_t *fns_by_type;
29 /** A list of dispatch_typefns_t, indexed by msg_t. */
30 struct smartlist_t *recv_by_msg;
33 #endif /* !defined(TOR_DISPATCH_CFG_ST_H) */