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 pubsub_connect.h
9 * @brief Header for functions that add relationships to a pubsub builder.
11 * These functions are used by modules that need to add publication and
12 * subscription requests. Most users will want to call these functions
13 * indirectly, via the macros in pubsub_macros.h.
16 #ifndef TOR_PUBSUB_CONNECT_H
17 #define TOR_PUBSUB_CONNECT_H
19 #include "lib/dispatch/msgtypes.h"
23 * A "dispatch connector" is a view of the dispatcher that a subsystem
24 * uses while initializing itself. It is specific to the subsystem, and
25 * ensures that each subsystem doesn't need to identify itself
26 * repeatedly while registering its messages.
28 typedef struct pubsub_connector_t pubsub_connector_t
;
30 int pubsub_add_pub_(struct pubsub_connector_t
*con
,
31 struct pub_binding_t
*out
,
39 int pubsub_add_sub_(struct pubsub_connector_t
*con
,
48 int pubsub_connector_register_type_(struct pubsub_connector_t
*,
54 #endif /* !defined(TOR_PUBSUB_CONNECT_H) */