Diffusion C API  6.5.13
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Creating and removing topics.

Functions

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. More...
 
void topic_removal (SESSION_T *session, const TOPIC_REMOVAL_PARAMS_T params)
 Remove topics from Diffusion. More...
 
void session_wills_remove_topics (SESSION_T *session, const SESSION_WILLS_REMOVE_TOPIC_PARAMS_T params)
 Register a topic removal session will. More...
 
CONVERSATION_ID_Tmissing_topic_register_handler (SESSION_T *session, const MISSING_TOPIC_PARAMS_T params)
 Register to receive notifications about missing topics that clients attempt to fetch/subscribe. More...
 
void missing_topic_deregister_handler (SESSION_T *session, const CONVERSATION_ID_T *conversation_id)
 Cease receiving missing topic notifications. More...
 

Detailed Description

Function Documentation

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.

Parameters
sessionThe current session. If NULL, this function returns immediately.
topic_pathThe topic path to be added.
specificationThe topic specification
callbackStruct containing pointers to callback functions will be called when a response to the request is received from the server.
void missing_topic_deregister_handler ( SESSION_T session,
const CONVERSATION_ID_T conversation_id 
)

Cease receiving missing topic notifications.

Parameters
sessionThe current session. If NULL, this function returns immediately.
conversation_idThe conversation id returned from a previous call to missing_topic_register_handler().
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 fetch/subscribe.

Missing topic notifications from a 'fetch' operation only occur when using the deprecated fetch mechanism. The newer diffusion_fetch_request_fetch mechanism does not support missing topic notifications.

Register a handler for receiving missing topic notifications when a client attempts to fetch or subscribe to a topic underneath a given root topic, but that requested topic doesn't exist.

Parameters
sessionThe current session. If NULL, this function returns immediately with the value NULL.
paramsParameters defining the registration request.
Returns
A conversation id that can be used to deregister the handler at a later time, or NULL if the supplied session is NULL.
void session_wills_remove_topics ( SESSION_T session,
const SESSION_WILLS_REMOVE_TOPIC_PARAMS_T  params 
)

Register a topic removal session will.

An application should call this function to register a session will, whereby the specified topics are removed on session disconnection.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameters describing the session will registration request and the callback handlers which may be invoked in response.
void topic_removal ( SESSION_T session,
const TOPIC_REMOVAL_PARAMS_T  params 
)

Remove topics from Diffusion.

Send a request to remove one or more topics at the server. The topics to remove will depend upon the nature of the topic selector specified. If the selector does not have descendant pattern qualifiers (i.e. / or //), only those topics that exist at paths indicated by the selector will be removed and not their descendants. If a single / qualifier is specified, all descendants of the matching topic paths will be removed. If // is specified, all branches of the topic tree that match the selector (i.e topics at the selected paths and all descendants of the selected paths) will be removed.

Parameters
sessionThe current session. If NULL, this function returns immediately.
paramsParameter structure describing which topics to remove and callbacks to handle success or failure notifications.