Diffusion C API  6.7.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
handler_set_s Struct Reference

A handler set is registered against a conversation id and contains function pointers to callback handlers related to that conversation. More...

Data Fields

SERVICE_TYPE_T service_type
 The handler's service type.
 
void(* service_handler [SERVICE_TYPE_MAX_VALUE])()
 Handlers for any service that may be related to the conversation. More...
 
int(* error_handler [SERVICE_TYPE_MAX_VALUE])()
 Error handler callbacks for services related to the conversation. More...
 
DISCARD_HANDLER_T discard_handler [SERVICE_TYPE_MAX_VALUE]
 Callback invoked when a conversation is discarded, e.g. More...
 
TOPIC_HANDLER_T topic_message_handler
 If a topic message is received for this conversation, then this callback is used to process it. More...
 
void * system_context
 This may contain service-specific data to be passed to context handlers. More...
 
void * user_params
 A structure containing the parameters passed in the initial API call. More...
 
void(* system_context_free )(void *ctx)
 Callback for freeing the system context when handler_set_free() is called. More...
 
void(* user_params_free )(void *params)
 Callback for freeing the user params when handler_set_free() is called. More...
 

Detailed Description

A handler set is registered against a conversation id and contains function pointers to callback handlers related to that conversation.

Users should avoid populating or accessing this structure.

Field Documentation

DISCARD_HANDLER_T handler_set_s::discard_handler[SERVICE_TYPE_MAX_VALUE]

Callback invoked when a conversation is discarded, e.g.

due to reconnect/failover.

int(* handler_set_s::error_handler[SERVICE_TYPE_MAX_VALUE])()

Error handler callbacks for services related to the conversation.

void(* handler_set_s::service_handler[SERVICE_TYPE_MAX_VALUE])()

Handlers for any service that may be related to the conversation.

void* handler_set_s::system_context

This may contain service-specific data to be passed to context handlers.

void(* handler_set_s::system_context_free)(void *ctx)

Callback for freeing the system context when handler_set_free() is called.

If not provided, the memory is not freed.

TOPIC_HANDLER_T handler_set_s::topic_message_handler

If a topic message is received for this conversation, then this callback is used to process it.

void* handler_set_s::user_params

A structure containing the parameters passed in the initial API call.

Specific to each API function, but normally includes user callbacks and context data.

void(* handler_set_s::user_params_free)(void *params)

Callback for freeing the user params when handler_set_free() is called.

If not provided, free() will be used.


The documentation for this struct was generated from the following file: