<?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="AsSuggested">
<refmeta>
<refentrytitle role="top_of_page" id="AsSuggested.top_of_page">AsSuggested</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>APPSTREAM Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AsSuggested</refname>
<refpurpose>Suggestions for other software suggested by a component.</refpurpose>
</refnamediv>

<refsect1 id="AsSuggested.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="AsSuggestedKind"><returnvalue>AsSuggestedKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-suggested-kind-from-string">as_suggested_kind_from_string</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-suggested-kind-to-string">as_suggested_kind_to_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsSuggested"><returnvalue>AsSuggested</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-suggested-new">as_suggested_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsSuggestedKind"><returnvalue>AsSuggestedKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-suggested-get-kind">as_suggested_get_kind</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-suggested-set-kind">as_suggested_set_kind</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-suggested-get-ids">as_suggested_get_ids</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-suggested-add-id">as_suggested_add_id</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-suggested-is-valid">as_suggested_is_valid</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsSuggested.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-SUGGESTED:CAPS">AS_TYPE_SUGGESTED</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AsSuggestedClass">AsSuggestedClass</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="AsSuggestedKind">AsSuggestedKind</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AsSuggested-struct">AsSuggested</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsSuggested.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> AsSuggested
</screen>
</refsect1>

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

<refsect1 id="AsSuggested.description" role="desc">
<title role="desc.title">Description</title>
<para>This class provides a list of other component-ids suggested by a software component, as well
as an origin of the suggestion (manually suggested by the upstream project, or
automatically determined by heuristics).</para>

</refsect1>
<refsect1 id="AsSuggested.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="as-suggested-kind-from-string" role="function">
<title>as_suggested_kind_from_string&#160;()</title>
<indexterm zone="as-suggested-kind-from-string"><primary>as_suggested_kind_from_string</primary></indexterm>
<programlisting language="C"><link linkend="AsSuggestedKind"><returnvalue>AsSuggestedKind</returnvalue></link>
as_suggested_kind_from_string (<parameter>const <link linkend="gchar"><type>gchar</type></link> *kind_str</parameter>);</programlisting>
<para>Converts the text representation to an enumerated value.</para>
<refsect3 id="as-suggested-kind-from-string.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>kind_str</para></entry>
<entry role="parameter_description"><para>the string.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-suggested-kind-from-string.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="AsSuggestedKind"><type>AsSuggestedKind</type></link> or <link linkend="AS-SUGGESTED-KIND-UNKNOWN:CAPS"><literal>AS_SUGGESTED_KIND_UNKNOWN</literal></link> for unknown</para>
</refsect3></refsect2>
<refsect2 id="as-suggested-kind-to-string" role="function">
<title>as_suggested_kind_to_string&#160;()</title>
<indexterm zone="as-suggested-kind-to-string"><primary>as_suggested_kind_to_string</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_suggested_kind_to_string (<parameter><link linkend="AsSuggestedKind"><type>AsSuggestedKind</type></link> kind</parameter>);</programlisting>
<para>Converts the enumerated value to an text representation.</para>
<refsect3 id="as-suggested-kind-to-string.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>kind</para></entry>
<entry role="parameter_description"><para>the <link linkend="AsSuggestedKind"><literal>AsSuggestedKind</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-suggested-kind-to-string.returns" role="returns">
<title>Returns</title>
<para> string version of <parameter>kind</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="as-suggested-new" role="function">
<title>as_suggested_new&#160;()</title>
<indexterm zone="as-suggested-new"><primary>as_suggested_new</primary></indexterm>
<programlisting language="C"><link linkend="AsSuggested"><returnvalue>AsSuggested</returnvalue></link>&#160;*
as_suggested_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="AsSuggested"><type>AsSuggested</type></link>.</para>
<refsect3 id="as-suggested-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="AsSuggested"><type>AsSuggested</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-suggested-get-kind" role="function">
<title>as_suggested_get_kind&#160;()</title>
<indexterm zone="as-suggested-get-kind"><primary>as_suggested_get_kind</primary></indexterm>
<programlisting language="C"><link linkend="AsSuggestedKind"><returnvalue>AsSuggestedKind</returnvalue></link>
as_suggested_get_kind (<parameter><link linkend="AsSuggested"><type>AsSuggested</type></link> *suggested</parameter>);</programlisting>
<para>Gets the suggested kind.</para>
<refsect3 id="as-suggested-get-kind.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>suggested</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsSuggested"><type>AsSuggested</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-suggested-get-kind.returns" role="returns">
<title>Returns</title>
<para> the <link linkend="AssuggestedKind"><type>AssuggestedKind</type></link></para>
</refsect3></refsect2>
<refsect2 id="as-suggested-set-kind" role="function">
<title>as_suggested_set_kind&#160;()</title>
<indexterm zone="as-suggested-set-kind"><primary>as_suggested_set_kind</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_suggested_set_kind (<parameter><link linkend="AsSuggested"><type>AsSuggested</type></link> *suggested</parameter>,
                       <parameter><link linkend="AsSuggestedKind"><type>AsSuggestedKind</type></link> kind</parameter>);</programlisting>
