Database - Region

Database - Region — An interface to access Region Database

Functions

Types and Values

Description

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

Functions

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 .

Parameters

regiondb

a lt_region_db_t.

 

Returns

the same regiondb object.

[transfer none]


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

Parameters

regiondb

a lt_region_db_t.

 

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.

Parameters

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]

Types and Values

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.