Diffusion C API 6.11.5
Loading...
Searching...
No Matches
subscription-control.h File Reference

Allows the subscription on behalf of other sessions to the topic tree. More...

Data Structures

struct  subscription_control_params_s
 
struct  diffusion_subscribe_by_filter_s
 Structure supplied when issuing a diffusion_subscribe_by_filter call. More...
 
struct  diffusion_unsubscribe_by_filter_s
 Structure supplied when issuing a diffusion_unsubscribe_by_filter call. More...
 

Macros

#define SUBSCRIPTION_CONTROL_HANDLERS
 Callback handlers that may be registered so the caller may receive notification that a subscription or unsubscription request has completed.
 

Typedefs

typedef int(* on_subscription_control_cb) (SESSION_T *session, void *context)
 Callback for subscribe_client() and unsubscribe_client().
 
typedef int(* on_subscription_control_by_filter_cb) (const int number_selected, void *context)
 Callback for diffusion_subscribe_by_filter and diffusion_unsubscribe_by_filter.
 
typedef struct diffusion_subscribe_by_filter_s DIFFUSION_SUBSCRIBE_BY_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_subscribe_by_filter call.
 
typedef struct diffusion_unsubscribe_by_filter_s DIFFUSION_UNSUBSCRIBE_BY_FILTER_PARAMS_T
 Structure supplied when issuing a diffusion_unsubscribe_by_filter call.
 

Functions

void subscribe_client (SESSION_T *session, const SUBSCRIPTION_CONTROL_PARAMS_T params)
 Subscribe a session to topics.
 
void unsubscribe_client (SESSION_T *session, const SUBSCRIPTION_CONTROL_PARAMS_T params)
 Unsubscribe a session from topics.
 
bool diffusion_subscribe_by_filter (SESSION_T *session, const DIFFUSION_SUBSCRIBE_BY_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Subscribe sessions that satisfy a given session filter to topics.
 
bool diffusion_unsubscribe_by_filter (SESSION_T *session, const DIFFUSION_UNSUBSCRIBE_BY_FILTER_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Unsubscribe sessions that satisfy a given session filter from topics.
 

Detailed Description

Allows the subscription on behalf of other sessions to the topic tree.

Typedef Documentation

◆ on_subscription_control_by_filter_cb

typedef int(* on_subscription_control_by_filter_cb) (const int number_selected, void *context)

Callback for diffusion_subscribe_by_filter and diffusion_unsubscribe_by_filter.

Parameters
number_selectedNumber of sessions matching the filter.
contextUser-supplied context from the originating call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.

◆ on_subscription_control_cb

typedef int(* on_subscription_control_cb) (SESSION_T *session, void *context)

Callback for subscribe_client() and unsubscribe_client().

Parameters
sessionThe current active session.
contextUser-supplied context from the originating call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.