<?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="PkCatalog">
<refmeta>
<refentrytitle role="top_of_page" id="PkCatalog.top_of_page">PkCatalog</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PACKAGEKIT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>PkCatalog</refname>
<refpurpose>Functionality for installing catalogs</refpurpose>
</refnamediv>

<refsynopsisdiv id="PkCatalog.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#define             <link linkend="PK-CATALOG-ERROR--CAPS">PK_CATALOG_ERROR</link>
#define             <link linkend="PK-CATALOG-TYPE-ERROR--CAPS">PK_CATALOG_TYPE_ERROR</link>
#define             <link linkend="PK-CATALOG-FILE-EXTENSION--CAPS">PK_CATALOG_FILE_EXTENSION</link>
#define             <link linkend="PK-CATALOG-FILE-HEADER--CAPS">PK_CATALOG_FILE_HEADER</link>
enum                <link linkend="PkCatalogError">PkCatalogError</link>;
                    <link linkend="PkCatalogPrivate">PkCatalogPrivate</link>;
                    <link linkend="PkCatalog-struct">PkCatalog</link>;
<link linkend="GQuark">GQuark</link>              <link linkend="pk-catalog-error-quark">pk_catalog_error_quark</link>              (void);
<link linkend="GType">GType</link>               <link linkend="pk-catalog-get-type">pk_catalog_get_type</link>                 (void);
<link linkend="PkCatalog">PkCatalog</link> *         <link linkend="pk-catalog-new">pk_catalog_new</link>                      (void);
<link linkend="void">void</link>                <link linkend="pk-catalog-test">pk_catalog_test</link>                     (<link linkend="gpointer">gpointer</link> user_data);
<link linkend="GPtrArray">GPtrArray</link> *         <link linkend="pk-catalog-lookup-finish">pk_catalog_lookup_finish</link>            (<link linkend="PkCatalog">PkCatalog</link> *catalog,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="void">void</link>                <link linkend="pk-catalog-lookup-async">pk_catalog_lookup_async</link>             (<link linkend="PkCatalog">PkCatalog</link> *catalog,
                                                         const <link linkend="gchar">gchar</link> *filename,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="PkProgressCallback">PkProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_user_data,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsynopsisdiv>

<refsect1 id="PkCatalog.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----PkCatalog
</synopsis>
</refsect1>








<refsect1 id="PkCatalog.description" role="desc">
<title role="desc.title">Description</title>
<para>
Clients can use this GObject for installing catalog files.</para>
<para>
</para>
</refsect1>

<refsect1 id="PkCatalog.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PK-CATALOG-ERROR--CAPS" role="macro">
<title>PK_CATALOG_ERROR</title>
<indexterm zone="PK-CATALOG-ERROR--CAPS"><primary sortas="PK_CATALOG_ERROR">PK_CATALOG_ERROR</primary></indexterm><programlisting>#define PK_CATALOG_ERROR	(pk_catalog_error_quark ())
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PK-CATALOG-TYPE-ERROR--CAPS" role="macro">
<title>PK_CATALOG_TYPE_ERROR</title>
<indexterm zone="PK-CATALOG-TYPE-ERROR--CAPS"><primary sortas="PK_CATALOG_TYPE_ERROR">PK_CATALOG_TYPE_ERROR</primary></indexterm><programlisting>#define PK_CATALOG_TYPE_ERROR	(pk_catalog_error_get_type ())
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PK-CATALOG-FILE-EXTENSION--CAPS" role="macro">
<title>PK_CATALOG_FILE_EXTENSION</title>
<indexterm zone="PK-CATALOG-FILE-EXTENSION--CAPS"><primary sortas="PK_CATALOG_FILE_EXTENSION">PK_CATALOG_FILE_EXTENSION</primary></indexterm><programlisting>#define PK_CATALOG_FILE_EXTENSION	"catalog"
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PK-CATALOG-FILE-HEADER--CAPS" role="macro">
<title>PK_CATALOG_FILE_HEADER</title>
<indexterm zone="PK-CATALOG-FILE-HEADER--CAPS"><primary sortas="PK_CATALOG_FILE_HEADER">PK_CATALOG_FILE_HEADER</primary></indexterm><programlisting>#define PK_CATALOG_FILE_HEADER		"PackageKit Catalog"
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PkCatalogError" role="enum">
<title>enum PkCatalogError</title>
<indexterm zone="PkCatalogError"><primary sortas="PkCatalogError">PkCatalogError</primary></indexterm><programlisting>typedef enum
{
	PK_CATALOG_ERROR_FAILED
} PkCatalogError;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PkCatalogPrivate" role="struct">
<title>PkCatalogPrivate</title>
<indexterm zone="PkCatalogPrivate"><primary sortas="PkCatalogPrivate">PkCatalogPrivate</primary></indexterm><programlisting>typedef struct _PkCatalogPrivate PkCatalogPrivate;</programlisting>
<para>
Private <link linkend="PkCatalog"><type>PkCatalog</type></link> data</para>
<para>
</para></refsect2>
<refsect2 id="PkCatalog-struct" role="struct">
<title>PkCatalog</title>
<indexterm zone="PkCatalog-struct"><primary sortas="PkCatalog">PkCatalog</primary></indexterm><programlisting>typedef struct _PkCatalog PkCatalog;</programlisting>
<para>
</para></refsect2>
<refsect2 id="pk-catalog-error-quark" role="function">
<title>pk_catalog_error_quark ()</title>
<indexterm zone="pk-catalog-error-quark"><primary sortas="pk_catalog_error_quark">pk_catalog_error_quark</primary></indexterm><programlisting><link linkend="GQuark">GQuark</link>              pk_catalog_error_quark              (void);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> Our personal error quark.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-catalog-get-type" role="function">
<title>pk_catalog_get_type ()</title>
<indexterm zone="pk-catalog-get-type"><primary sortas="pk_catalog_get_type">pk_catalog_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link>               pk_catalog_get_type                 (void);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-catalog-new" role="function">
<title>pk_catalog_new ()</title>
<indexterm zone="pk-catalog-new"><primary sortas="pk_catalog_new">pk_catalog_new</primary></indexterm><programlisting><link linkend="PkCatalog">PkCatalog</link> *         pk_catalog_new                      (void);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new catalog class instance.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-catalog-test" role="function">
<title>pk_catalog_test ()</title>
<indexterm zone="pk-catalog-test"><primary sortas="pk_catalog_test">pk_catalog_test</primary></indexterm><programlisting><link linkend="void">void</link>                pk_catalog_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-catalog-lookup-finish" role="function">
<title>pk_catalog_lookup_finish ()</title>
<indexterm zone="pk-catalog-lookup-finish"><primary sortas="pk_catalog_lookup_finish">pk_catalog_lookup_finish</primary></indexterm><programlisting><link linkend="GPtrArray">GPtrArray</link> *         pk_catalog_lookup_finish            (<link linkend="PkCatalog">PkCatalog</link> *catalog,
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Gets the result from the asynchronous function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>catalog</parameter>&#160;:</term>
<listitem><simpara> a valid <link linkend="PkCatalog"><type>PkCatalog</type></link> instance
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GAsyncResult"><type>GAsyncResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GError"><type>GError</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GPtrArray"><type>GPtrArray</type></link> of <link linkend="PkPackage"><type>PkPackage</type></link>'s, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. Free with <link linkend="g-ptr-array-unref"><function>g_ptr_array_unref()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-catalog-lookup-async" role="function">
<title>pk_catalog_lookup_async ()</title>
<indexterm zone="pk-catalog-lookup-async"><primary sortas="pk_catalog_lookup_async">pk_catalog_lookup_async</primary></indexterm><programlisting><link linkend="void">void</link>                pk_catalog_lookup_async             (<link linkend="PkCatalog">PkCatalog</link> *catalog,
                                                         const <link linkend="gchar">gchar</link> *filename,
                                                         <link linkend="GCancellable">GCancellable</link> *cancellable,
                                                         <link linkend="PkProgressCallback">PkProgressCallback</link> progress_callback,
                                                         <link linkend="gpointer">gpointer</link> progress_user_data,
                                                         <link linkend="GAsyncReadyCallback">GAsyncReadyCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Simulate the install of a catalog file.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>catalog</parameter>&#160;:</term>
<listitem><simpara> a valid <link linkend="PkCatalog"><type>PkCatalog</type></link> instance
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
<listitem><simpara> the filename of the catalog to install
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancellable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GCancellable"><type>GCancellable</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_callback</parameter>&#160;:</term>
<listitem><simpara> the function to run when the progress changes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>progress_user_data</parameter>&#160;:</term>
<listitem><simpara> data to pass to <parameter>progress_callback</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> the function to run on completion
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> the data to pass to <parameter>callback</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
