Tor
0.4.7.0-alpha-dev
|
Header for functions that add relationships to a pubsub builder. More...
#include "lib/dispatch/msgtypes.h"
Go to the source code of this file.
Typedefs | |
typedef struct pubsub_connector_t | pubsub_connector_t |
Functions | |
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) |
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) |
int | pubsub_connector_register_type_ (struct pubsub_connector_t *, msg_type_id_t, dispatch_typefns_t *, const char *file, unsigned line) |
Header for functions that add relationships to a pubsub builder.
These functions are used by modules that need to add publication and subscription requests. Most users will want to call these functions indirectly, via the macros in pubsub_macros.h.
Definition in file pubsub_connect.h.
typedef struct pubsub_connector_t pubsub_connector_t |
A "dispatch connector" is a view of the dispatcher that a subsystem uses while initializing itself. It is specific to the subsystem, and ensures that each subsystem doesn't need to identify itself repeatedly while registering its messages.
Definition at line 1 of file pubsub_connect.h.
int pubsub_add_pub_ | ( | pubsub_connector_t * | con, |
pub_binding_t * | out, | ||
channel_id_t | channel, | ||
message_id_t | msg, | ||
msg_type_id_t | type, | ||
unsigned | flags, | ||
const char * | file, | ||
unsigned | line | ||
) |
Use con to add a request for being able to publish messages of type msg with auxiliary data of type on channel.
Definition at line 124 of file pubsub_build.c.
int pubsub_add_sub_ | ( | 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 | ||
) |
Use con to add a request for being able to publish messages of type msg with auxiliary data of type on channel, passing them to the callback in recv_fn.
Definition at line 171 of file pubsub_build.c.
int pubsub_connector_register_type_ | ( | pubsub_connector_t * | con, |
msg_type_id_t | type, | ||
dispatch_typefns_t * | fns, | ||
const char * | file, | ||
unsigned | line | ||
) |
Use con to define the functions to use for manipulating the type type. Any function pointers left as NULL will be implemented as no-ops.
Definition at line 216 of file pubsub_build.c.