## Database - Extlang

Database - Extlang — An interface to access Extlang Database

## Functions

lt_extlang_db_t * | lt_extlang_db_new ()
lt_extlang_db_t * | lt_extlang_db_ref ()
void | lt_extlang_db_unref ()
lt_extlang_t * | lt_extlang_db_lookup ()

## Types and Values

| lt_extlang_db_t

## Description

This class provides an interface to access Extlang database. which has been registered as ISO 639 code.

## Functions

### lt_extlang_db_new ()

    lt_extlang_db_t *
    lt_extlang_db_new (void);

Create a new instance of a lt_extlang_db_t.

#### Returns

a new instance of lt_extlang_db_t.

[transfer full]

### lt_extlang_db_ref ()

    lt_extlang_db_t *
    lt_extlang_db_ref (lt_extlang_db_t *extlangdb);

Increases the reference count of `extlangdb` .

#### Parameters

extlangdb | a lt_extlang_db_t. |

#### Returns

the same `extlangdb` object.

[transfer none]

### lt_extlang_db_unref ()

    void
    lt_extlang_db_unref (lt_extlang_db_t *extlangdb);

Decreases the reference count of `extlangdb` . when its reference count drops to 0, the object is finalized (i.e. its memory is freed).

#### Parameters

extlangdb | a lt_extlang_db_t. |

### lt_extlang_db_lookup ()

    lt_extlang_t *
    lt_extlang_db_lookup (lt_extlang_db_t *extlangdb,
                          const char *subtag);

Lookup `lt_extlang_t` if `subtag` is valid and registered into the database.

#### Parameters

extlangdb | a lt_extlang_db_t. |
subtag | a subtag name to lookup. |

#### Returns

a lt_extlang_t that meets with `subtag` . otherwise `NULL`.

[transfer full]

## Types and Values

### lt_extlang_db_t

    typedef struct _lt_extlang_db_t lt_extlang_db_t;

All the fields in the lt_extlang_db_t structure are private to the lt_extlang_db_t implementation.