![]() |
Diffusion C API 6.11.5
|
Functions | |
TOPIC_HANDLER_T | subscribe (SESSION_T *session, const SUBSCRIPTION_PARAMS_T params) |
Subscribe to topics. | |
void | notify_subscription_register (SESSION_T *session, const NOTIFY_SUBSCRIPTION_PARAMS_T params) |
Register to receive subscription notifications. | |
void | unsubscribe (SESSION_T *session, const UNSUBSCRIPTION_PARAMS_T params) |
Unsubscribe from one or more topics. | |
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_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 | |
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. |
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 | ||
) |
Subscribe to topics.
This function has the roles of subscribing to the topics specified by the selector and installing handlers for received TOPIC_MESSAGE_T messages which match that selector and also any other service messages related to subscription.
If a topic handler was already registered for the supplied selector, it is replaced and the old handlers are returned.
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 before the completion handler is called.
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, 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 function has the roles of subscribing to the topics specified by the selector and installing handlers for received TOPIC_MESSAGE_T messages which match that selector and also any other service messages related to unsubscription.
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. |