Diffusion C API  6.3.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Managing topic subscriptions.

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

Function Documentation

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.

For each session that matches the filter, new subscriptions will be established for existing topics that match the provided topic selector and for which the sessions has READ_TOPIC permission. The topic selector will be added to the topic selections of the subscribed session, and re-evaluated when new topics are added or the session's security roles change.

A session that does not have SELECT_TOPIC permission for a topic cannot subscribe directly, but can be subscribed indirectly using this method.

This function requests that a client is subscribed to the topics specified by a topic selector.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the diffusion_subscribe_by_filter request and callback handlers which may be invoked in response.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
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.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the diffusion_unsubscribe_by_filter request and callback handlers which may be invoked in response.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.
void subscribe_client ( SESSION_T session,
const SUBSCRIPTION_CONTROL_PARAMS_T  params 
)

Subscribe a session to topics.

This function requests that a client is subscribed to the topics specified by a topic selector.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the subscription control request and callback handlers which may be invoked in response.
void unsubscribe_client ( SESSION_T session,
const SUBSCRIPTION_CONTROL_PARAMS_T  params 
)

Unsubscribe a session from topics.

This function requests that a client is unsubscribed from the topics specified by a topic selector.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the subscription control request and callback handlers which may be invoked in response.