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

<refnamediv>
<refname>PkTaskList</refname>
<refpurpose>A nice way to keep a list of the jobs being processed</refpurpose>
</refnamediv>

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

<synopsis>
                    <link linkend="PkTaskListPrivate">PkTaskListPrivate</link>;
                    <link linkend="PkTaskList-struct">PkTaskList</link>;
<link linkend="PkTaskList">PkTaskList</link> *        <link linkend="pk-task-list-new">pk_task_list_new</link>                    (void);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-task-list-refresh">pk_task_list_refresh</link>                (<link linkend="PkTaskList">PkTaskList</link> *tlist);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-task-list-print">pk_task_list_print</link>                  (<link linkend="PkTaskList">PkTaskList</link> *tlist);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-task-list-free">pk_task_list_free</link>                   (<link linkend="PkTaskList">PkTaskList</link> *tlist);
<link linkend="gboolean">gboolean</link>            <link linkend="pk-task-list-contains-role">pk_task_list_contains_role</link>          (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                         <link linkend="PkRoleEnum">PkRoleEnum</link> role);
<link linkend="guint">guint</link>               <link linkend="pk-task-list-get-size">pk_task_list_get_size</link>               (<link linkend="PkTaskList">PkTaskList</link> *tlist);
<link linkend="PkTaskListItem">PkTaskListItem</link> *    <link linkend="pk-task-list-get-item">pk_task_list_get_item</link>               (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                         <link linkend="guint">guint</link> item);
</synopsis>
</refsynopsisdiv>

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






<refsect1 id="PkTaskList.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="PkTaskList-changed">changed</link>&quot;                                        : Run Last
  &quot;<link linkend="PkTaskList-error-code">error-code</link>&quot;                                     : Run Last
  &quot;<link linkend="PkTaskList-finished">finished</link>&quot;                                       : Run Last
  &quot;<link linkend="PkTaskList-message">message</link>&quot;                                        : Run Last
  &quot;<link linkend="PkTaskList-status-changed">status-changed</link>&quot;                                 : Run Last
</synopsis>
</refsect1>


<refsect1 id="PkTaskList.description" role="desc">
<title role="desc.title">Description</title>
<para>
These provide a good way to keep a list of the jobs being processed so we
can see what type of jobs and thier status easily.</para>
<para>
</para>
</refsect1>

<refsect1 id="PkTaskList.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PkTaskListPrivate" role="struct">
<title>PkTaskListPrivate</title>
<indexterm zone="PkTaskListPrivate"><primary sortas="PkTaskListPrivate">PkTaskListPrivate</primary></indexterm><programlisting>typedef struct _PkTaskListPrivate PkTaskListPrivate;</programlisting>
<para>
Private <link linkend="PkTaskList"><type>PkTaskList</type></link> data</para>
<para>
</para></refsect2>
<refsect2 id="PkTaskList-struct" role="struct">
<title>PkTaskList</title>
<indexterm zone="PkTaskList-struct"><primary sortas="PkTaskList">PkTaskList</primary></indexterm><programlisting>typedef struct _PkTaskList PkTaskList;</programlisting>
<para>
</para></refsect2>
<refsect2 id="pk-task-list-new" role="function">
<title>pk_task_list_new ()</title>
<indexterm zone="pk-task-list-new"><primary sortas="pk_task_list_new">pk_task_list_new</primary></indexterm><programlisting><link linkend="PkTaskList">PkTaskList</link> *        pk_task_list_new                    (void);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-refresh" role="function">
<title>pk_task_list_refresh ()</title>
<indexterm zone="pk-task-list-refresh"><primary sortas="pk_task_list_refresh">pk_task_list_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_task_list_refresh                (<link linkend="PkTaskList">PkTaskList</link> *tlist);</programlisting>
<para>
Not normally required, but force a refresh</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-print" role="function">
<title>pk_task_list_print ()</title>
<indexterm zone="pk-task-list-print"><primary sortas="pk_task_list_print">pk_task_list_print</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_task_list_print                  (<link linkend="PkTaskList">PkTaskList</link> *tlist);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-free" role="function">
<title>pk_task_list_free ()</title>
<indexterm zone="pk-task-list-free"><primary sortas="pk_task_list_free">pk_task_list_free</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_task_list_free                   (<link linkend="PkTaskList">PkTaskList</link> *tlist);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-contains-role" role="function">
<title>pk_task_list_contains_role ()</title>
<indexterm zone="pk-task-list-contains-role"><primary sortas="pk_task_list_contains_role">pk_task_list_contains_role</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pk_task_list_contains_role          (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                         <link linkend="PkRoleEnum">PkRoleEnum</link> role);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>role</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-get-size" role="function">
<title>pk_task_list_get_size ()</title>
<indexterm zone="pk-task-list-get-size"><primary sortas="pk_task_list_get_size">pk_task_list_get_size</primary></indexterm><programlisting><link linkend="guint">guint</link>               pk_task_list_get_size               (<link linkend="PkTaskList">PkTaskList</link> *tlist);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-task-list-get-item" role="function">
<title>pk_task_list_get_item ()</title>
<indexterm zone="pk-task-list-get-item"><primary sortas="pk_task_list_get_item">pk_task_list_get_item</primary></indexterm><programlisting><link linkend="PkTaskListItem">PkTaskListItem</link> *    pk_task_list_get_item               (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                         <link linkend="guint">guint</link> item);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>item</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

