as-release-private 3 APPSTREAM Library
as-release-private

## Functions

AsContext * | as_release_get_context ()
void | as_release_set_context ()
gboolean | as_release_load_from_xml ()
void | as_release_to_xml_node ()
gboolean | as_release_load_from_yaml ()
void | as_release_emit_yaml ()
void | as_release_to_variant ()
gboolean | as_release_set_from_variant ()

## Description

## Functions

### as_release_get_context ()

    AsContext *
    as_release_get_context (AsRelease *release);

#### Parameters

release | An instance of AsRelease. |

#### Returns

the AsContext associated with this release. This function may return `NULL` if no context is set.

Since: 0.11.2

as_release_get_context

### as_release_set_context ()

    void
    as_release_set_context (AsRelease *release,
                            AsContext *context);

Sets the document context this release is associated with.

#### Parameters

release | An instance of AsRelease. |
context | the AsContext. |

Since: 0.11.2

as_release_set_context

### as_release_load_from_xml ()

    gboolean
    as_release_load_from_xml (AsRelease *release,
                              AsContext *ctx,
                              xmlNode *node,
                              GError **error);

Loads data from an XML node.

#### Parameters

release | an AsRelease |
ctx | the AppStream document context. |
node | the XML node. |
error | a GError. |

as_release_load_from_xml

### as_release_to_xml_node ()

    void
    as_release_to_xml_node (AsRelease *release,
                            AsContext *ctx,
                            xmlNode *root);

Serializes the data to an XML node.

#### Parameters

release | an AsRelease |
ctx | the AppStream document context. |
root | XML node to attach the new nodes to. |

as_release_to_xml_node

### as_release_load_from_yaml ()

    gboolean
    as_release_load_from_yaml (AsRelease *release,
                               AsContext *ctx,
                               GNode *node,
                               GError **error);

Loads data from a YAML field.

#### Parameters

release | an AsRelease |
ctx | the AppStream document context. |
node | the YAML node. |
error | a GError. |

as_release_load_from_yaml

### as_release_emit_yaml ()

    void
    as_release_emit_yaml (AsRelease *release,
                          AsContext *ctx,
                          yaml_emitter_t *emitter);

Emit YAML data for this object.

#### Parameters

release | an AsRelease |
ctx | the AppStream document context. |
emitter | The YAML emitter to emit data on. |

as_release_emit_yaml

### as_release_to_variant ()

    void
    as_release_to_variant (AsRelease *release,
                           GVariantBuilder *builder);

Serialize the current active state of this object to a GVariant for use in the on-disk binary cache.

#### Parameters

release | an AsRelease |
builder | A GVariantBuilder |

as_release_to_variant

### as_release_set_from_variant ()

    gboolean
    as_release_set_from_variant (AsRelease *release,
                                 GVariant *variant,
                                 const gchar *locale);

Read the active state of this object from a GVariant serialization. This is used by the on-disk binary cache.

#### Parameters

release | an AsRelease |
variant | The GVariant to read from. |

as_release_set_from_variant

## Types and Values