# mco_fh_mod_add_subscription

> Add a subscription to the module’s subscription list.

### Prototype

        mco_fh_ret mco_fh_mod_add_subscription(/*IN*/ mco_fh_module_h h,
                                /*IN*/ const char *source_name,
                                /*IN*/ const char *data_domain,
                                /*IN*/ const char **syms,
                                /*IN*/ mco_size_t nsyms);

### Arguments

h | The module handle
source_name | The name of the data source for this subscription
data_domain | The data domain for this subscription (optional, module-specific)
syms | An array of pointers to symbol names
nsyms | The number of elements in the `syms` array

### Description

> This adds a subscription to the module’s subscription list.

### 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_subscription(mco_fh_module_h h, const char *source_name,
                                const char *data_domain, const char **syms, mco_size_t nsyms)
        {
            return reinterpret_cast<TestFeedHandler *>(h)->addSubscription(source_name, data_domain, syms, nsyms);
        }