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

<refnamediv>
<refname>EBookBackendSummary</refname>
<refpurpose></refpurpose>
</refnamediv>

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

<synopsis>
struct              <link linkend="EBookBackendSummary-struct">EBookBackendSummary</link>;
<link linkend="EBookBackendSummary">EBookBackendSummary</link>* <link linkend="e-book-backend-summary-new">e_book_backend_summary_new</link>         (const <link linkend="char">char</link> *summary_path,
                                                         <link linkend="int">int</link> flush_timeout_millis);
<link linkend="gboolean">gboolean</link>            <link linkend="e-book-backend-summary-load">e_book_backend_summary_load</link>         (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);
<link linkend="gboolean">gboolean</link>            <link linkend="e-book-backend-summary-save">e_book_backend_summary_save</link>         (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);
<link linkend="void">void</link>                <link linkend="e-book-backend-summary-add-contact">e_book_backend_summary_add_contact</link>  (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         <link linkend="EContact">EContact</link> *contact);
<link linkend="void">void</link>                <link linkend="e-book-backend-summary-remove-contact">e_book_backend_summary_remove_contact</link>
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);
<link linkend="gboolean">gboolean</link>            <link linkend="e-book-backend-summary-check-contact">e_book_backend_summary_check_contact</link>
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);
<link linkend="void">void</link>                <link linkend="e-book-backend-summary-touch">e_book_backend_summary_touch</link>        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);
<link linkend="gboolean">gboolean</link>            <link linkend="e-book-backend-summary-is-up-to-date">e_book_backend_summary_is_up_to_date</link>
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         <link linkend="time-t">time_t</link> t);
<link linkend="gboolean">gboolean</link>            <link linkend="e-book-backend-summary-is-summary-query">e_book_backend_summary_is_summary_query</link>
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *query);
<link linkend="GPtrArray">GPtrArray</link>*          <link linkend="e-book-backend-summary-search">e_book_backend_summary_search</link>       (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *query);
<link linkend="char">char</link>*               <link linkend="e-book-backend-summary-get-summary-vcard">e_book_backend_summary_get_summary_vcard</link>
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);
</synopsis>
</refsynopsisdiv>

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








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

<refsect1 id="EBookBackendSummary.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="EBookBackendSummary-struct" role="struct">
<title>struct EBookBackendSummary</title>
<indexterm zone="EBookBackendSummary-struct"><primary sortas="EBookBackendSummary">EBookBackendSummary</primary></indexterm><programlisting>struct EBookBackendSummary;</programlisting>
<para>
</para></refsect2>
<refsect2 id="e-book-backend-summary-new" role="function">
<title>e_book_backend_summary_new ()</title>
<indexterm zone="e-book-backend-summary-new"><primary sortas="e_book_backend_summary_new">e_book_backend_summary_new</primary></indexterm><programlisting><link linkend="EBookBackendSummary">EBookBackendSummary</link>* e_book_backend_summary_new         (const <link linkend="char">char</link> *summary_path,
                                                         <link linkend="int">int</link> flush_timeout_millis);</programlisting>
