C API Definitions of Function Signatures for Building a Message Handler

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;
Related concepts
Message Handler Plug-ins
Related tasks
Writing a Message Handler Plug-in for the FAST Feed Handler
Writing a Message Handler Plug-in Initialize Function
Writing a Message Handler Plug-in Process Function
Writing a Message Handler Plug-in Finalize Function
Implementing the Shutdown Callback Method
Related reference
Arguments of the Message Handler Plug-in Initialize Function
Arguments of the Message Handler Process Function
Arguments of the Message Handler Finalize Function
C API Definition of ffh_fast_message and its Related Structures
FAST Templates