![]() |
Diffusion C API 6.11.5
|
Allows the creation and removal of topics and notification of missing topics. More...
Data Structures | |
struct | add_topic_callback_s |
add_topic_from_specification callback More... | |
struct | topic_removal_handlers_s |
struct | topic_removal_params_s |
Structure passed to topic_removal(). More... | |
struct | svc_missing_topic_request_s |
Structure of a request to register for missing topic notifications. More... | |
struct | missing_topic_handlers_s |
struct | missing_topic_params_s |
Structure supplied when registering to receive missing topic notifications. More... | |
Typedefs | |
typedef int(* | on_topic_add_cb) (SESSION_T *session, TOPIC_ADD_RESULT_CODE result_code, void *context) |
Callback for add_topic_from_specification(). | |
typedef int(* | on_topic_add_failed_cb) (SESSION_T *session, TOPIC_ADD_FAIL_RESULT_CODE result_code, const DIFFUSION_ERROR_T *error, void *context) |
Callback for add_topic_from_specification(). | |
typedef struct add_topic_callback_s | ADD_TOPIC_CALLBACK_T |
add_topic_from_specification callback | |
typedef struct DIFFUSION_TOPIC_REMOVAL_RESULT_T | DIFFUSION_TOPIC_REMOVAL_RESULT_T |
An opaque topic removal result struct. | |
typedef int(* | on_topic_removal_cb) (SESSION_T *session, const DIFFUSION_TOPIC_REMOVAL_RESULT_T *result, void *context) |
Callback for topic_removal() handlers. | |
typedef struct topic_removal_params_s | TOPIC_REMOVAL_PARAMS_T |
Structure passed to topic_removal(). | |
typedef struct svc_missing_topic_request_s | SVC_MISSING_TOPIC_REQUEST_T |
Structure of a request to register for missing topic notifications. | |
typedef int(* | on_missing_topic_cb) (SESSION_T *session, const SVC_MISSING_TOPIC_REQUEST_T *request, void *context) |
Callback for missing_topic_register_handler(). | |
typedef struct missing_topic_params_s | MISSING_TOPIC_PARAMS_T |
Structure supplied when registering to receive missing topic notifications. | |
Functions | |
int | diffusion_topic_removal_result_removed_count (const DIFFUSION_TOPIC_REMOVAL_RESULT_T *topic_removal_result) |
The number of topics removed in the topic removal result. | |
void | add_topic_from_specification (SESSION_T *session, const char *topic_path, const TOPIC_SPECIFICATION_T *specification, const ADD_TOPIC_CALLBACK_T callback) |
Add a topic to Diffusion. | |
void | topic_removal (SESSION_T *session, const TOPIC_REMOVAL_PARAMS_T params) |
Remove topics from Diffusion. | |
CONVERSATION_ID_T * | missing_topic_register_handler (SESSION_T *session, const MISSING_TOPIC_PARAMS_T params) |
Register to receive notifications about missing topics that clients attempt to subscribe. | |
void | missing_topic_deregister_handler (SESSION_T *session, const CONVERSATION_ID_T *conversation_id) |
Cease receiving missing topic notifications. | |
Allows the creation and removal of topics and notification of missing topics.
typedef int(* on_missing_topic_cb) (SESSION_T *session, const SVC_MISSING_TOPIC_REQUEST_T *request, void *context) |
Callback for missing_topic_register_handler().
Called when a session subscribes using a topic selector that matches no existing topics.
session | The current active session. |
request | The incoming notification message. |
context | User-supplied context from the initial registration call. |
typedef int(* on_topic_add_cb) (SESSION_T *session, TOPIC_ADD_RESULT_CODE result_code, void *context) |
Callback for add_topic_from_specification().
session | The current active session. |
result_code | The result code from the topic add request. |
context | User-supplied context from the initial add_topic_from_specification() call. |
typedef int(* on_topic_add_failed_cb) (SESSION_T *session, TOPIC_ADD_FAIL_RESULT_CODE result_code, const DIFFUSION_ERROR_T *error, void *context) |
Callback for add_topic_from_specification().
session | The current active session. |
result_code | The topic add failure result code |
error | The error reason. This will only be set if this function is called through the callback |
context | User-supplied context from the initial add_topic_from_specification() call. |
typedef int(* on_topic_removal_cb) (SESSION_T *session, const DIFFUSION_TOPIC_REMOVAL_RESULT_T *result, void *context) |
Callback for topic_removal() handlers.
session | The current active session. |
result | The response message from Diffusion. |
context | User-supplied context from the topic_removal() call. |
typedef struct svc_missing_topic_request_s SVC_MISSING_TOPIC_REQUEST_T |
Structure of a request to register for missing topic notifications.
Notification that a session has made a subscription request using a selector that does not match any topics.
Enumerator | |
---|---|
ADD_TOPIC_FAILURE_REASON_SUCCESS | No error while adding topic. |
ADD_TOPIC_FAILURE_REASON_EXISTS | Topic already existed with exactly the same details. |
ADD_TOPIC_FAILURE_REASON_EXISTS_MISMATCH | Topic already exists with the same name but different details. |
ADD_TOPIC_FAILURE_REASON_INVALID_NAME | The name of the topic was found to be invalid. |
ADD_TOPIC_FAILURE_REASON_INVALID_DETAILS | Some aspect of the details failed validation. |
ADD_TOPIC_FAILURE_REASON_USER_CODE_ERROR |
A user supplied class could either not be found or could not be instantiated at the server. |
ADD_TOPIC_FAILURE_REASON_PERMISSIONS_FAILURE | The client was denied permission to add a topic of the specified type a the given point in the topic hierarchy. |
ADD_TOPIC_FAILURE_REASON_UNEXPECTED_ERROR | An unexpected error occurred whilst attempting to create the topic. |
int diffusion_topic_removal_result_removed_count | ( | const DIFFUSION_TOPIC_REMOVAL_RESULT_T * | topic_removal_result | ) |
The number of topics removed in the topic removal result.
topic_removal_result | Topic removal result to query |
NULL
.