<?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="AsCategory">
<refmeta>
<refentrytitle role="top_of_page" id="AsCategory.top_of_page">AsCategory</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>APPSTREAM Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AsCategory</refname>
<refpurpose>Representation of a XDG category</refpurpose>
</refnamediv>

<refsect1 id="AsCategory.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="function_type"><link linkend="AsCategory"><returnvalue>AsCategory</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-category-new">as_category_new</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-category-get-id">as_category_get_id</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-category-set-id">as_category_set_id</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-category-get-name">as_category_get_name</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-category-set-name">as_category_set_name</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-category-get-summary">as_category_get_summary</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-category-set-summary">as_category_set_summary</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-category-get-icon">as_category_get_icon</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-category-set-icon">as_category_set_icon</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-category-get-children">as_category_get_children</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-category-has-children">as_category_has_children</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-category-add-child">as_category_add_child</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-category-remove-child">as_category_remove_child</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-category-get-desktop-groups">as_category_get_desktop_groups</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-category-add-desktop-group">as_category_add_desktop_group</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-category-get-components">as_category_get_components</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-category-add-component">as_category_add_component</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-category-has-component">as_category_has_component</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-get-default-categories">as_get_default_categories</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsCategory.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gpointer"><type>gpointer</type></link></entry><entry role="property_name"><link linkend="AsCategory--children">children</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsCategory--icon">icon</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsCategory--id">id</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsCategory--name">name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsCategory--summary">summary</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GPtrArray"><type>GPtrArray</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--categories">categories</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--description">description</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--developer-name">developer-name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gpointer"><type>gpointer</type></link></entry><entry role="property_name"><link linkend="AsComponent--icons">icons</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--id">id</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GStrv"><type>GStrv</type></link></entry><entry role="property_name"><link linkend="AsComponent--keywords">keywords</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="AsComponentKind"><type>AsComponentKind</type></link></entry><entry role="property_name"><link linkend="AsComponent--kind">kind</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--name">name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GStrv"><type>GStrv</type></link></entry><entry role="property_name"><link linkend="AsComponent--pkgnames">pkgnames</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--project-group">project-group</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--project-license">project-license</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GPtrArray"><type>GPtrArray</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--screenshots">screenshots</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--summary">summary</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GHashTable"><type>GHashTable</type></link>&#160;*</entry><entry role="property_name"><link linkend="AsComponent--urls">urls</link></entry><entry role="property_flags">Read</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="AsComponent"/><refsect1 id="AsCategory.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="define_keyword">#define</entry><entry role="function_name"><link linkend="AS-TYPE-CATEGORY:CAPS">AS_TYPE_CATEGORY</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AsCategoryClass">AsCategoryClass</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AsCategory-struct">AsCategory</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AsComponent-struct">AsComponent</link></entry></row>

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

<refsect1 id="AsCategory.includes"><title>Includes</title><synopsis>#include &lt;appstream.h&gt;
</synopsis></refsect1>

<refsect1 id="AsCategory.description" role="desc">
<title role="desc.title">Description</title>
<para>This object represents an XDG category, as defined at:
http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html<link linkend="category-registry"><type>category-registry</type></link></para>
<para>The <link linkend="AsCategory"><type>AsCategory</type></link> object does not support all aspects of a menu. Its main purpose
is to be used in software-centers to group visual components (gui/web applications).</para>
<para>You can use <link linkend="as-get-default-categories"><literal>as_get_default_categories</literal></link>() to get a set of supported default categories.</para>
<para>See also: <link linkend="AsComponent"><type>AsComponent</type></link></para>

