Database - Language

Database - Language — An interface to access Language Database

Synopsis

lt_lang_t *         lt_lang_db_lookup                   (lt_lang_db_t *langdb,
                                                         const char *subtag);
lt_lang_db_t *      lt_lang_db_new                      (void);
lt_lang_db_t *      lt_lang_db_ref                      (lt_lang_db_t *langdb);
                    lt_lang_db_t;
void                lt_lang_db_unref                    (lt_lang_db_t *langdb);

Description

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

Details

lt_lang_db_lookup ()

lt_lang_t *         lt_lang_db_lookup                   (lt_lang_db_t *langdb,
                                                         const char *subtag);

Lookup lt_lang_t if subtag is valid and registered into the database.

langdb :

a lt_lang_db_t.

subtag :

a subtag name to lookup.

Returns :

a lt_lang_t that meets with subtag. otherwise NULL. [transfer full]

lt_lang_db_new ()

lt_lang_db_t *      lt_lang_db_new                      (void);

Create a new instance of a lt_lang_db_t.

Returns :

a new instance of lt_lang_db_t. [transfer full]

lt_lang_db_ref ()

lt_lang_db_t *      lt_lang_db_ref                      (lt_lang_db_t *langdb);

Increases the reference count of langdb.

langdb :

a lt_lang_db_t.

Returns :

the same langdb object. [transfer none]

lt_lang_db_t

typedef struct _lt_lang_db_t lt_lang_db_t;

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


lt_lang_db_unref ()

void                lt_lang_db_unref                    (lt_lang_db_t *langdb);

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

langdb :

a lt_lang_db_t.