## ECalBackendSExp ECalBackendSExp — A utility for comparing ECalComponents with search expressions. |

## Functions

ECalBackendSExp * | e_cal_backend_sexp_new ()
const gchar * | e_cal_backend_sexp_text ()
gboolean | e_cal_backend_sexp_match_object ()
gboolean | e_cal_backend_sexp_match_comp ()
ESExpResult * | e_cal_backend_sexp_func_time_now ()
ESExpResult * | e_cal_backend_sexp_func_make_time ()
ESExpResult * | e_cal_backend_sexp_func_time_add_day ()
ESExpResult * | e_cal_backend_sexp_func_time_day_begin ()
ESExpResult * | e_cal_backend_sexp_func_time_day_end ()
gboolean | e_cal_backend_sexp_evaluate_occur_times ()

## Types and Values

struct | ECalBackendSExp
struct | ECalBackendSExpClass

## Includes

    #include <libedata-cal/libedata-cal.h>

## Description

This API is an all purpose utility for comparing ECalComponents with search expressions and is used by various backends to implement component filtering and searching.

## Functions

### e_cal_backend_sexp_new ()

    ECalBackendSExp *
    e_cal_backend_sexp_new (const gchar *text);

### e_cal_backend_sexp_text ()

    const gchar *
    e_cal_backend_sexp_text (ECalBackendSExp *sexp);

Retrieve the text expression for the given ECalBackendSExp object.

#### Parameters

sexp | An ECalBackendSExp object. |

#### Returns

the text expression

### e_cal_backend_sexp_match_object ()

    gboolean
    e_cal_backend_sexp_match_object (ECalBackendSExp *sexp,
                                     const gchar *object,
                                     ETimezoneCache *cache);

Checks if `object` matches `sexp` .

#### Parameters

sexp | An ESExp object. |
object | An iCalendar string. |
cache | an ETimezoneCache |

#### Returns

`TRUE` if the object matches, `FALSE` otherwise

### e_cal_backend_sexp_match_comp ()

    gboolean
    e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp,
                                   ECalComponent *comp,
                                   ETimezoneCache *cache);

Checks if `comp` matches `sexp` .

#### Parameters

sexp | An ESExp object. |
comp | Component to match against the expression. |
cache | an ETimezoneCache |

#### Returns

`TRUE` if the component matches, `FALSE` otherwise

### e_cal_backend_sexp_func_time_now ()

    ESExpResult *
    e_cal_backend_sexp_func_time_now (ESExp *esexp,
                                      gint argc,
                                      ESExpResult **argv,
                                      gpointer data);

Processes the (time-now) sexp expression.

#### Parameters

esexp | An ESExp object. |
argc | Number of arguments. |
argv | The arguments. |
data | Closure data. |

#### Returns

The result of the function.

### e_cal_backend_sexp_func_make_time ()

    ESExpResult *
    e_cal_backend_sexp_func_make_time (ESExp *esexp,
                                       gint argc,
                                       ESExpResult **argv,
                                       gpointer data);

(make-time ISODATE) ISODATE - string, ISO 8601 date/time representation

Constructs a time_t value for the specified date.

#### Parameters

esexp | An ESExp object. |
argc | Number of arguments. |
argv | The arguments. |
data | Closure data. |

#### Returns

The result of the function.

### e_cal_backend_sexp_func_time_add_day ()

    ESExpResult *
    e_cal_backend_sexp_func_time_add_day (ESExp *esexp,
                                          gint argc,
                                          ESExpResult **argv,
                                          gpointer data);

(time-add-day TIME N) TIME - time_t, base time N - int, number of days to add

Adds the specified number of days to a time value.

FIXME: TIMEZONES - need to use a timezone or daylight saving changes will make the result incorrect.

#### Parameters

esexp | An ESExp object. |
argc | Number of arguments. |
argv | The arguments. |
data | Closure data. |

#### Returns

The result of the function.

### e_cal_backend_sexp_func_time_day_begin ()

    ESExpResult *
    e_cal_backend_sexp_func_time_day_begin
                                   (ESExp *esexp,
                                    gint argc,
                                    ESExpResult **argv,
                                    gpointer data);

(time-day-begin TIME) TIME - time_t, base time

Returns the start of the day, according to the local time.

FIXME: TIMEZONES - this uses the current Unix timezone.

#### Parameters

esexp | An ESExp object. |
argc | Number of arguments. |
argv | The arguments. |
data | Closure data. |

#### Returns

The result of the function.

### e_cal_backend_sexp_func_time_day_end ()

    ESExpResult *
    e_cal_backend_sexp_func_time_day_end (ESExp *esexp,
                                          gint argc,
                                          ESExpResult **argv,
                                          gpointer data);

(time-day-end TIME) TIME - time_t, base time

Returns the end of the day, according to the local time.

FIXME: TIMEZONES - this uses the current Unix timezone.

#### Parameters

esexp | An ESExp object. |
argc | Number of arguments. |
argv | The arguments. |
data | Closure data. |

#### Returns

The result of the function.

### e_cal_backend_sexp_evaluate_occur_times ()

    gboolean
    e_cal_backend_sexp_evaluate_occur_times
                                   (ECalBackendSExp *sexp,
                                    time_t *start,
                                    time_t *end);

Determines biggest time window given by expressions "occur-in-range" in sexp.

#### Parameters

sexp | An ESExp object. |
start | Start of the time window will be stored here. |
end | End of the time window will be stored here. |

Since 2.32

## Types and Values

### struct ECalBackendSExp

    struct ECalBackendSExp {
    };

### struct ECalBackendSExpClass

    struct ECalBackendSExpClass {
    };