<refsect1 id="PkTaskList.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="PkTaskList-changed" role="signal"><title>The <literal>&quot;changed&quot;</literal> signal</title>
<indexterm zone="PkTaskList-changed"><primary sortas="PkTaskList::changed">PkTaskList::changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                        <link linkend="gpointer">gpointer</link>    user_data)      : Run Last</programlisting>
<para>
The ::changed signal is emitted when the transaction list has changed</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkTaskList"><type>PkTaskList</type></link> instance that emitted the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PkTaskList-error-code" role="signal"><title>The <literal>&quot;error-code&quot;</literal> signal</title>
<indexterm zone="PkTaskList-error-code"><primary sortas="PkTaskList::error-code">PkTaskList::error-code</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PkTaskList">PkTaskList</link> *pktasklist,
                                                        <link linkend="gpointer">gpointer</link>    arg1,
                                                        <link linkend="guint">guint</link>       arg2,
                                                        <link linkend="gchar">gchar</link>      *arg3,
                                                        <link linkend="gpointer">gpointer</link>    user_data)       : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pktasklist</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg3</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PkTaskList-finished" role="signal"><title>The <literal>&quot;finished&quot;</literal> signal</title>
<indexterm zone="PkTaskList-finished"><primary sortas="PkTaskList::finished">PkTaskList::finished</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                        <link linkend="gpointer">gpointer</link>    client,
                                                        <link linkend="guint">guint</link>       exit,
                                                        <link linkend="guint">guint</link>       runtime,
                                                        <link linkend="gpointer">gpointer</link>    user_data)      : Run Last</programlisting>
<para>
The ::finished signal is emitted when the transaction is complete.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkTaskList"><type>PkTaskList</type></link> instance that emitted the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>client</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkClient"><type>PkClient</type></link> instance that caused the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>exit</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkExitEnum"><type>PkExitEnum</type></link> status value, e.g. PK_EXIT_ENUM_SUCCESS
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>runtime</parameter>&#160;:</term>
<listitem><simpara> the time in seconds the transaction has been running
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PkTaskList-message" role="signal"><title>The <literal>&quot;message&quot;</literal> signal</title>
<indexterm zone="PkTaskList-message"><primary sortas="PkTaskList::message">PkTaskList::message</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                        <link linkend="gpointer">gpointer</link>    client,
                                                        <link linkend="guint">guint</link>       message,
                                                        <link linkend="gchar">gchar</link>      *details,
                                                        <link linkend="gpointer">gpointer</link>    user_data)      : Run Last</programlisting>
<para>
The ::message signal is emitted when the transaction wants to tell
the user something.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkTaskList"><type>PkTaskList</type></link> instance that emitted the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>client</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkClient"><type>PkClient</type></link> instance that caused the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message</parameter>&#160;:</term>
<listitem><simpara> the PkMessageEnum type of the message, e.g. <link linkend="PK-MESSAGE-ENUM-BROKEN-MIRROR--CAPS"><literal>PK_MESSAGE_ENUM_BROKEN_MIRROR</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>details</parameter>&#160;:</term>
<listitem><simpara> the non-localised message details
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PkTaskList-status-changed" role="signal"><title>The <literal>&quot;status-changed&quot;</literal> signal</title>
<indexterm zone="PkTaskList-status-changed"><primary sortas="PkTaskList::status-changed">PkTaskList::status-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PkTaskList">PkTaskList</link> *tlist,
                                                        <link linkend="gpointer">gpointer</link>    user_data)      : Run Last</programlisting>
<para>
The ::status-changed signal is emitted when one of the status' of the transaction list
clients has changed</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tlist</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PkTaskList"><type>PkTaskList</type></link> instance that emitted the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