<para>
Creates an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link> object without loading it
or otherwise affecting the file. <parameter>flush_timeout_millis</parameter>
specifies how much time should elapse, at a minimum, from
the summary is changed until it is flushed to disk.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary_path</parameter>&#160;:</term>
<listitem><simpara> a local file system path
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flush_timeout_millis</parameter>&#160;:</term>
<listitem><simpara> a flush interval, in milliseconds
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-load" role="function">
<title>e_book_backend_summary_load ()</title>
<indexterm zone="e-book-backend-summary-load"><primary sortas="e_book_backend_summary_load">e_book_backend_summary_load</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_book_backend_summary_load         (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);</programlisting>
<para>
Attempts to load <parameter>summary</parameter> from disk. The load is successful if
the file was located, it was in the correct format, and it was
not out of date.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the load succeeded, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if it failed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-save" role="function">
<title>e_book_backend_summary_save ()</title>
<indexterm zone="e-book-backend-summary-save"><primary sortas="e_book_backend_summary_save">e_book_backend_summary_save</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_book_backend_summary_save         (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);</programlisting>
<para>
Attempts to save <parameter>summary</parameter> to disk.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the save succeeded, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-add-contact" role="function">
<title>e_book_backend_summary_add_contact ()</title>
<indexterm zone="e-book-backend-summary-add-contact"><primary sortas="e_book_backend_summary_add_contact">e_book_backend_summary_add_contact</primary></indexterm><programlisting><link linkend="void">void</link>                e_book_backend_summary_add_contact  (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         <link linkend="EContact">EContact</link> *contact);</programlisting>
<para>
Adds a summary of <parameter>contact</parameter> to <parameter>summary</parameter>. Does not check if
the contact already has a summary.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contact</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EContact"><type>EContact</type></link> to add
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-remove-contact" role="function">
<title>e_book_backend_summary_remove_contact ()</title>
<indexterm zone="e-book-backend-summary-remove-contact"><primary sortas="e_book_backend_summary_remove_contact">e_book_backend_summary_remove_contact</primary></indexterm><programlisting><link linkend="void">void</link>                e_book_backend_summary_remove_contact
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);</programlisting>
<para>
Removes the summary of the contact identified by <parameter>id</parameter> from <parameter>summary</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara> a unique contact ID string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-check-contact" role="function">
<title>e_book_backend_summary_check_contact ()</title>
<indexterm zone="e-book-backend-summary-check-contact"><primary sortas="e_book_backend_summary_check_contact">e_book_backend_summary_check_contact</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_book_backend_summary_check_contact
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);</programlisting>
<para>
Checks if a summary of the contact identified by <parameter>id</parameter>
exists in <parameter>summary</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara> a unique contact ID string
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the summary exists, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-touch" role="function">
<title>e_book_backend_summary_touch ()</title>
<indexterm zone="e-book-backend-summary-touch"><primary sortas="e_book_backend_summary_touch">e_book_backend_summary_touch</primary></indexterm><programlisting><link linkend="void">void</link>                e_book_backend_summary_touch        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary);</programlisting>
<para>
Indicates that <parameter>summary</parameter> has changed and should be flushed to disk.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-is-up-to-date" role="function">
<title>e_book_backend_summary_is_up_to_date ()</title>
<indexterm zone="e-book-backend-summary-is-up-to-date"><primary sortas="e_book_backend_summary_is_up_to_date">e_book_backend_summary_is_up_to_date</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_book_backend_summary_is_up_to_date
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         <link linkend="time-t">time_t</link> t);</programlisting>
<para>
Checks if <parameter>summary</parameter> is more recent than <parameter>t</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>t</parameter>&#160;:</term>
<listitem><simpara> the time to compare with
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the summary is up to date, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-is-summary-query" role="function">
<title>e_book_backend_summary_is_summary_query ()</title>
<indexterm zone="e-book-backend-summary-is-summary-query"><primary sortas="e_book_backend_summary_is_summary_query">e_book_backend_summary_is_summary_query</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_book_backend_summary_is_summary_query
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *query);</programlisting>
<para>
Checks if <parameter>query</parameter> can be satisfied by searching only the fields
stored by <parameter>summary</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&#160;:</term>
<listitem><simpara> an s-expression to check
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the query can be satisfied, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-search" role="function">
<title>e_book_backend_summary_search ()</title>
<indexterm zone="e-book-backend-summary-search"><primary sortas="e_book_backend_summary_search">e_book_backend_summary_search</primary></indexterm><programlisting><link linkend="GPtrArray">GPtrArray</link>*          e_book_backend_summary_search       (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *query);</programlisting>
<para>
Searches <parameter>summary</parameter> for contacts matching <parameter>query</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&#160;:</term>
<listitem><simpara> an s-expression
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GPtrArray"><type>GPtrArray</type></link> of pointers to contact ID strings.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-book-backend-summary-get-summary-vcard" role="function">
<title>e_book_backend_summary_get_summary_vcard ()</title>
<indexterm zone="e-book-backend-summary-get-summary-vcard"><primary sortas="e_book_backend_summary_get_summary_vcard">e_book_backend_summary_get_summary_vcard</primary></indexterm><programlisting><link linkend="char">char</link>*               e_book_backend_summary_get_summary_vcard
                                                        (<link linkend="EBookBackendSummary">EBookBackendSummary</link> *summary,
                                                         const <link linkend="char">char</link> *id);</programlisting>
<para>
Constructs and returns a VCard from the contact summary specified
by <parameter>id</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> an <link linkend="EBookBackendSummary"><type>EBookBackendSummary</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara> a unique contact ID
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new VCard, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the contact summary didn't exist.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
