<?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="ECalBackendSExp">
<refmeta>
<refentrytitle role="top_of_page">ECalBackendSExp</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBEDATA-CAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ECalBackendSExp</refname>
<refpurpose>Regular expressions for calendar searches.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

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

<synopsis>



                    <link linkend="ECalBackendSExpPrivate">ECalBackendSExpPrivate</link>;
<link linkend="ECalBackendSExp">ECalBackendSExp</link>*    <link linkend="e-cal-backend-sexp-new">e_cal_backend_sexp_new</link>              (const <link linkend="char">char</link> *text);
const <link linkend="char">char</link>*         <link linkend="e-cal-backend-sexp-text">e_cal_backend_sexp_text</link>             (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp);
<link linkend="gboolean">gboolean</link>            <link linkend="e-cal-backend-sexp-match-object">e_cal_backend_sexp_match_object</link>     (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp,
                                                         const <link linkend="char">char</link> *object,
                                                         <link linkend="ECalBackend">ECalBackend</link> *backend);
<link linkend="gboolean">gboolean</link>            <link linkend="e-cal-backend-sexp-match-comp">e_cal_backend_sexp_match_comp</link>       (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp,
                                                         <link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="ECalBackend">ECalBackend</link> *backend);
<link linkend="ESExpResult">ESExpResult</link>*        <link linkend="e-cal-backend-sexp-func-time-now">e_cal_backend_sexp_func_time_now</link>    (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);
<link linkend="ESExpResult">ESExpResult</link>*        <link linkend="e-cal-backend-sexp-func-make-time">e_cal_backend_sexp_func_make_time</link>   (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);
<link linkend="ESExpResult">ESExpResult</link>*        <link linkend="e-cal-backend-sexp-func-time-add-day">e_cal_backend_sexp_func_time_add_day</link>
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);
<link linkend="ESExpResult">ESExpResult</link>*        <link linkend="e-cal-backend-sexp-func-time-day-begin">e_cal_backend_sexp_func_time_day_begin</link>
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);
<link linkend="ESExpResult">ESExpResult</link>*        <link linkend="e-cal-backend-sexp-func-time-day-end">e_cal_backend_sexp_func_time_day_end</link>
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);

</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="ECalBackendSExpPrivate" role="struct"/>ECalBackendSExpPrivate</title>
<indexterm><primary>ECalBackendSExpPrivate</primary></indexterm><programlisting>typedef struct _ECalBackendSExpPrivate ECalBackendSExpPrivate;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-new" role="function"/>e_cal_backend_sexp_new ()</title>
<indexterm><primary>e_cal_backend_sexp_new</primary></indexterm><programlisting><link linkend="ECalBackendSExp">ECalBackendSExp</link>*    e_cal_backend_sexp_new              (const <link linkend="char">char</link> *text);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>text</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-backend-sexp-text" role="function"/>e_cal_backend_sexp_text ()</title>
<indexterm><primary>e_cal_backend_sexp_text</primary></indexterm><programlisting>const <link linkend="char">char</link>*         e_cal_backend_sexp_text             (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp);</programlisting>
<para>
Retrieve the text expression for the given ECalBackendSExp object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>sexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ECalBackendSExp"><type>ECalBackendSExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The text expression.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-match-object" role="function"/>e_cal_backend_sexp_match_object ()</title>
<indexterm><primary>e_cal_backend_sexp_match_object</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_cal_backend_sexp_match_object     (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp,
                                                         const <link linkend="char">char</link> *object,
                                                         <link linkend="ECalBackend">ECalBackend</link> *backend);</programlisting>
<para>
Match an iCalendar expression against the expression.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>sexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>object</parameter>&nbsp;:</term>
<listitem><simpara> An iCalendar string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>backend</parameter>&nbsp;:</term>
<listitem><simpara> A backend.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the object matches the expression, FALSE if not.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-match-comp" role="function"/>e_cal_backend_sexp_match_comp ()</title>
<indexterm><primary>e_cal_backend_sexp_match_comp</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_cal_backend_sexp_match_comp       (<link linkend="ECalBackendSExp">ECalBackendSExp</link> *sexp,
                                                         <link linkend="ECalComponent">ECalComponent</link> *comp,
                                                         <link linkend="ECalBackend">ECalBackend</link> *backend);</programlisting>
