<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<refentry id="AsYAMLData">
<refmeta>
<refentrytitle role="top_of_page" id="AsYAMLData.top_of_page">AsYAMLData</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>APPSTREAM Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AsYAMLData</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsect1 id="AsYAMLData.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="AS-TYPE-YAMLDATA:CAPS">AS_TYPE_YAMLDATA</link></entry></row>
<row><entry role="function_type"><link linkend="AsYAMLData"><returnvalue>AsYAMLData</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-yamldata-new">as_yamldata_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-yamldata-initialize">as_yamldata_initialize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-yamldata-parse-distro-data">as_yamldata_parse_distro_data</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-yamldata-get-locale">as_yamldata_get_locale</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-yamldata-set-locale">as_yamldata_set_locale</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsYAMLData.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AsYAMLDataClass">AsYAMLDataClass</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AsYAMLData-struct">AsYAMLData</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsYAMLData.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AsYAMLData
</screen>
</refsect1>


<refsect1 id="AsYAMLData.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>

</refsect1>
<refsect1 id="AsYAMLData.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="AS-TYPE-YAMLDATA:CAPS" role="macro">
<title>AS_TYPE_YAMLDATA</title>
<indexterm zone="AS-TYPE-YAMLDATA:CAPS"><primary>AS_TYPE_YAMLDATA</primary></indexterm>
<programlisting language="C">#define AS_TYPE_YAMLDATA (as_yamldata_get_type ())
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="as-yamldata-new" role="function">
<title>as_yamldata_new&#160;()</title>
<indexterm zone="as-yamldata-new"><primary>as_yamldata_new</primary></indexterm>
<programlisting language="C"><link linkend="AsYAMLData"><returnvalue>AsYAMLData</returnvalue></link>&#160;*
as_yamldata_new (<parameter><type>void</type></parameter>);</programlisting>
</refsect2>
<refsect2 id="as-yamldata-initialize" role="function">
<title>as_yamldata_initialize&#160;()</title>
<indexterm zone="as-yamldata-initialize"><primary>as_yamldata_initialize</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_yamldata_initialize (<parameter><link linkend="AsYAMLData"><type>AsYAMLData</type></link> *ydt</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *locale</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *origin</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *media_baseurl</parameter>,
                        <parameter><link linkend="gint"><type>gint</type></link> priority</parameter>);</programlisting>
<para>Initialize the YAML handler.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>ydt</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsYAMLData"><type>AsYAMLData</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-yamldata-parse-distro-data" role="function">
<title>as_yamldata_parse_distro_data&#160;()</title>
<indexterm zone="as-yamldata-parse-distro-data"><primary>as_yamldata_parse_distro_data</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_yamldata_parse_distro_data (<parameter><link linkend="AsYAMLData"><type>AsYAMLData</type></link> *ydt</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *data</parameter>,
                               <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Read an array of <link linkend="AsComponent"><type>AsComponent</type></link> from AppStream YAML metadata.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>ydt</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsYAMLData"><type>AsYAMLData</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>YAML metadata to parse</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> An array of <link linkend="AsComponent"><type>AsComponent</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>element-type</acronym> AsComponent]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-yamldata-get-locale" role="function">
<title>as_yamldata_get_locale&#160;()</title>
<indexterm zone="as-yamldata-get-locale"><primary>as_yamldata_get_locale</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_yamldata_get_locale (<parameter><link linkend="AsYAMLData"><type>AsYAMLData</type></link> *ydt</parameter>);</programlisting>
<para>Gets the current active locale for parsing DEP-11 metadata.,
or "ALL" if all locales are read.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>ydt</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsYAMLData"><type>AsYAMLData</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> Locale used for metadata parsing.</para>
</refsect3></refsect2>
<refsect2 id="as-yamldata-set-locale" role="function">
<title>as_yamldata_set_locale&#160;()</title>
<indexterm zone="as-yamldata-set-locale"><primary>as_yamldata_set_locale</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_yamldata_set_locale (<parameter><link linkend="AsYAMLData"><type>AsYAMLData</type></link> *ydt</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *locale</parameter>);</programlisting>
<para>Sets the locale which should be read when processing DEP-11 metadata.
All other locales are ignored, which increases parsing speed and
reduces memory usage.
If you set the locale to "ALL", all locales will be read.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>ydt</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsYAMLData"><type>AsYAMLData</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>locale</para></entry>
<entry role="parameter_description"><para>the locale.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="AsYAMLData.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AsYAMLDataClass" role="struct">
<title>struct AsYAMLDataClass</title>
<indexterm zone="AsYAMLDataClass"><primary>AsYAMLDataClass</primary></indexterm>
<programlisting language="C">struct AsYAMLDataClass {
	GObjectClass		parent_class;
};
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsYAMLData-struct" role="struct">
<title>AsYAMLData</title>
<indexterm zone="AsYAMLData-struct"><primary>AsYAMLData</primary></indexterm>
<programlisting language="C">typedef struct _AsYAMLData AsYAMLData;</programlisting>
<para>
</para>
</refsect2>

</refsect1>

</refentry>
