as-variant-cache 3 APPSTREAM Library
as-variant-cache Helper functions for AppStream's GVariant-based on-disk serialization.

## Functions

guint32 | as_variant_get_dict_uint32 ()
const gchar ** | as_variant_get_dict_strv ()
const gchar * | as_variant_get_dict_str ()
const gchar * | as_variant_get_mstring ()
GVariant * | as_variant_mstring_new ()
const gchar * | as_variant_get_dict_mstr ()
gint | as_variant_get_dict_int32 ()
GVariant * | as_variant_from_string_ptrarray ()
void | as_variant_to_string_ptrarray ()
void | as_variant_to_string_ptrarray_by_dict ()
void | as_variant_builder_add_kv ()

## Types and Values

#define | CACHE_FORMAT_VERSION

## Includes

    #include <appstream.h>

## Description

## Functions

### as_variant_get_dict_uint32 ()

    guint32
    as_variant_get_dict_uint32 (GVariantDict *dict,
                                const gchar *key);

Get a an uint32 from a dictionary.

as_variant_get_dict_uint32

### as_variant_get_dict_strv ()

    const gchar **
    as_variant_get_dict_strv (GVariantDict *dict,
                              const gchar *key,
                              GVariant **var);

Get a strv from a dictionary.

#### Returns

A gchar**.

[transfer container]

as_variant_get_dict_strv

### as_variant_get_dict_str ()

    const gchar *
    as_variant_get_dict_str (GVariantDict *dict,
                             const gchar *key,
                             GVariant **var);

Get a string from a GVariant dictionary.

as_variant_get_dict_str

### as_variant_get_mstring ()

    const gchar *
    as_variant_get_mstring (GVariant **var);

as_variant_get_mstring

### as_variant_mstring_new ()

    GVariant *
    as_variant_mstring_new (const gchar *str);

Create a string wrapped in a maybe GVariant.

as_variant_mstring_new

### as_variant_get_dict_mstr ()

    const gchar *
    as_variant_get_dict_mstr (GVariantDict *dict,
                              const gchar *key,
                              GVariant **var);

Get a string wrapped in a maybe GVariant from a dictionary.

as_variant_get_dict_mstr

### as_variant_get_dict_int32 ()

    gint
    as_variant_get_dict_int32 (GVariantDict *dict,
                               const gchar *key);

Get a an uint32 from a dictionary.

as_variant_get_dict_int32

### as_variant_from_string_ptrarray ()

    GVariant *
    as_variant_from_string_ptrarray (GPtrArray *strarray);

Add key/value pair with a string key and variant value.

as_variant_from_string_ptrarray

### as_variant_to_string_ptrarray ()

    void
    as_variant_to_string_ptrarray (GVariant *var,
                                   GPtrArray *dest);

Add contents of array-type variant to string list.

as_variant_to_string_ptrarray

### as_variant_to_string_ptrarray_by_dict ()

    void
    as_variant_to_string_ptrarray_by_dict (GVariantDict *dict,
                                           const gchar *key,
                                           GPtrArray *dest);

Add contents of array-type variant to string list using a dictionary key to get the source variant.

as_variant_to_string_ptrarray_by_dict

### as_variant_builder_add_kv ()

    void
    as_variant_builder_add_kv (GVariantBuilder *builder,
                               const gchar *key,
                               GVariant *value);

Add key/value pair with a string key and variant value.

as_variant_builder_add_kv

## Types and Values

### CACHE_FORMAT_VERSION

    #define CACHE_FORMAT_VERSION 1

CACHE_FORMAT_VERSION