<?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="libecal-e-cal-recur">
<refmeta>
<refentrytitle role="top_of_page">e-cal-recur</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBECAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>e-cal-recur</refname>
<refpurpose>Functions to expand recurrences for recurrent appointments.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



<link linkend="gboolean">gboolean</link>            (<link linkend="ECalRecurInstanceFn">*ECalRecurInstanceFn</link>)              (<link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="time-t">time_t</link> instance_start,
                                                         <link linkend="time-t">time_t</link> instance_end,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="icaltimezone">icaltimezone</link>*       (<link linkend="ECalRecurResolveTimezoneFn">*ECalRecurResolveTimezoneFn</link>)       (const <link linkend="char">char</link> *tzid,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link>                <link linkend="e-cal-recur-generate-instances">e_cal_recur_generate_instances</link>      (<link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="time-t">time_t</link> start,
                                                         <link linkend="time-t">time_t</link> end,
                                                         <link linkend="ECalRecurInstanceFn">ECalRecurInstanceFn</link> cb,
                                                         <link linkend="gpointer">gpointer</link> cb_data,
                                                         <link linkend="ECalRecurResolveTimezoneFn">ECalRecurResolveTimezoneFn</link> tz_cb,
                                                         <link linkend="gpointer">gpointer</link> tz_cb_data,
                                                         <link linkend="icaltimezone">icaltimezone</link> *default_timezone);
</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="ECalRecurInstanceFn" role="function"/>ECalRecurInstanceFn ()</title>
<indexterm><primary>ECalRecurInstanceFn</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*ECalRecurInstanceFn)              (<link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="time-t">time_t</link> instance_start,
                                                         <link linkend="time-t">time_t</link> instance_end,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>comp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>instance_start</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>instance_end</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="ECalRecurResolveTimezoneFn" role="function"/>ECalRecurResolveTimezoneFn ()</title>
<indexterm><primary>ECalRecurResolveTimezoneFn</primary></indexterm><programlisting><link linkend="icaltimezone">icaltimezone</link>*       (*ECalRecurResolveTimezoneFn)       (const <link linkend="char">char</link> *tzid,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-recur-generate-instances" role="function"/>e_cal_recur_generate_instances ()</title>
<indexterm><primary>e_cal_recur_generate_instances</primary></indexterm><programlisting><link linkend="void">void</link>                e_cal_recur_generate_instances      (<link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="time-t">time_t</link> start,
                                                         <link linkend="time-t">time_t</link> end,
                                                         <link linkend="ECalRecurInstanceFn">ECalRecurInstanceFn</link> cb,
                                                         <link linkend="gpointer">gpointer</link> cb_data,
                                                         <link linkend="ECalRecurResolveTimezoneFn">ECalRecurResolveTimezoneFn</link> tz_cb,
                                                         <link linkend="gpointer">gpointer</link> tz_cb_data,
                                                         <link linkend="icaltimezone">icaltimezone</link> *default_timezone);</programlisting>
<para>
Calls the given callback function for each occurrence of the event that
intersects the range between the given <parameter>start</parameter> and <parameter>end</parameter> times (the end time is
not included). Note that the occurrences may start before the given start
time.
</para>
<para>
If the callback routine returns FALSE the occurrence generation stops.
</para>
<para>
Both start and end can be -1, in which case we start at the events first
instance and continue until it ends, or forever if it has no enddate.
</para>
<para>
The tz_cb is used to resolve references to timezones. It is passed a TZID
and should return the icaltimezone* corresponding to that TZID. We need to
do this as we access timezones in different ways on the client &amp; server.
</para>
<para>
The default_timezone argument is used for DTSTART or DTEND properties that
are DATE values or do not have a TZID (i.e. floating times).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>comp</parameter>&nbsp;:</term>
<listitem><simpara> A calendar component object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&nbsp;:</term>
<listitem><simpara> Range start time.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&nbsp;:</term>
<listitem><simpara> Range end time.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter>&nbsp;:</term>
<listitem><simpara> Callback function.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb_data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data for the callback function.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tz_cb</parameter>&nbsp;:</term>
<listitem><simpara> Callback for retrieving timezones.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tz_cb_data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data for the timezone callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>default_timezone</parameter>&nbsp;:</term>
<listitem><simpara> Default timezone to use when a timezone cannot be
found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
