Creates a module instance.
mco_fh_ret mco_fh_mod_create(/*IN*/ mco_fh_config_node_h cfg,
/*OUT*/ mco_fh_module_h *h)
cfg
h
This function creates a module instance from the custom module configuration node passed in
argument cfg.
mco_fh_ret
mco_fh_ret mco_fh_mod_create(mco_fh_config_node_h cfg, mco_fh_module_h *h)
{
// Create handler object and pass its pointer as an mco_fh_module_h handle to the application.
// Set the handler up using the configuration.
TestFeedHandler *handler = new TestFeedHandler;
if (handler->setup(cfg))
{
*h = handler;
return MCO_FH_OK;
}
else
{
*h = NULL;
return MCO_FH_E_INVALID_CONFIG;
}
}