Database - Region

Database - Region — An interface to access Region Database

Synopsis

lt_region_t *       lt_region_db_lookup                 (lt_region_db_t *regiondb,
                                                         const char *language_or_code);
lt_region_db_t *    lt_region_db_new                    (void);
lt_region_db_t *    lt_region_db_ref                    (lt_region_db_t *regiondb);
                    lt_region_db_t;
void                lt_region_db_unref                  (lt_region_db_t *regiondb);

Description

This class provides an interface to access Region database. which has been registered as ISO 3166-1 and UN M.49 code.

Details

lt_region_db_lookup ()

lt_region_t *       lt_region_db_lookup                 (lt_region_db_t *regiondb,
                                                         const char *language_or_code);

Lookup lt_region_t if language_or_code is valid and registered into the database.

regiondb :

a lt_region_db_t.

language_or_code :

a region code to lookup.

Returns :

a lt_region_t that meets with language_or_code. otherwise NULL. [transfer full]

lt_region_db_new ()

lt_region_db_t *    lt_region_db_new                    (void);

Create a new instance of a lt_region_db_t.

Returns :

a new instance of lt_region_db_t. [transfer full]

lt_region_db_ref ()

lt_region_db_t *    lt_region_db_ref                    (lt_region_db_t *regiondb);

Increases the reference count of regiondb.

regiondb :

a lt_region_db_t.

Returns :

the same regiondb object. [transfer none]

lt_region_db_t

typedef struct _lt_region_db_t lt_region_db_t;

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


lt_region_db_unref ()

void                lt_region_db_unref                  (lt_region_db_t *regiondb);

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

regiondb :

a lt_region_db_t.