![]() |
Diffusion C API 6.12.0
|
Functions | |
DIFFUSION_FETCH_REQUEST_T * | diffusion_fetch_request_init (SESSION_T *session) |
Creates an unconfigured fetch request. | |
DIFFUSION_FETCH_REQUEST_T * | diffusion_fetch_request_dup (const DIFFUSION_FETCH_REQUEST_T *fetch_request) |
Create a duplicate (copy) of an existing DIFFUSION_FETCH_REQUEST_T . | |
void | diffusion_fetch_request_free (DIFFUSION_FETCH_REQUEST_T *fetch_request) |
Free a memory allocated DIFFUSION_FETCH_REQUEST_T | |
TOPIC_HANDLER_T | subscribe (SESSION_T *session, const SUBSCRIPTION_PARAMS_T params) |
Request subscription to topic. | |
TOPIC_HANDLER_T | diffusion_subscribe_with_scope (SESSION_T *session, const char *selection_scope, const SUBSCRIPTION_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Request subscription to topics using a scope selection. | |
void | unsubscribe (SESSION_T *session, const UNSUBSCRIPTION_PARAMS_T params) |
Unsubscribe from one or more topics. | |
bool | diffusion_unsubscribe_with_scope (SESSION_T *session, const char *selection_scope, const UNSUBSCRIPTION_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Unsubscribe from topics using a selection scope. | |
bool | diffusion_unsubscribe_all_scopes (SESSION_T *session, const UNSUBSCRIPTION_ALL_SCOPES_PARAMS_T params, DIFFUSION_API_ERROR *api_error) |
Unsubscribe topics from all topic selection scopes. | |
void | notify_subscription_register (SESSION_T *session, const NOTIFY_SUBSCRIPTION_PARAMS_T params) |
Register to receive subscription notifications. | |
void | notify_unsubscription_register (SESSION_T *session, const NOTIFY_UNSUBSCRIPTION_PARAMS_T params) |
Register to receive unsubscription notifications. | |
DIFFUSION_FETCH_REQUEST_T * diffusion_fetch_request_dup | ( | const DIFFUSION_FETCH_REQUEST_T * | fetch_request | ) |
Create a duplicate (copy) of an existing DIFFUSION_FETCH_REQUEST_T
.
diffusion_fetch_request_free
should be called on this pointer when no longer needed.
fetch_request | fetch request to be duplicated |
void diffusion_fetch_request_free | ( | DIFFUSION_FETCH_REQUEST_T * | fetch_request | ) |
Free a memory allocated DIFFUSION_FETCH_REQUEST_T
fetch_request | The fetch request to be freed |
DIFFUSION_FETCH_REQUEST_T * diffusion_fetch_request_init | ( | SESSION_T * | session | ) |
Creates an unconfigured fetch request.
session | The session handle. If NULL, the function returns NULL. |
TOPIC_HANDLER_T diffusion_subscribe_with_scope | ( | SESSION_T * | session, |
const char * | selection_scope, | ||
const SUBSCRIPTION_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Request subscription to topics using a scope selection.
The session will become subscribed to each existing topic matching the selector unless the session is already subscribed to the topic, or the session does not have READ_TOPIC
permission for the topic path. For each topic to which the session becomes subscribed, a subscription notification and initial value (if any) will be delivered to registered value streams.
The subscription request is also retained at the server and the session will be automatically subscribed to newly created topics that match the selector (unless a subsequent unsubscription cancels the request).
session | The session handle. If NULL, this function returns immediately. |
scope | Specifies the scope of the selection. |
params | Parameters describing the subscription request and callbacks handlers which may be invoked in response. |
api_error | Populated on API error. Can be 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_all_scopes | ( | SESSION_T * | session, |
const UNSUBSCRIPTION_ALL_SCOPES_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Unsubscribe topics from all topic selection scopes.
This can be used at any time whilst connected to reduce the set of topics to which the session is subscribed or negate earlier subscription requests and will apply to all scopes in use.
session | The session handle. If NULL, this function returns immediately. |
params | Parameters describing the unsubscription request and callback handlers which may be invoked in response. |
api_error | Populated on API error. Can be 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_with_scope | ( | SESSION_T * | session, |
const char * | selection_scope, | ||
const UNSUBSCRIPTION_PARAMS_T | params, | ||
DIFFUSION_API_ERROR * | api_error | ||
) |
Unsubscribe from topics using a selection scope.
This can be used at any time whilst connected to reduce the set of topics to which the session is subscribed or negate earlier subscription requests.
session | The session handle. If NULL, this function returns immediately. |
scope | Specifies the scope of the selection. |
params | Parameters describing the unsubscription request and callback handlers which may be invoked in response. |
api_error | Populated on API error. Can be 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 notify_subscription_register | ( | SESSION_T * | session, |
const NOTIFY_SUBSCRIPTION_PARAMS_T | params | ||
) |
Register to receive subscription notifications.
This function should be called by the application to register to receive notifications that it has been subscribed to a topic.
session | The current session. If NULL, this function returns immediately. |
params | Callbacks and other parameters. on_notify_subscription should be set to receive notifications. |
void notify_unsubscription_register | ( | SESSION_T * | session, |
const NOTIFY_UNSUBSCRIPTION_PARAMS_T | params | ||
) |
Register to receive unsubscription notifications.
This function should be called by the application to receive notifications that it has been unsubscribed to a topic.
session | The current session. If NULL, this function returns immediately. |
params | Callbacks and other parameters. on_notify_unsubscription should be set to receive notifications. |
TOPIC_HANDLER_T subscribe | ( | SESSION_T * | session, |
const SUBSCRIPTION_PARAMS_T | params | ||
) |
Request subscription to topic.
This is equivalent to calling diffusion_subscribe_with_scope
specifying DEFAULT_SELECTION_SCOPE
.
session | The session handle. If NULL, the function returns immediately. |
params | Parameters describing the subscription request and callbacks handlers which may be invoked in response. |
void unsubscribe | ( | SESSION_T * | session, |
const UNSUBSCRIPTION_PARAMS_T | params | ||
) |
Unsubscribe from one or more topics.
This is equivalent to calling diffusion_unsubscribe_with_scope
specifying DEFAULT_SELECTION_SCOPE
.
session | The session handle. If NULL, this function returns immediately. |
params | Parameters describing the unsubscription request and callback handlers which may be invoked in response. |