# mco_fh_mod_add_data_source

> Add a data source from the module’s configuration section.

### Prototype

        mco_fh_ret mco_fh_mod_add_data_source(/*IN*/ mco_fh_module_h h,
                                /*IN*/ const char *type,
                                /*IN*/ const char *name)

### Arguments

h | The module handle
type | The type of the data source
name | The name of the data source

### Description

> This function adds a data source from the module’s configuration section.

### Return Codes

MCO_FH_OK | Data source successfully added
MCO_FH_E_INVALID_CONFIG | The configuration is invalid, e.g. the data source name is invalid
MCO_FH_E_BAD_HANDLE | The module handle is invalid

### Example

        mco_fh_ret mco_fh_mod_add_data_source(mco_fh_module_h h, const char *type, const char *name)
        {
            return reinterpret_cast<TestFeedHandler *>(h)->addDataSource(type, name);
        }