<para>Sets the suggested kind.</para>
<refsect3 id="as-suggested-set-kind.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>suggested</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsSuggested"><type>AsSuggested</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the <link linkend="AsSuggestedKind"><type>AsSuggestedKind</type></link>, e.g. <link linkend="AS-SUGGESTED-KIND-HEURISTIC:CAPS"><literal>AS_SUGGESTED_KIND_HEURISTIC</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-suggested-get-ids" role="function">
<title>as_suggested_get_ids&#160;()</title>
<indexterm zone="as-suggested-get-ids"><primary>as_suggested_get_ids</primary></indexterm>
<programlisting language="C"><link linkend="GPtrArray"><returnvalue>GPtrArray</returnvalue></link>&#160;*
as_suggested_get_ids (<parameter><link linkend="AsSuggested"><type>AsSuggested</type></link> *suggested</parameter>);</programlisting>
<para>Get a list of components id that generated the suggestion</para>
<refsect3 id="as-suggested-get-ids.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>suggested</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsSuggested"><type>AsSuggested</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-suggested-get-ids.returns" role="returns">
<title>Returns</title>
<para> an array of components id. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>element-type</acronym> utf8]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-suggested-add-id" role="function">
<title>as_suggested_add_id&#160;()</title>
<indexterm zone="as-suggested-add-id"><primary>as_suggested_add_id</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_suggested_add_id (<parameter><link linkend="AsSuggested"><type>AsSuggested</type></link> *suggested</parameter>,
                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *cid</parameter>);</programlisting>
<para>Add a component id to this suggested object.</para>
<refsect3 id="as-suggested-add-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>suggested</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsSuggested"><type>AsSuggested</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cid</para></entry>
<entry role="parameter_description"><para>The component id to add</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-suggested-is-valid" role="function">
<title>as_suggested_is_valid&#160;()</title>
<indexterm zone="as-suggested-is-valid"><primary>as_suggested_is_valid</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
as_suggested_is_valid (<parameter><link linkend="AsSuggested"><type>AsSuggested</type></link> *suggested</parameter>);</programlisting>
<para>Check if the essential properties of this suggestion are
populated with useful data.</para>
<refsect3 id="as-suggested-is-valid.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>suggested</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsSuggested"><type>AsSuggested</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-suggested-is-valid.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if we have useful data.</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="AsSuggested.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AS-TYPE-SUGGESTED:CAPS" role="macro">
<title>AS_TYPE_SUGGESTED</title>
<indexterm zone="AS-TYPE-SUGGESTED:CAPS"><primary>AS_TYPE_SUGGESTED</primary></indexterm>
<programlisting language="C">#define AS_TYPE_SUGGESTED (as_suggested_get_type ())
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsSuggestedClass" role="struct">
<title>struct AsSuggestedClass</title>
<indexterm zone="AsSuggestedClass"><primary>AsSuggestedClass</primary></indexterm>
<programlisting language="C">struct AsSuggestedClass {
	GObjectClass		parent_class;
};
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsSuggestedKind" role="enum">
<title>enum AsSuggestedKind</title>
<indexterm zone="AsSuggestedKind"><primary>AsSuggestedKind</primary></indexterm>
<para>The suggested type.</para>
<refsect3 id="AsSuggestedKind.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="AS-SUGGESTED-KIND-UNKNOWN:CAPS">AS_SUGGESTED_KIND_UNKNOWN</para></entry>
<entry role="enum_member_description"><para>Unknown suggested kind</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-SUGGESTED-KIND-UPSTREAM:CAPS">AS_SUGGESTED_KIND_UPSTREAM</para></entry>
<entry role="enum_member_description"><para>Suggestions provided by the upstream project.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-SUGGESTED-KIND-HEURISTIC:CAPS">AS_SUGGESTED_KIND_HEURISTIC</para></entry>
<entry role="enum_member_description"><para>Suggestions provided by automatic heuristics.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AsSuggested-struct" role="struct">
<title>AsSuggested</title>
<indexterm zone="AsSuggested-struct"><primary>AsSuggested</primary></indexterm>
<programlisting language="C">typedef struct _AsSuggested AsSuggested;</programlisting>
<para>
</para>
</refsect2>

</refsect1>

</refentry>