</refsect1>
<refsect1 id="AsCategory.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="as-category-new" role="function">
<title>as_category_new&#160;()</title>
<indexterm zone="as-category-new"><primary>as_category_new</primary></indexterm>
<programlisting language="C"><link linkend="AsCategory"><returnvalue>AsCategory</returnvalue></link>&#160;*
as_category_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="AsCategory"><type>AsCategory</type></link>.</para>
<refsect3 id="as-category-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="AsCategory"><type>AsCategory</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-category-get-id" role="function">
<title>as_category_get_id&#160;()</title>
<indexterm zone="as-category-get-id"><primary>as_category_get_id</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_category_get_id (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Get the ID of this category.</para>
<refsect3 id="as-category-get-id.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-set-id" role="function">
<title>as_category_set_id&#160;()</title>
<indexterm zone="as-category-set-id"><primary>as_category_set_id</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_set_id (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *id</parameter>);</programlisting>
<para>Set the ID of this category.</para>
<refsect3 id="as-category-set-id.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-name" role="function">
<title>as_category_get_name&#160;()</title>
<indexterm zone="as-category-get-name"><primary>as_category_get_name</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_category_get_name (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Get the name of this category.</para>
<refsect3 id="as-category-get-name.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-set-name" role="function">
<title>as_category_set_name&#160;()</title>
<indexterm zone="as-category-set-name"><primary>as_category_set_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_set_name (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);</programlisting>
<para>Set the name of this category.</para>
<refsect3 id="as-category-set-name.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-summary" role="function">
<title>as_category_get_summary&#160;()</title>
<indexterm zone="as-category-get-summary"><primary>as_category_get_summary</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_category_get_summary (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Get the summary (short description) of this category.</para>
<refsect3 id="as-category-get-summary.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-set-summary" role="function">
<title>as_category_set_summary&#160;()</title>
<indexterm zone="as-category-set-summary"><primary>as_category_set_summary</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_set_summary (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                         <parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);</programlisting>
<para>Get the summary (short description) of this category.</para>
<refsect3 id="as-category-set-summary.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>A new short summary of this category.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-icon" role="function">
<title>as_category_get_icon&#160;()</title>
<indexterm zone="as-category-get-icon"><primary>as_category_get_icon</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_category_get_icon (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Get the stock icon name for this category.</para>
<refsect3 id="as-category-get-icon.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-set-icon" role="function">
<title>as_category_set_icon&#160;()</title>
<indexterm zone="as-category-set-icon"><primary>as_category_set_icon</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_set_icon (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);</programlisting>
<para>Set the stock icon name for this category.</para>
<refsect3 id="as-category-set-icon.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-children" role="function">
<title>as_category_get_children&#160;()</title>
<indexterm zone="as-category-get-children"><primary>as_category_get_children</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_category_get_children (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<refsect3 id="as-category-get-children.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-category-get-children.returns" role="returns">
<title>Returns</title>
<para> A list of subcategories. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> AsCategory][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-category-has-children" role="function">
<title>as_category_has_children&#160;()</title>
<indexterm zone="as-category-has-children"><primary>as_category_has_children</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
as_category_has_children (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Test for sub-categories.</para>
<refsect3 id="as-category-has-children.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-category-has-children.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if this category has any subcategory</para>
</refsect3></refsect2>
<refsect2 id="as-category-add-child" role="function">
<title>as_category_add_child&#160;()</title>
<indexterm zone="as-category-add-child"><primary>as_category_add_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_add_child (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                       <parameter><link linkend="AsCategory"><type>AsCategory</type></link> *subcat</parameter>);</programlisting>
<para>Add a subcategory to this category.</para>
<refsect3 id="as-category-add-child.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>subcat</para></entry>
<entry role="parameter_description"><para>A subcategory to add.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-remove-child" role="function">
<title>as_category_remove_child&#160;()</title>
<indexterm zone="as-category-remove-child"><primary>as_category_remove_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_remove_child (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                          <parameter><link linkend="AsCategory"><type>AsCategory</type></link> *subcat</parameter>);</programlisting>
<para>Drop a subcategory from this <link linkend="AsCategory"><type>AsCategory</type></link>.</para>
<refsect3 id="as-category-remove-child.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>subcat</para></entry>
<entry role="parameter_description"><para>A subcategory to remove.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-desktop-groups" role="function">
<title>as_category_get_desktop_groups&#160;()</title>
<indexterm zone="as-category-get-desktop-groups"><primary>as_category_get_desktop_groups</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_category_get_desktop_groups (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<refsect3 id="as-category-get-desktop-groups.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-category-get-desktop-groups.returns" role="returns">
<title>Returns</title>
<para> A list of desktop-file categories. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>element-type</acronym> utf8]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-category-add-desktop-group" role="function">
<title>as_category_add_desktop_group&#160;()</title>
<indexterm zone="as-category-add-desktop-group"><primary>as_category_add_desktop_group</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_add_desktop_group (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *group_name</parameter>);</programlisting>
<para>Add a desktop-file category to this <link linkend="AsCategory"><type>AsCategory</type></link>.</para>
<refsect3 id="as-category-add-desktop-group.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>group_name</para></entry>
<entry role="parameter_description"><para>A subcategory to add.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-get-components" role="function">
<title>as_category_get_components&#160;()</title>
<indexterm zone="as-category-get-components"><primary>as_category_get_components</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_category_get_components (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>);</programlisting>
<para>Get list of components which have been sorted into this category.</para>
<refsect3 id="as-category-get-components.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-category-get-components.returns" role="returns">
<title>Returns</title>
<para> List of <link linkend="AsCategory"><type>AsCategory</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>element-type</acronym> AsComponent]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-category-add-component" role="function">
<title>as_category_add_component&#160;()</title>
<indexterm zone="as-category-add-component"><primary>as_category_add_component</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_category_add_component (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                           <parameter><link linkend="AsComponent"><type>AsComponent</type></link> *cpt</parameter>);</programlisting>
<para>Add a component to this category.</para>
<refsect3 id="as-category-add-component.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cpt</para></entry>
<entry role="parameter_description"><para>The <link linkend="AsComponent"><type>AsComponent</type></link> to add.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-category-has-component" role="function">
<title>as_category_has_component&#160;()</title>
<indexterm zone="as-category-has-component"><primary>as_category_has_component</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
as_category_has_component (<parameter><link linkend="AsCategory"><type>AsCategory</type></link> *category</parameter>,
                           <parameter><link linkend="AsComponent"><type>AsComponent</type></link> *cpt</parameter>);</programlisting>
<para>Check if the exact <link linkend="AsComponent"><type>AsComponent</type></link> <parameter>cpt</parameter>
 is a member of this
category already.</para>
<refsect3 id="as-category-has-component.parameters" 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>category</para></entry>
<entry role="parameter_description"><para>An instance of <link linkend="AsCategory"><type>AsCategory</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cpt</para></entry>
<entry role="parameter_description"><para>The <link linkend="AsComponent"><type>AsComponent</type></link> to look for.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-category-has-component.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the component is present.</para>
</refsect3></refsect2>
<refsect2 id="as-get-default-categories" role="function">
<title>as_get_default_categories&#160;()</title>
<indexterm zone="as-get-default-categories"><primary>as_get_default_categories</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_get_default_categories (<parameter><link linkend="gboolean"><type>gboolean</type></link> with_special</parameter>);</programlisting>
<para>Get a list of the default Freedesktop and AppStream categories
that software components (especially GUI applications) can be sorted
into in software centers.</para>
<refsect3 id="as-get-default-categories.parameters" 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>with_special</para></entry>
<entry role="parameter_description"><para>Include special categories (e.g. "addons", and "all"/"featured" in submenus)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-get-default-categories.returns" role="returns">
<title>Returns</title>
<para> a list of <link linkend="AsCategory"><type>AsCategory</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer container</acronym>][<acronym>element-type</acronym> AsCategory]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="AsCategory.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AS-TYPE-CATEGORY:CAPS" role="macro">
<title>AS_TYPE_CATEGORY</title>
<indexterm zone="AS-TYPE-CATEGORY:CAPS"><primary>AS_TYPE_CATEGORY</primary></indexterm>
<programlisting language="C">#define AS_TYPE_CATEGORY (as_category_get_type ())
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsCategoryClass" role="struct">
<title>struct AsCategoryClass</title>
<indexterm zone="AsCategoryClass"><primary>AsCategoryClass</primary></indexterm>
<programlisting language="C">struct AsCategoryClass {
	GObjectClass parent_class;
};
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsCategory-struct" role="struct">
<title>AsCategory</title>
<indexterm zone="AsCategory-struct"><primary>AsCategory</primary></indexterm>
<programlisting language="C">typedef struct _AsCategory AsCategory;</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsComponent-struct" role="struct">
<title>AsComponent</title>
<indexterm zone="AsComponent-struct"><primary>AsComponent</primary></indexterm>
<programlisting language="C">typedef struct _AsComponent AsComponent;</programlisting>
<para>
</para>
</refsect2>

</refsect1>
<refsect1 id="AsCategory.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="AsCategory--children" role="property"><title>The <literal>“children”</literal> property</title>
<indexterm zone="AsCategory--children"><primary>AsCategory:children</primary></indexterm>
<programlisting>  “children”                 <link linkend="gpointer"><type>gpointer</type></link></programlisting>
<para>children.</para><para>Flags: Read</para>
</refsect2>
<refsect2 id="AsCategory--icon" role="property"><title>The <literal>“icon”</literal> property</title>
<indexterm zone="AsCategory--icon"><primary>AsCategory:icon</primary></indexterm>
<programlisting>  “icon”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>icon.</para><para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsCategory--id" role="property"><title>The <literal>“id”</literal> property</title>
<indexterm zone="AsCategory--id"><primary>AsCategory:id</primary></indexterm>
<programlisting>  “id”                       <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>id.</para><para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsCategory--name" role="property"><title>The <literal>“name”</literal> property</title>
<indexterm zone="AsCategory--name"><primary>AsCategory:name</primary></indexterm>
<programlisting>  “name”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>name.</para><para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsCategory--summary" role="property"><title>The <literal>“summary”</literal> property</title>
<indexterm zone="AsCategory--summary"><primary>AsCategory:summary</primary></indexterm>
<programlisting>  “summary”                  <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>summary.</para><para>Flags: Read</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--categories" role="property"><title>The <literal>“categories”</literal> property</title>
<indexterm zone="AsComponent--categories"><primary>AsComponent:categories</primary></indexterm>
<programlisting>  “categories”               <link linkend="GPtrArray"><type>GPtrArray</type></link>&#160;*</programlisting>
<para>string array of categories</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="AsComponent--description" role="property"><title>The <literal>“description”</literal> property</title>
<indexterm zone="AsComponent--description"><primary>AsComponent:description</primary></indexterm>
<programlisting>  “description”              <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the description</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--developer-name" role="property"><title>The <literal>“developer-name”</literal> property</title>
<indexterm zone="AsComponent--developer-name"><primary>AsComponent:developer-name</primary></indexterm>
<programlisting>  “developer-name”           <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the developer name</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--icons" role="property"><title>The <literal>“icons”</literal> property</title>
<indexterm zone="AsComponent--icons"><primary>AsComponent:icons</primary></indexterm>
<programlisting>  “icons”                    <link linkend="gpointer"><type>gpointer</type></link></programlisting>
<para>hash map of icon urls and sizes</para>

<para><emphasis role="annotation">[<acronym>type</acronym> GList(AsIcon)]</emphasis></para><para>Flags: Read</para>
</refsect2>
<refsect2 id="AsComponent--id" role="property"><title>The <literal>“id”</literal> property</title>
<indexterm zone="AsComponent--id"><primary>AsComponent:id</primary></indexterm>
<programlisting>  “id”                       <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the unique identifier</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--keywords" role="property"><title>The <literal>“keywords”</literal> property</title>
<indexterm zone="AsComponent--keywords"><primary>AsComponent:keywords</primary></indexterm>
<programlisting>  “keywords”                 <link linkend="GStrv"><type>GStrv</type></link></programlisting>
<para>string array of keywords</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="AsComponent--kind" role="property"><title>The <literal>“kind”</literal> property</title>
<indexterm zone="AsComponent--kind"><primary>AsComponent:kind</primary></indexterm>
<programlisting>  “kind”                     <link linkend="AsComponentKind"><type>AsComponentKind</type></link></programlisting>
<para>the <link linkend="AsComponentKind"><type>AsComponentKind</type></link> of this component</para>
<para>Flags: Read / Write</para>
<para>Default value: AS_COMPONENT_KIND_UNKNOWN</para>
</refsect2>
<refsect2 id="AsComponent--name" role="property"><title>The <literal>“name”</literal> property</title>
<indexterm zone="AsComponent--name"><primary>AsComponent:name</primary></indexterm>
<programlisting>  “name”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the name</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--pkgnames" role="property"><title>The <literal>“pkgnames”</literal> property</title>
<indexterm zone="AsComponent--pkgnames"><primary>AsComponent:pkgnames</primary></indexterm>
<programlisting>  “pkgnames”                 <link linkend="GStrv"><type>GStrv</type></link></programlisting>
<para>string array of packages name</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="AsComponent--project-group" role="property"><title>The <literal>“project-group”</literal> property</title>
<indexterm zone="AsComponent--project-group"><primary>AsComponent:project-group</primary></indexterm>
<programlisting>  “project-group”            <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the project group</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--project-license" role="property"><title>The <literal>“project-license”</literal> property</title>
<indexterm zone="AsComponent--project-license"><primary>AsComponent:project-license</primary></indexterm>
<programlisting>  “project-license”          <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the project license</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--screenshots" role="property"><title>The <literal>“screenshots”</literal> property</title>
<indexterm zone="AsComponent--screenshots"><primary>AsComponent:screenshots</primary></indexterm>
<programlisting>  “screenshots”              <link linkend="GPtrArray"><type>GPtrArray</type></link>&#160;*</programlisting>
<para>screenshots.</para><para>Flags: Read</para>
</refsect2>
<refsect2 id="AsComponent--summary" role="property"><title>The <literal>“summary”</literal> property</title>
<indexterm zone="AsComponent--summary"><primary>AsComponent:summary</primary></indexterm>
<programlisting>  “summary”                  <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>the summary</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="AsComponent--urls" role="property"><title>The <literal>“urls”</literal> property</title>
<indexterm zone="AsComponent--urls"><primary>AsComponent:urls</primary></indexterm>
<programlisting>  “urls”                     <link linkend="GHashTable"><type>GHashTable</type></link>&#160;*</programlisting>
<para>urls.</para><para>Flags: Read</para>
</refsect2>

</refsect1>

</refentry>
