mco_metadict_unregister

Unregister a database dictionary from the meta-dictionary.

Prototype

    MCO_RET mco_metadict_unregister(	/*IN*/ mco_metadict_header_t * metadict,
                       /*IN*/ const char * name );

Arguments

metadict
The address of a mco_metadict_header_t structure.
name
The name of the dictionary. Must be unique within this meta-dictionary.

Description

The API unregisters a database dictionary from the meta-dictionary. This function marks the specified dictionary entry as empty. (Note that, as it is possible to unregister a dictionary, this must be taken into account when calling function mco_metadict_count(). If dictionary unregister operations were used then it is necessary to check the value returned by function mco_metadict_entry() which indicates whether a dictionary with specified number actually exists. See API mco_metadict_count() for an example.)

Return Codes

MCO_S_OK
The metadictionary was successfully unregistered.
MCO_E_UDA_DICT_NOTFOUND
The dictionary is not registered.

Example

    Application snippet:

    const char * dbname = "SimpleDb";

    int main(int argc, char* argv[])
    {
        MCO_RET rc;
        unsigned int size;
        mco_metadict_header_t *header;

        mco_metadict_size(10, &size); /* figure out the buffer size to
                             register 10 database dictionaries */
        ...

        header = (mco_metadict_header_t *) malloc(size);
        mco_metadict_init(header, size); /* initialize the metadict */
        ...
        rc = mco_metadict_unregister(header, "test_db");

        ...
    }

Files

Header file:
mcouda.h
Source file:
mcouda.c
Library:
libmcouda.a