Database - Extlang

Database - Extlang — An interface to access Extlang Database

Synopsis

lt_extlang_t *      lt_extlang_db_lookup                (lt_extlang_db_t *extlangdb,
                                                         const char *subtag);
lt_extlang_db_t *   lt_extlang_db_new                   (void);
lt_extlang_db_t *   lt_extlang_db_ref                   (lt_extlang_db_t *extlangdb);
                    lt_extlang_db_t;
void                lt_extlang_db_unref                 (lt_extlang_db_t *extlangdb);

Description

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

Details

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.

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]

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.

extlangdb :

a lt_extlang_db_t.

Returns :

the same extlangdb object. [transfer none]

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.


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).

extlangdb :

a lt_extlang_db_t.