ECalBackendSExp
3
LIBEDATA-CAL Library

# ECalBackendSExp

Regular expressions for calendar searches.

## Synopsis

    ECalBackendSExp*    e_cal_backend_sexp_new              (const char *text);
    const char*         e_cal_backend_sexp_text             (ECalBackendSExp *sexp);
    gboolean            e_cal_backend_sexp_match_object     (ECalBackendSExp *sexp,
                                                             const char *object,
                                                             ECalBackend *backend);
    gboolean            e_cal_backend_sexp_match_comp       (ECalBackendSExp *sexp,
                                                             ECalComponent *comp,
                                                             ECalBackend *backend);
    ESExpResult*        e_cal_backend_sexp_func_time_now    (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);
    ESExpResult*        e_cal_backend_sexp_func_make_time   (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);
    ESExpResult*        e_cal_backend_sexp_func_time_add_day
                                                            (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);
    ESExpResult*        e_cal_backend_sexp_func_time_day_begin
                                                            (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);
    ESExpResult*        e_cal_backend_sexp_func_time_day_end
                                                            (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);

## Description

## Details

### e_cal_backend_sexp_new ()

    ECalBackendSExp*    e_cal_backend_sexp_new              (const char *text);

`text` :

Returns :

### e_cal_backend_sexp_text ()

    const char*         e_cal_backend_sexp_text             (ECalBackendSExp *sexp);

Retrieve the text expression for the given ECalBackendSExp object.

`sexp` :

  An ECalBackendSExp object.

Returns :

  The text expression.

### e_cal_backend_sexp_match_object ()

    gboolean            e_cal_backend_sexp_match_object     (ECalBackendSExp *sexp,
                                                             const char *object,
                                                             ECalBackend *backend);

Match an iCalendar expression against the expression.

`sexp` :

  An ESExp object.

`object` :

  An iCalendar string.

`backend` :

  A backend.

Returns :

  TRUE if the object matches the expression, FALSE if not.

### e_cal_backend_sexp_match_comp ()

    gboolean            e_cal_backend_sexp_match_comp       (ECalBackendSExp *sexp,
                                                             ECalComponent *comp,
                                                             ECalBackend *backend);

Matches the given ECalComponent against the expression.

`sexp` :

  An ESExp object.

`comp` :

  Component to match against the expression.

`backend` :

  Backend.

Returns :

  TRUE if the component matched the expression, FALSE if not.

### e_cal_backend_sexp_func_time_now ()

    ESExpResult*        e_cal_backend_sexp_func_time_now    (ESExp *esexp,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);

Processes the (time-now) sexp expression.

`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,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *data);

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

Constructs a time_t value for the specified date.

`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,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *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.

`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,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *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.

`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,
                                                             int argc,
                                                             ESExpResult **argv,
                                                             void *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.

`esexp` :

  An ESExp object.

`argc` :

  Number of arguments.

`argv` :

  The arguments.

`data` :

  Closure data.

Returns :

  The result of the function.