The C API, MessageHandlerAPI.h, defines the function signatures you must implement to build a message handler plug-in.
/* Initialization function */
typedef int32_t (*ffh_mh_init_function)(
ffh_mh_info *, /* handler info */
ffh_init_param *, /* array of init_param */
int32_t ); /* num ffhinit_param items */
/* Finalization function */
typedef void (*ffh_mh_fini_fuction)( ffh_mh_info * );
/* Process Function */
typedef int32_t (*ffh_mh_process_function)( ffh_mh_event * );
/* Return value from the above functions which
return int32_t indicating success.
Any other values indicate an error and are
defined internally by the library. */
#define FFH_MH_SUCESS 0
/* Callback functions */
typedef void (*ffh_mh_p_session_shutdown)( ffh_mh_info * );
typedef void (*ffh_mh_p_release_message)(
ffh_mh_info *,
ffh_fast_message * );
/* Data structures */
typedef struct {
const char * name;
const char *value;
} ffh_init_param;
typedef enum ffh_mh_event_type {MHET_RECEIVE_MESSAGE = 0};
typedef struct {
int16_t version;
void * handlerID;
void * loggerID;
ffh_mh_p_session_shutdown shutdown;
ffh_mh_p_release_message release_message;
void * user_data;
} ffh_mh_info;
typedef struct {
int16_t version;
ffh_mh_event_type event;
ffh_mh_info * info;
ffh_fast_message * message;
} ffh_mh_event;