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

<refnamediv>
<refname>pk-common</refname>
<refpurpose>Common utility functions for PackageKit</refpurpose>
</refnamediv>

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

<synopsis>
#define             <link linkend="PK-DBUS-SERVICE--CAPS">PK_DBUS_SERVICE</link>
#define             <link linkend="PK-DBUS-PATH--CAPS">PK_DBUS_PATH</link>
#define             <link linkend="PK-DBUS-INTERFACE--CAPS">PK_DBUS_INTERFACE</link>
#define             <link linkend="PK-DBUS-INTERFACE-TRANSACTION--CAPS">PK_DBUS_INTERFACE_TRANSACTION</link>
#define             <link linkend="PK-SERVICE-PACK-GROUP-NAME--CAPS">PK_SERVICE_PACK_GROUP_NAME</link>
#define             <link linkend="PK-SYSTEM-PACKAGE-LIST-FILENAME--CAPS">PK_SYSTEM_PACKAGE_LIST_FILENAME</link>
enum                <link linkend="PkTristate">PkTristate</link>;
<link linkend="void">void</link>                <link linkend="pk-common-test">pk_common_test</link>                      (<link linkend="gpointer">gpointer</link> user_data);
<link linkend="gchar">gchar</link> **            <link linkend="pk-ptr-array-to-strv">pk_ptr_array_to_strv</link>                (<link linkend="GPtrArray">GPtrArray</link> *array);
<link linkend="gchar">gchar</link> *             <link linkend="pk-iso8601-present">pk_iso8601_present</link>                  (void);
<link linkend="gchar">gchar</link> *             <link linkend="pk-iso8601-from-date">pk_iso8601_from_date</link>                (const <link linkend="GDate">GDate</link> *date);
<link linkend="GDate">GDate</link> *             <link linkend="pk-iso8601-to-date">pk_iso8601_to_date</link>                  (const <link linkend="gchar">gchar</link> *iso_date);
</synopsis>
</refsynopsisdiv>









<refsect1 id="PackageKit-pk-common.description" role="desc">
<title role="desc.title">Description</title>
<para>
This file contains functions that may be useful.</para>
<para>
</para>
</refsect1>

