<?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="libebook-e-book-async">
<refmeta>
<refentrytitle role="top_of_page">e-book-async</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBEBOOK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>e-book-async</refname>
<refpurpose>
Handles asynchronous interactions with the EBook.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



<link linkend="void">void</link>        (<link linkend="EBookCallback">*EBookCallback</link>)                (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="void">void</link>        (<link linkend="EBookOpenProgressCallback">*EBookOpenProgressCallback</link>)    (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *status_message,
                                             short <link linkend="percent">percent</link> ,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="void">void</link>        (<link linkend="EBookIdCallback">*EBookIdCallback</link>)              (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="void">void</link>        (<link linkend="EBookContactCallback">*EBookContactCallback</link>)         (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="void">void</link>        (<link linkend="EBookBookViewCallback">*EBookBookViewCallback</link>)        (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="EBookView">EBookView</link> *book_view,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-get-supported-fields">e_book_async_get_supported_fields</link>
                                            (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookEListCallback">EBookEListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-get-supported-auth-methods">e_book_async_get_supported_auth_methods</link>
                                            (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookEListCallback">EBookEListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-authenticate-user">e_book_async_authenticate_user</link>  (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *user,
                                             const <link linkend="char">char</link> *passwd,
                                             const <link linkend="char">char</link> *auth_method,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-get-contact">e_book_async_get_contact</link>        (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="EBookContactCallback">EBookContactCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-get-contacts">e_book_async_get_contacts</link>       (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookQuery">EBookQuery</link> *query,
                                             <link linkend="EBookListCallback">EBookListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-remove-contact">e_book_async_remove_contact</link>     (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-remove-contact-by-id">e_book_async_remove_contact_by_id</link>
                                            (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-remove-contacts">e_book_async_remove_contacts</link>    (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="GList">GList</link> *id_list,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="gboolean">gboolean</link>    <link linkend="e-book-async-add-contact">e_book_async_add_contact</link>        (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookIdCallback">EBookIdCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-commit-contact">e_book_async_commit_contact</link>     (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
<link linkend="guint">guint</link>       <link linkend="e-book-async-get-book-view">e_book_async_get_book_view</link>      (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookQuery">EBookQuery</link> *query,
                                             <link linkend="GList">GList</link> *requested_fields,
                                             <link linkend="int">int</link> max_results,
                                             <link linkend="EBookBookViewCallback">EBookBookViewCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);
</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="EBookCallback" role="function"/>EBookCallback ()</title>
<indexterm><primary>EBookCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*EBookCallback)                (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="EBookOpenProgressCallback" role="function"/>EBookOpenProgressCallback ()</title>
<indexterm><primary>EBookOpenProgressCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*EBookOpenProgressCallback)    (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *status_message,
                                             short <link linkend="percent">percent</link> ,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status_message</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>Param3</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="EBookIdCallback" role="function"/>EBookIdCallback ()</title>
<indexterm><primary>EBookIdCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*EBookIdCallback)              (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="EBookContactCallback" role="function"/>EBookContactCallback ()</title>
<indexterm><primary>EBookContactCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*EBookContactCallback)         (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contact</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="EBookBookViewCallback" role="function"/>EBookBookViewCallback ()</title>
<indexterm><primary>EBookBookViewCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*EBookBookViewCallback)        (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookStatus">EBookStatus</link> status,
                                             <link linkend="EBookView">EBookView</link> *book_view,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>book_view</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-get-supported-fields" role="function"/>e_book_async_get_supported_fields ()</title>
<indexterm><primary>e_book_async_get_supported_fields</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_get_supported_fields
                                            (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookEListCallback">EBookEListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Gets a list of fields that can be stored for contacts
in this <parameter>book</parameter>. Other fields may be discarded. This
function does not block.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if successful, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-get-supported-auth-methods" role="function"/>e_book_async_get_supported_auth_methods ()</title>
<indexterm><primary>e_book_async_get_supported_auth_methods</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_get_supported_auth_methods
                                            (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookEListCallback">EBookEListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Queries <parameter>book</parameter> for the list of authentication methods it supports.
This function does not block.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if successful, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-authenticate-user" role="function"/>e_book_async_authenticate_user ()</title>
<indexterm><primary>e_book_async_authenticate_user</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_authenticate_user  (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *user,
                                             const <link linkend="char">char</link> *passwd,
                                             const <link linkend="char">char</link> *auth_method,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Authenticate <parameter>user</parameter> with <parameter>passwd</parameter>, using the auth method
<parameter>auth_method</parameter>. <parameter>auth_method</parameter> must be one of the authentication
methods returned using e_book_get_supported_auth_methods.
This function does not block.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user</parameter>&nbsp;:</term>
<listitem><simpara> user name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>passwd</parameter>&nbsp;:</term>
<listitem><simpara> password
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>auth_method</parameter>&nbsp;:</term>
<listitem><simpara> string indicating authentication method
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if successful, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-get-contact" role="function"/>e_book_async_get_contact ()</title>
<indexterm><primary>e_book_async_get_contact</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_get_contact        (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="EBookContactCallback">EBookContactCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Retrieves a contact specified by <parameter>id</parameter> from <parameter>book</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> a unique string ID specifying the contact
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if successful, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-get-contacts" role="function"/>e_book_async_get_contacts ()</title>
<indexterm><primary>e_book_async_get_contacts</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_get_contacts       (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookQuery">EBookQuery</link> *query,
                                             <link linkend="EBookListCallback">EBookListCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Query <parameter>book</parameter> with <parameter>query</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBookQuery"><type>EBookQuery</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> a function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> on success, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-remove-contact" role="function"/>e_book_async_remove_contact ()</title>
<indexterm><primary>e_book_async_remove_contact</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_remove_contact     (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Removes <parameter>contact</parameter> from <parameter>book</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contact</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EContact"><type>EContact</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> a function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if successful, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-remove-contact-by-id" role="function"/>e_book_async_remove_contact_by_id ()</title>
<indexterm><primary>e_book_async_remove_contact_by_id</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_remove_contact_by_id
                                            (<link linkend="EBook">EBook</link> *book,
                                             const <link linkend="char">char</link> *id,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Removes the contact with id <parameter>id</parameter> from <parameter>book</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
<listitem><simpara> a unique ID string specifying the contact
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> a function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if successful, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-remove-contacts" role="function"/>e_book_async_remove_contacts ()</title>
<indexterm><primary>e_book_async_remove_contacts</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_remove_contacts    (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="GList">GList</link> *id_list,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Removes the contacts with ids from the list <parameter>ids</parameter> from <parameter>book</parameter>.  This is
always more efficient than calling <link linkend="e-book-remove-contact-by-id"><function>e_book_remove_contact_by_id()</function></link> if you
have more than one id to remove, as some backends can implement it
as a batch request.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id_list</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> a function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if successful, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-add-contact" role="function"/>e_book_async_add_contact ()</title>
<indexterm><primary>e_book_async_add_contact</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    e_book_async_add_contact        (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookIdCallback">EBookIdCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Adds <parameter>contact</parameter> to <parameter>book</parameter> without blocking.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contact</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EContact"><type>EContact</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the operation was started, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-commit-contact" role="function"/>e_book_async_commit_contact ()</title>
<indexterm><primary>e_book_async_commit_contact</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_commit_contact     (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EContact">EContact</link> *contact,
                                             <link linkend="EBookCallback">EBookCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Applies the changes made to <parameter>contact</parameter> to the stored version in
<parameter>book</parameter> without blocking.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contact</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EContact"><type>EContact</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the operation was started, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-book-async-get-book-view" role="function"/>e_book_async_get_book_view ()</title>
<indexterm><primary>e_book_async_get_book_view</primary></indexterm><programlisting><link linkend="guint">guint</link>       e_book_async_get_book_view      (<link linkend="EBook">EBook</link> *book,
                                             <link linkend="EBookQuery">EBookQuery</link> *query,
                                             <link linkend="GList">GList</link> *requested_fields,
                                             <link linkend="int">int</link> max_results,
                                             <link linkend="EBookBookViewCallback">EBookBookViewCallback</link> cb,
                                             <link linkend="gpointer">gpointer</link> closure);</programlisting>
<para>
Query <parameter>book</parameter> with <parameter>query</parameter>, creating a <link linkend="EBookView"><type>EBookView</type></link> with the fields
specified by <parameter>requested_fields</parameter> and limited at <parameter>max_results</parameter> records.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>book</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBook"><type>EBook</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EBookQuery"><type>EBookQuery</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>requested_fields</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GList"><type>GList</type></link> containing the names of fields to return, or NULL for all
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_results</parameter>&nbsp;:</term>
<listitem><simpara> the maximum number of contacts to show (or 0 for all)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> a function to call when the operation finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&nbsp;:</term>
<listitem><simpara> data to pass to callback function
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if successful, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
