25 lines
720 B
C
25 lines
720 B
C
#ifndef cmsg_subscription_h
|
|
#define cmsg_subscription_h
|
|
|
|
typedef struct subscription_t_ {
|
|
sexp_t *uuid;
|
|
sexp_t *sink;
|
|
sexp_t *name;
|
|
struct subscription_t_ *link;
|
|
} subscription_t;
|
|
|
|
extern void free_subscription(subscription_t *sub);
|
|
extern void free_subscription_chain(subscription_t *chain);
|
|
|
|
extern int send_to_subscription(hashtable_t *subscriptions,
|
|
subscription_t *sub,
|
|
sexp_t *body);
|
|
extern subscription_t *send_to_subscription_chain(hashtable_t *subscriptions,
|
|
subscription_t *chain,
|
|
sexp_t *body);
|
|
|
|
extern subscription_t *handle_subscribe_message(hashtable_t *subscriptions, sexp_t *args);
|
|
extern void handle_unsubscribe_message(hashtable_t *subscriptions, sexp_t *args);
|
|
|
|
#endif
|