tor  0.4.2.1-alpha-dev
pubsub_connect.h
Go to the documentation of this file.
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 
16 #ifndef TOR_PUBSUB_CONNECT_H
17 #define TOR_PUBSUB_CONNECT_H
18 
19 #include "lib/dispatch/msgtypes.h"
20 
21 struct pub_binding_t;
29 
30 int pubsub_add_pub_(struct pubsub_connector_t *con,
31  struct pub_binding_t *out,
32  channel_id_t channel,
33  message_id_t msg,
34  msg_type_id_t type,
35  unsigned flags,
36  const char *file,
37  unsigned line);
38 
39 int pubsub_add_sub_(struct pubsub_connector_t *con,
40  recv_fn_t recv_fn,
41  channel_id_t channel,
42  message_id_t msg,
43  msg_type_id_t type,
44  unsigned flags,
45  const char *file,
46  unsigned line);
47 
51  const char *file,
52  unsigned line);
53 
54 #endif /* !defined(TOR_PUBSUB_CONNECT_H) */
struct pubsub_connector_t pubsub_connector_t
Types used for messages in the dispatcher code.
int pubsub_add_pub_(struct pubsub_connector_t *con, struct pub_binding_t *out, channel_id_t channel, message_id_t msg, msg_type_id_t type, unsigned flags, const char *file, unsigned line)
Definition: pubsub_build.c:124
uint16_t msg_type_id_t
Definition: msgtypes.h:29
void(* recv_fn_t)(const msg_t *m)
Definition: msgtypes.h:66
int pubsub_connector_register_type_(struct pubsub_connector_t *, msg_type_id_t, dispatch_typefns_t *, const char *file, unsigned line)
Definition: pubsub_build.c:216
int pubsub_add_sub_(struct pubsub_connector_t *con, recv_fn_t recv_fn, channel_id_t channel, message_id_t msg, msg_type_id_t type, unsigned flags, const char *file, unsigned line)
Definition: pubsub_build.c:171