<?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">
<refentry id="libedataserver-e-categories">
<refmeta>
<refentrytitle role="top_of_page">e-categories</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBEDATASERVER Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>e-categories</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



<link linkend="GList">GList</link>*      <link linkend="e-categories-get-list">e_categories_get_list</link>           (void);
<link linkend="void">void</link>        <link linkend="e-categories-add">e_categories_add</link>                (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *color,
                                             const <link linkend="char">char</link> *icon_file,
                                             <link linkend="gboolean">gboolean</link> searchable);
<link linkend="void">void</link>        <link linkend="e-categories-remove">e_categories_remove</link>             (const <link linkend="char">char</link> *category);
<link linkend="gboolean">gboolean</link>    <link linkend="e-categories-exist">e_categories_exist</link>              (const <link linkend="char">char</link> *category);
const <link linkend="char">char</link>* <link linkend="e-categories-get-color-for">e_categories_get_color_for</link>      (const <link linkend="char">char</link> *category);
<link linkend="void">void</link>        <link linkend="e-categories-set-color-for">e_categories_set_color_for</link>      (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *color);
const <link linkend="char">char</link>* <link linkend="e-categories-get-icon-file-for">e_categories_get_icon_file_for</link>  (const <link linkend="char">char</link> *category);
<link linkend="void">void</link>        <link linkend="e-categories-set-icon-file-for">e_categories_set_icon_file_for</link>  (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *icon_file);
<link linkend="gboolean">gboolean</link>    <link linkend="e-categories-is-searchable">e_categories_is_searchable</link>      (const <link linkend="char">char</link> *category);
</synopsis>
</refsynopsisdiv>









<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="e-categories-get-list" role="function"/>e_categories_get_list ()</title>
<indexterm><primary>e_categories_get_list</primary></indexterm><programlisting><link linkend="GList">GList</link>*      e_categories_get_list           (void);</programlisting>
<para>
Returns a list of all the category names currently configured.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a GList containing the names of the categories. The list
should be freed using g_list_free, but the names of the categories should
not be touched at all, they are internal strings.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-add" role="function"/>e_categories_add ()</title>
<indexterm><primary>e_categories_add</primary></indexterm><programlisting><link linkend="void">void</link>        e_categories_add                (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *color,
                                             const <link linkend="char">char</link> *icon_file,
                                             <link linkend="gboolean">gboolean</link> searchable);</programlisting>
<para>
Adds a new category, with its corresponding color and icon, to the
configuration database.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> name of category to add.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> associated color.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_file</parameter>&nbsp;:</term>
<listitem><simpara> full path of the icon associated to the category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>searchable</parameter>&nbsp;:</term>
<listitem><simpara> whether the category can be used for searching in the GUI.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-remove" role="function"/>e_categories_remove ()</title>
<indexterm><primary>e_categories_remove</primary></indexterm><programlisting><link linkend="void">void</link>        e_categories_remove             (const <link linkend="char">char</link> *category);</programlisting>
<para>
Removes the given category from the configuration.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to be removed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-exist" role="function"/>e_categories_exist ()</title>
<indexterm><primary>e_categories_exist</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    e_categories_exist              (const <link linkend="char">char</link> *category);</programlisting>
<para>
Checks whether the given category is available in the configuration.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to be searched.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the category is available, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-get-color-for" role="function"/>e_categories_get_color_for ()</title>
<indexterm><primary>e_categories_get_color_for</primary></indexterm><programlisting>const <link linkend="char">char</link>* e_categories_get_color_for      (const <link linkend="char">char</link> *category);</programlisting>
<para>
Gets the color associated with the given category.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to retrieve the color for.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string representation of the color.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-set-color-for" role="function"/>e_categories_set_color_for ()</title>
<indexterm><primary>e_categories_set_color_for</primary></indexterm><programlisting><link linkend="void">void</link>        e_categories_set_color_for      (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *color);</programlisting>
<para>
Sets the color associated with the given category.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to set the color for.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> X color.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-get-icon-file-for" role="function"/>e_categories_get_icon_file_for ()</title>
<indexterm><primary>e_categories_get_icon_file_for</primary></indexterm><programlisting>const <link linkend="char">char</link>* e_categories_get_icon_file_for  (const <link linkend="char">char</link> *category);</programlisting>
<para>
Gets the icon file associated with the given category.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to retrieve the icon file for.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string representation of the color.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-set-icon-file-for" role="function"/>e_categories_set_icon_file_for ()</title>
<indexterm><primary>e_categories_set_icon_file_for</primary></indexterm><programlisting><link linkend="void">void</link>        e_categories_set_icon_file_for  (const <link linkend="char">char</link> *category,
                                             const <link linkend="char">char</link> *icon_file);</programlisting>
<para>
Sets the icon file associated with the given category.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category to set the icon file for.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_file</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-categories-is-searchable" role="function"/>e_categories_is_searchable ()</title>
<indexterm><primary>e_categories_is_searchable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    e_categories_is_searchable      (const <link linkend="char">char</link> *category);</programlisting>
<para>
Gets whether the given calendar is to be used for searches in the GUI.
</para>
<para>
Return value; <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>% if the category is searchable, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>% if not.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>category</parameter>&nbsp;:</term>
<listitem><simpara> category name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
