Diffusion C API  6.8.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
subscription-control.h File Reference

Subscription control feature. 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 notifcation 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(). More...
 
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. More...
 
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. More...
 
void unsubscribe_client (SESSION_T *session, const SUBSCRIPTION_CONTROL_PARAMS_T params)
 Unsubscribe a session from topics. More...
 
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. More...
 
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. More...
 

Detailed Description

Subscription control feature.

Typedef Documentation

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.
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.