Container - Region

Container - Region — A container class for Region subtag

Synopsis

lt_bool_t           lt_region_compare                   (const lt_region_t *v1,
                                                         const lt_region_t *v2);
void                lt_region_dump                      (const lt_region_t *region);
const char *        lt_region_get_better_tag            (const lt_region_t *region);
const char *        lt_region_get_name                  (const lt_region_t *region);
const char *        lt_region_get_preferred_tag         (const lt_region_t *region);
const char *        lt_region_get_tag                   (const lt_region_t *region);
lt_region_t *       lt_region_ref                       (lt_region_t *region);
                    lt_region_t;
void                lt_region_unref                     (lt_region_t *region);

Description

This container class provides a data access to Region subtag entry.

Details

lt_region_compare ()

lt_bool_t           lt_region_compare                   (const lt_region_t *v1,
                                                         const lt_region_t *v2);

Compare if v1 and v2 is the same object or not.

v1 :

a lt_region_t.

v2 :

a lt_region_t.

Returns :

TRUE if it's the same, otherwise FALSE.

lt_region_dump ()

void                lt_region_dump                      (const lt_region_t *region);

Dumps the container information to the standard output.

region :

a lt_region_t.

lt_region_get_better_tag ()

const char *        lt_region_get_better_tag            (const lt_region_t *region);

Obtains the better tag for use. this is a convenient function to get the preferred-value if available.

region :

a lt_region_t.

Returns :

a tag string.

lt_region_get_name ()

const char *        lt_region_get_name                  (const lt_region_t *region);

Obtains the description of the subtag.

region :

a lt_region_t.

Returns :

a description string.

lt_region_get_preferred_tag ()

const char *        lt_region_get_preferred_tag         (const lt_region_t *region);

Obtains the preferred-value. this is available only when the tag is marked as deprecated.

region :

a lt_region_t.

Returns :

a preferred-value for the tag or NULL.

lt_region_get_tag ()

const char *        lt_region_get_tag                   (const lt_region_t *region);

Obtains the tag name.

region :

a lt_region_t.

Returns :

a tag string.

lt_region_ref ()

lt_region_t *       lt_region_ref                       (lt_region_t *region);

Increases the reference count of region.

region :

a lt_region_t.

Returns :

the same region object. [transfer none]

lt_region_t

typedef struct _lt_region_t lt_region_t;

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


lt_region_unref ()

void                lt_region_unref                     (lt_region_t *region);

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

region :

a lt_region_t.