<para>
Matches the given ECalComponent against the expression.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>sexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>comp</parameter>&nbsp;:</term>
<listitem><simpara> Component to match against the expression.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>backend</parameter>&nbsp;:</term>
<listitem><simpara> Backend.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the component matched the expression, FALSE if not.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-func-time-now" role="function"/>e_cal_backend_sexp_func_time_now ()</title>
<indexterm><primary>e_cal_backend_sexp_func_time_now</primary></indexterm><programlisting><link linkend="ESExpResult">ESExpResult</link>*        e_cal_backend_sexp_func_time_now    (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
Processes the (time-now) sexp expression.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>esexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argc</parameter>&nbsp;:</term>
<listitem><simpara> Number of arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argv</parameter>&nbsp;:</term>
<listitem><simpara> The arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The result of the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-func-make-time" role="function"/>e_cal_backend_sexp_func_make_time ()</title>
<indexterm><primary>e_cal_backend_sexp_func_make_time</primary></indexterm><programlisting><link linkend="ESExpResult">ESExpResult</link>*        e_cal_backend_sexp_func_make_time   (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
(make-time ISODATE)
ISODATE - string, ISO 8601 date/time representation
</para>
<para>
Constructs a time_t value for the specified date.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>esexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argc</parameter>&nbsp;:</term>
<listitem><simpara> Number of arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argv</parameter>&nbsp;:</term>
<listitem><simpara> The arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The result of the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-func-time-add-day" role="function"/>e_cal_backend_sexp_func_time_add_day ()</title>
<indexterm><primary>e_cal_backend_sexp_func_time_add_day</primary></indexterm><programlisting><link linkend="ESExpResult">ESExpResult</link>*        e_cal_backend_sexp_func_time_add_day
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
(time-add-day TIME N)
TIME - time_t, base time
N - int, number of days to add
</para>
<para>
Adds the specified number of days to a time value.
</para>
<para>
FIXME: TIMEZONES - need to use a timezone or daylight saving changes will
make the result incorrect.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>esexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argc</parameter>&nbsp;:</term>
<listitem><simpara> Number of arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argv</parameter>&nbsp;:</term>
<listitem><simpara> The arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The result of the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-func-time-day-begin" role="function"/>e_cal_backend_sexp_func_time_day_begin ()</title>
<indexterm><primary>e_cal_backend_sexp_func_time_day_begin</primary></indexterm><programlisting><link linkend="ESExpResult">ESExpResult</link>*        e_cal_backend_sexp_func_time_day_begin
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
(time-day-begin TIME)
TIME - time_t, base time
</para>
<para>
Returns the start of the day, according to the local time.
</para>
<para>
FIXME: TIMEZONES - this uses the current Unix timezone.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>esexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argc</parameter>&nbsp;:</term>
<listitem><simpara> Number of arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argv</parameter>&nbsp;:</term>
<listitem><simpara> The arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The result of the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-cal-backend-sexp-func-time-day-end" role="function"/>e_cal_backend_sexp_func_time_day_end ()</title>
<indexterm><primary>e_cal_backend_sexp_func_time_day_end</primary></indexterm><programlisting><link linkend="ESExpResult">ESExpResult</link>*        e_cal_backend_sexp_func_time_day_end
                                                        (<link linkend="ESExp">ESExp</link> *esexp,
                                                         <link linkend="int">int</link> argc,
                                                         <link linkend="ESExpResult">ESExpResult</link> **argv,
                                                         <link linkend="void">void</link> *data);</programlisting>
<para>
(time-day-end TIME)
TIME - time_t, base time
</para>
<para>
Returns the end of the day, according to the local time.
</para>
<para>
FIXME: TIMEZONES - this uses the current Unix timezone.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>esexp</parameter>&nbsp;:</term>
<listitem><simpara> An <link linkend="ESExp"><type>ESExp</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argc</parameter>&nbsp;:</term>
<listitem><simpara> Number of arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>argv</parameter>&nbsp;:</term>
<listitem><simpara> The arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Closure data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The result of the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