<refsect1 id="PackageKit-pk-common.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PK-DBUS-SERVICE--CAPS" role="macro">
<title>PK_DBUS_SERVICE</title>
<indexterm zone="PK-DBUS-SERVICE--CAPS"><primary sortas="PK_DBUS_SERVICE">PK_DBUS_SERVICE</primary></indexterm><programlisting>#define	PK_DBUS_SERVICE			"org.freedesktop.PackageKit"
</programlisting>
<para>
The SYSTEM service DBUS name</para>
<para>
</para></refsect2>
<refsect2 id="PK-DBUS-PATH--CAPS" role="macro">
<title>PK_DBUS_PATH</title>
<indexterm zone="PK-DBUS-PATH--CAPS"><primary sortas="PK_DBUS_PATH">PK_DBUS_PATH</primary></indexterm><programlisting>#define	PK_DBUS_PATH			"/org/freedesktop/PackageKit"
</programlisting>
<para>
The DBUS path</para>
<para>
</para></refsect2>
<refsect2 id="PK-DBUS-INTERFACE--CAPS" role="macro">
<title>PK_DBUS_INTERFACE</title>
<indexterm zone="PK-DBUS-INTERFACE--CAPS"><primary sortas="PK_DBUS_INTERFACE">PK_DBUS_INTERFACE</primary></indexterm><programlisting>#define	PK_DBUS_INTERFACE		"org.freedesktop.PackageKit"
</programlisting>
<para>
The DBUS interface</para>
<para>
</para></refsect2>
<refsect2 id="PK-DBUS-INTERFACE-TRANSACTION--CAPS" role="macro">
<title>PK_DBUS_INTERFACE_TRANSACTION</title>
<indexterm zone="PK-DBUS-INTERFACE-TRANSACTION--CAPS"><primary sortas="PK_DBUS_INTERFACE_TRANSACTION">PK_DBUS_INTERFACE_TRANSACTION</primary></indexterm><programlisting>#define	PK_DBUS_INTERFACE_TRANSACTION	"org.freedesktop.PackageKit.Transaction"
</programlisting>
<para>
The DBUS interface for the transactions</para>
<para>
</para></refsect2>
<refsect2 id="PK-SERVICE-PACK-GROUP-NAME--CAPS" role="macro">
<title>PK_SERVICE_PACK_GROUP_NAME</title>
<indexterm zone="PK-SERVICE-PACK-GROUP-NAME--CAPS"><primary sortas="PK_SERVICE_PACK_GROUP_NAME">PK_SERVICE_PACK_GROUP_NAME</primary></indexterm><programlisting>#define	PK_SERVICE_PACK_GROUP_NAME	"PackageKit Service Pack"
</programlisting>
<para>
The group name of the Service Pack config file</para>
<para>
</para></refsect2>
<refsect2 id="PK-SYSTEM-PACKAGE-LIST-FILENAME--CAPS" role="macro">
<title>PK_SYSTEM_PACKAGE_LIST_FILENAME</title>
<indexterm zone="PK-SYSTEM-PACKAGE-LIST-FILENAME--CAPS"><primary sortas="PK_SYSTEM_PACKAGE_LIST_FILENAME">PK_SYSTEM_PACKAGE_LIST_FILENAME</primary></indexterm><programlisting>#define	PK_SYSTEM_PACKAGE_LIST_FILENAME	"/var/lib/PackageKit/system.package-list"
</programlisting>
<para>
</para></refsect2>
<refsect2 id="PkTristate" role="enum">
<title>enum PkTristate</title>
<indexterm zone="PkTristate"><primary sortas="PkTristate">PkTristate</primary></indexterm><programlisting>typedef enum {
	PK_TRISTATE_FALSE = FALSE,
	PK_TRISTATE_TRUE = TRUE,
	PK_TRISTATE_UNSET
} PkTristate;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="pk-common-test" role="function">
<title>pk_common_test ()</title>
<indexterm zone="pk-common-test"><primary sortas="pk_common_test">pk_common_test</primary></indexterm><programlisting><link linkend="void">void</link>                pk_common_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-ptr-array-to-strv" role="function">
<title>pk_ptr_array_to_strv ()</title>
<indexterm zone="pk-ptr-array-to-strv"><primary sortas="pk_ptr_array_to_strv">pk_ptr_array_to_strv</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            pk_ptr_array_to_strv                (<link linkend="GPtrArray">GPtrArray</link> *array);</programlisting>
<para>
Form a composite string array of strings.
The data in the GPtrArray is copied.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>array</parameter>&#160;:</term>
<listitem><simpara> the GPtrArray of strings
</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
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-iso8601-present" role="function">
<title>pk_iso8601_present ()</title>
<indexterm zone="pk-iso8601-present"><primary sortas="pk_iso8601_present">pk_iso8601_present</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             pk_iso8601_present                  (void);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The current iso8601 date and time
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-iso8601-from-date" role="function">
<title>pk_iso8601_from_date ()</title>
<indexterm zone="pk-iso8601-from-date"><primary sortas="pk_iso8601_from_date">pk_iso8601_from_date</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             pk_iso8601_from_date                (const <link linkend="GDate">GDate</link> *date);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>date</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GDate"><literal>GDate</literal></link> to convert
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> If valid then a new ISO8601 date, else NULL
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pk-iso8601-to-date" role="function">
<title>pk_iso8601_to_date ()</title>
<indexterm zone="pk-iso8601-to-date"><primary sortas="pk_iso8601_to_date">pk_iso8601_to_date</primary></indexterm><programlisting><link linkend="GDate">GDate</link> *             pk_iso8601_to_date                  (const <link linkend="gchar">gchar</link> *iso_date);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iso_date</parameter>&#160;:</term>
<listitem><simpara> The ISO8601 date to convert
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> If valid then a new <link linkend="GDate"><literal>GDate</literal></link>, else NULL
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
