<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="PackageKit-pk-package-ids">
<refmeta>
<refentrytitle role="top_of_page" id="PackageKit-pk-package-ids.top_of_page">pk-package-ids</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PACKAGEKIT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>pk-package-ids</refname>
<refpurpose>Functionality to modify multiple PackageIDs</refpurpose>
</refnamediv>

<refsynopsisdiv id="PackageKit-pk-package-ids.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#define             <link linkend="PK-PACKAGE-IDS-DELIM--CAPS">PK_PACKAGE_IDS_DELIM</link>
<link linkend="void">void</link>                <link linkend="pk-package-ids-test">pk_package_ids_test</link>                 (<link linkend="gpointer">gpointer</link> user_data);
<link linkend="gchar">gchar</link> **            <link linkend="pk-package-ids-from-id">pk_package_ids_from_id</link>              (const <link linkend="gchar">gchar</link> *package_id);
<link linkend="gchar">gchar</link> **            <link linkend="pk-package-ids-from-text">pk_package_ids_from_text</link>            (const <link linkend="gchar">gchar</link> *package_id);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-package-ids-check">pk_package_ids_check</link>                (<link linkend="gchar">gchar</link> **package_ids);
<link linkend="gchar">gchar</link> *             <link linkend="pk-package-ids-to-text">pk_package_ids_to_text</link>              (<link linkend="gchar">gchar</link> **package_ids);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-package-ids-present-id">pk_package_ids_present_id</link>           (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);
<link linkend="gchar">gchar</link> **            <link linkend="pk-package-ids-add-id">pk_package_ids_add_id</link>               (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);
<link linkend="gchar">gchar</link> **            <link linkend="pk-package-ids-add-ids">pk_package_ids_add_ids</link>              (<link linkend="gchar">gchar</link> **package_ids,
                                                         <link linkend="gchar">gchar</link> **package_ids_new);
<link linkend="gchar">gchar</link> **            <link linkend="pk-package-ids-remove-id">pk_package_ids_remove_id</link>            (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);
</synopsis>
</refsynopsisdiv>









<refsect1 id="PackageKit-pk-package-ids.description" role="desc">
<title role="desc.title">Description</title>
<para>
Composite PackageId's are difficult to read and create.</para>
<para>
</para>
</refsect1>

<refsect1 id="PackageKit-pk-package-ids.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PK-PACKAGE-IDS-DELIM--CAPS" role="macro">
<title>PK_PACKAGE_IDS_DELIM</title>
<indexterm zone="PK-PACKAGE-IDS-DELIM--CAPS"><primary sortas="PK_PACKAGE_IDS_DELIM">PK_PACKAGE_IDS_DELIM</primary></indexterm><programlisting>#define PK_PACKAGE_IDS_DELIM	"&amp;"
</programlisting>
<para>
</para></refsect2>
<refsect2 id="pk-package-ids-test" role="function">
<title>pk_package_ids_test ()</title>
<indexterm zone="pk-package-ids-test"><primary sortas="pk_package_ids_test">pk_package_ids_test</primary></indexterm><programlisting><link linkend="void">void</link>                pk_package_ids_test                 (<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-from-id" role="function">
<title>pk_package_ids_from_id ()</title>
<indexterm zone="pk-package-ids-from-id"><primary sortas="pk_package_ids_from_id">pk_package_ids_from_id</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_package_ids_from_id              (const <link linkend="gchar">gchar</link> *package_id);</programlisting>
<para>
Form a composite string array of package_id's from
a single package_id</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_id</parameter>&#160;:</term>
<listitem><simpara> A single package_id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the string array, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if invalid, free with <link linkend="g-strfreev"><function>g_strfreev()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-from-text" role="function">
<title>pk_package_ids_from_text ()</title>
<indexterm zone="pk-package-ids-from-text"><primary sortas="pk_package_ids_from_text">pk_package_ids_from_text</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_package_ids_from_text            (const <link linkend="gchar">gchar</link> *package_id);</programlisting>
<para>
Form a composite string array of package_id's from
a delimited string</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_id</parameter>&#160;:</term>
<listitem><simpara> A single package_id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the string array, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if invalid, free with <link linkend="g-strfreev"><function>g_strfreev()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-check" role="function">
<title>pk_package_ids_check ()</title>
<indexterm zone="pk-package-ids-check"><primary sortas="pk_package_ids_check">pk_package_ids_check</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_package_ids_check                (<link linkend="gchar">gchar</link> **package_ids);</programlisting>
<para>
Check the string array of package_id's for validity</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the package_ids are all valid.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-to-text" role="function">
<title>pk_package_ids_to_text ()</title>
<indexterm zone="pk-package-ids-to-text"><primary sortas="pk_package_ids_to_text">pk_package_ids_to_text</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             pk_package_ids_to_text              (<link linkend="gchar">gchar</link> **package_ids);</programlisting>
<para>
Cats the string array of package_id's into one delimited string</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string representation of all the package_id's.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-present-id" role="function">
<title>pk_package_ids_present_id ()</title>
<indexterm zone="pk-package-ids-present-id"><primary sortas="pk_package_ids_present_id">pk_package_ids_present_id</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_package_ids_present_id           (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);</programlisting>
<para>
Finds out if a package ID is present in the list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>package_id</parameter>&#160;:</term>
<listitem><simpara> a single package_id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the package ID is present
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-add-id" role="function">
<title>pk_package_ids_add_id ()</title>
<indexterm zone="pk-package-ids-add-id"><primary sortas="pk_package_ids_add_id">pk_package_ids_add_id</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_package_ids_add_id               (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);</programlisting>
<para>
Adds a package_id to an existing list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>package_id</parameter>&#160;:</term>
<listitem><simpara> a single package_id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new list, free <link linkend="g-strfreev"><function>g_strfreev()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-add-ids" role="function">
<title>pk_package_ids_add_ids ()</title>
<indexterm zone="pk-package-ids-add-ids"><primary sortas="pk_package_ids_add_ids">pk_package_ids_add_ids</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_package_ids_add_ids              (<link linkend="gchar">gchar</link> **package_ids,
                                                         <link linkend="gchar">gchar</link> **package_ids_new);</programlisting>
<para>
Adds a package_id to an existing list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>package_ids_new</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new list, free <link linkend="g-strfreev"><function>g_strfreev()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-package-ids-remove-id" role="function">
<title>pk_package_ids_remove_id ()</title>
<indexterm zone="pk-package-ids-remove-id"><primary sortas="pk_package_ids_remove_id">pk_package_ids_remove_id</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_package_ids_remove_id            (<link linkend="gchar">gchar</link> **package_ids,
                                                         const <link linkend="gchar">gchar</link> *package_id);</programlisting>
<para>
Removes a package ID from the the list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>package_ids</parameter>&#160;:</term>
<listitem><simpara> a string array of package_id's
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>package_id</parameter>&#160;:</term>
<listitem><simpara> a single package_id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new list, free <link linkend="g-strfreev"><function>g_strfreev()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
