Database - Variant

Database - Variant — An interface to access Variant Database

Synopsis

lt_variant_t *      lt_variant_db_lookup                (lt_variant_db_t *variantdb,
                                                         const char *subtag);
lt_variant_db_t *   lt_variant_db_new                   (void);
lt_variant_db_t *   lt_variant_db_ref                   (lt_variant_db_t *variantdb);
                    lt_variant_db_t;
void                lt_variant_db_unref                 (lt_variant_db_t *variantdb);

Description

This class provides an interface to access Variant database. which has been registered with IANA.

Details

lt_variant_db_lookup ()

lt_variant_t *      lt_variant_db_lookup                (lt_variant_db_t *variantdb,
                                                         const char *subtag);

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

variantdb :

a lt_variant_db_t.

subtag :

a subtag name to lookup.

Returns :

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

lt_variant_db_new ()

lt_variant_db_t *   lt_variant_db_new                   (void);

Create a new instance of a lt_variant_db_t.

Returns :

a new instance of lt_variant_db_t. [transfer full]

lt_variant_db_ref ()

lt_variant_db_t *   lt_variant_db_ref                   (lt_variant_db_t *variantdb);

Increases the reference count of variantdb.

variantdb :

a lt_variant_db_t.

Returns :

the same variantdb object. [transfer none]

lt_variant_db_t

typedef struct _lt_variant_db_t lt_variant_db_t;

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


lt_variant_db_unref ()

void                lt_variant_db_unref                 (lt_variant_db_t *variantdb);

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

variantdb :

a lt_variant_db_t.