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

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

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

<synopsis>
                    <link linkend="EAccountList-struct">EAccountList</link>;
enum                <link linkend="e-account-find-t">e_account_find_t</link>;
<link linkend="EAccountList">EAccountList</link>*       <link linkend="e-account-list-new">e_account_list_new</link>                  (<link linkend="GConfClient">GConfClient</link> *gconf);
<link linkend="void">void</link>                <link linkend="e-account-list-construct">e_account_list_construct</link>            (<link linkend="EAccountList">EAccountList</link> *account_list,
                                                         <link linkend="GConfClient">GConfClient</link> *gconf);
<link linkend="void">void</link>                <link linkend="e-account-list-save">e_account_list_save</link>                 (<link linkend="EAccountList">EAccountList</link> *account_list);
<link linkend="void">void</link>                <link linkend="e-account-list-add">e_account_list_add</link>                  (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
<link linkend="void">void</link>                <link linkend="e-account-list-change">e_account_list_change</link>               (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
<link linkend="void">void</link>                <link linkend="e-account-list-remove">e_account_list_remove</link>               (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
const <link linkend="EAccount">EAccount</link>*     <link linkend="e-account-list-get-default">e_account_list_get_default</link>          (<link linkend="EAccountList">EAccountList</link> *);
<link linkend="void">void</link>                <link linkend="e-account-list-set-default">e_account_list_set_default</link>          (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
const <link linkend="EAccount">EAccount</link>*     <link linkend="e-account-list-find">e_account_list_find</link>                 (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="e-account-find-t">e_account_find_t</link> type,
                                                         const <link linkend="char">char</link> *key);
<link linkend="void">void</link>                <link linkend="e-account-list-prune-proxies">e_account_list_prune_proxies</link>        (<link linkend="EAccountList">EAccountList</link> *);
<link linkend="void">void</link>                <link linkend="e-account-list-remove-account-proxies">e_account_list_remove_account_proxies</link>
                                                        (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
<link linkend="int">int</link>                 <link linkend="e-account-list-account-has-proxies">e_account_list_account_has_proxies</link>  (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);
</synopsis>
</refsynopsisdiv>

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

</refsect1>






<refsect1 id="EAccountList.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="EAccountList-account-added">account-added</link>&quot;                                  : Run Last
  &quot;<link linkend="EAccountList-account-changed">account-changed</link>&quot;                                : Run Last
  &quot;<link linkend="EAccountList-account-removed">account-removed</link>&quot;                                : Run Last
</synopsis>
</refsect1>


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

</para>
</refsect1>

<refsect1 id="EAccountList.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="EAccountList-struct" role="struct">
<title>EAccountList</title>
<indexterm zone="EAccountList-struct"><primary>EAccountList</primary></indexterm><programlisting>typedef struct _EAccountList EAccountList;</programlisting>
<para>

</para></refsect2>
<refsect2 id="e-account-find-t" role="enum">
<title>enum e_account_find_t</title>
<indexterm zone="e-account-find-t"><primary>e_account_find_t</primary></indexterm><programlisting>typedef enum _e_account_find_t {
	E_ACCOUNT_FIND_NAME,
	E_ACCOUNT_FIND_UID,
	E_ACCOUNT_FIND_ID_NAME,
	E_ACCOUNT_FIND_ID_ADDRESS,
	E_ACCOUNT_FIND_PARENT_UID,
} e_account_find_t;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="e-account-list-new" role="function">
<title>e_account_list_new ()</title>
<indexterm zone="e-account-list-new"><primary>e_account_list_new</primary></indexterm><programlisting><link linkend="EAccountList">EAccountList</link>*       e_account_list_new                  (<link linkend="GConfClient">GConfClient</link> *gconf);</programlisting>
<para>
Reads the list of accounts from <parameter>gconf</parameter> and listens for changes.
Will emit <link linkend="account-added"><literal>account_added</literal></link>, <link linkend="account-changed"><literal>account_changed</literal></link>, and <link linkend="account-removed"><literal>account_removed</literal></link>
signals according to notifications from GConf.
</para>
<para>
You can modify the list using <link linkend="e-list-append"><function>e_list_append()</function></link>, <link linkend="e-list-remove"><function>e_list_remove()</function></link>, and
<link linkend="e-iterator-delete"><function>e_iterator_delete()</function></link>. After adding, removing, or changing accounts,
you must call <link linkend="e-account-list-save"><function>e_account_list_save()</function></link> to push the changes back to
GConf.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gconf</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GConfClient"><type>GConfClient</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the list of accounts
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-construct" role="function">
<title>e_account_list_construct ()</title>
<indexterm zone="e-account-list-construct"><primary>e_account_list_construct</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_construct            (<link linkend="EAccountList">EAccountList</link> *account_list,
                                                         <link linkend="GConfClient">GConfClient</link> *gconf);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>account_list</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gconf</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-save" role="function">
<title>e_account_list_save ()</title>
<indexterm zone="e-account-list-save"><primary>e_account_list_save</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_save                 (<link linkend="EAccountList">EAccountList</link> *account_list);</programlisting>
<para>
Saves <parameter>account_list</parameter> to GConf. Signals will be emitted for changes.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>account_list</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EAccountList"><type>EAccountList</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-add" role="function">
<title>e_account_list_add ()</title>
<indexterm zone="e-account-list-add"><primary>e_account_list_add</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_add                  (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>
Add an account to the account list.  Will emit the account-changed
event.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-change" role="function">
<title>e_account_list_change ()</title>
<indexterm zone="e-account-list-change"><primary>e_account_list_change</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_change               (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>
Signal that the details of an account have changed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-remove" role="function">
<title>e_account_list_remove ()</title>
<indexterm zone="e-account-list-remove"><primary>e_account_list_remove</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_remove               (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>
Remove an account from the account list, and emit the
account-removed signal.  If the account was the default account,
then reset the default to the first account.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-get-default" role="function">
<title>e_account_list_get_default ()</title>
<indexterm zone="e-account-list-get-default"><primary>e_account_list_get_default</primary></indexterm><programlisting>const <link linkend="EAccount">EAccount</link>*     e_account_list_get_default          (<link linkend="EAccountList">EAccountList</link> *);</programlisting>
<para>
Get the default account.  If no default is specified, or the default
has become stale, then the first account is made the default.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The account or NULL if no accounts are defined.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-set-default" role="function">
<title>e_account_list_set_default ()</title>
<indexterm zone="e-account-list-set-default"><primary>e_account_list_set_default</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_set_default          (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>
Set the account <parameter>account</parameter> to be the default account.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-find" role="function">
<title>e_account_list_find ()</title>
<indexterm zone="e-account-list-find"><primary>e_account_list_find</primary></indexterm><programlisting>const <link linkend="EAccount">EAccount</link>*     e_account_list_find                 (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="e-account-find-t">e_account_find_t</link> type,
                                                         const <link linkend="char">char</link> *key);</programlisting>
<para>
Perform a search of the account list on a single key.
</para>
<para>
<parameter>type</parameter> must be set from one of the following search types:
E_ACCOUNT_FIND_NAME - Find an account by account name.
E_ACCOUNT_FIND_ID_NAME - Find an account by the owner's identity name.
E_ACCOUNT_FIND_ID_ADDRESS - Find an account by the owner's identity address.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> Type of search.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara> Search key.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The account or NULL if it doesn't exist.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-prune-proxies" role="function">
<title>e_account_list_prune_proxies ()</title>
<indexterm zone="e-account-list-prune-proxies"><primary>e_account_list_prune_proxies</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_prune_proxies        (<link linkend="EAccountList">EAccountList</link> *);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-remove-account-proxies" role="function">
<title>e_account_list_remove_account_proxies ()</title>
<indexterm zone="e-account-list-remove-account-proxies"><primary>e_account_list_remove_account_proxies</primary></indexterm><programlisting><link linkend="void">void</link>                e_account_list_remove_account_proxies
                                                        (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>Param1</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param2</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-account-list-account-has-proxies" role="function">
<title>e_account_list_account_has_proxies ()</title>
<indexterm zone="e-account-list-account-has-proxies"><primary>e_account_list_account_has_proxies</primary></indexterm><programlisting><link linkend="int">int</link>                 e_account_list_account_has_proxies  (<link linkend="EAccountList">EAccountList</link> *,
                                                         <link linkend="EAccount">EAccount</link> *);</programlisting>
<para>

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


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

</refsect1>

<refsect1 id="EAccountList.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="EAccountList-account-added"><title>The <literal>&quot;account-added&quot;</literal> signal</title>
<indexterm zone="EAccountList-account-added"><primary>EAccountList::account-added</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="EAccountList">EAccountList</link> *eaccountlist,
                                                        <link linkend="EAccount">EAccount</link>     *arg1,
                                                        <link linkend="gpointer">gpointer</link>      user_data)         : Run Last</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>eaccountlist</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara>

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="EAccountList-account-changed"><title>The <literal>&quot;account-changed&quot;</literal> signal</title>
<indexterm zone="EAccountList-account-changed"><primary>EAccountList::account-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="EAccountList">EAccountList</link> *eaccountlist,
                                                        <link linkend="EAccount">EAccount</link>     *arg1,
                                                        <link linkend="gpointer">gpointer</link>      user_data)         : Run Last</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>eaccountlist</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara>

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="EAccountList-account-removed"><title>The <literal>&quot;account-removed&quot;</literal> signal</title>
<indexterm zone="EAccountList-account-removed"><primary>EAccountList::account-removed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="EAccountList">EAccountList</link> *eaccountlist,
                                                        <link linkend="EAccount">EAccount</link>     *arg1,
                                                        <link linkend="gpointer">gpointer</link>      user_data)         : Run Last</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>eaccountlist</parameter>&nbsp;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&nbsp;:</term>
<listitem><simpara>

</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
