1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * cal-backend-card-sexp.h
4 * Copyright 2000, 2001, Ximian, Inc.
7 * Chris Lahey <clahey@ximian.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License, version 2, as published by the Free Software Foundation.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 #ifndef __E_CAL_BACKEND_SEXP_H__
25 #define __E_CAL_BACKEND_SEXP_H__
28 #include <glib-object.h>
29 #include <libecal/e-cal-component.h>
30 #include <libedata-cal/e-cal-backend.h>
31 #include "libedataserver/e-sexp.h"
35 #define E_TYPE_CAL_BACKEND_SEXP (e_cal_backend_sexp_get_type ())
36 #define E_CAL_BACKEND_SEXP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CAL_BACKEND_SEXP, ECalBackendSExp))
37 #define E_CAL_BACKEND_SEXP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_CAL_BACKEND_TYPE, ECalBackendSExpClass))
38 #define E_IS_CAL_BACKEND_SEXP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CAL_BACKEND_SEXP))
39 #define E_IS_CAL_BACKEND_SEXP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CAL_BACKEND_SEXP))
40 #define E_CAL_BACKEND_SEXP_GET_CLASS(k) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CAL_BACKEND_SEXP, CALBackendSExpClass))
42 typedef struct _ECalBackendSExpPrivate ECalBackendSExpPrivate;
44 struct _ECalBackendSExp {
45 GObject parent_object;
47 ECalBackendSExpPrivate *priv;
50 struct _ECalBackendSExpClass {
51 GObjectClass parent_class;
54 GType e_cal_backend_sexp_get_type (void);
56 ECalBackendSExp *e_cal_backend_sexp_new (const char *text);
57 const char *e_cal_backend_sexp_text (ECalBackendSExp *sexp);
59 gboolean e_cal_backend_sexp_match_object (ECalBackendSExp *sexp,
61 ECalBackend *backend);
62 gboolean e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp,
64 ECalBackend *backend);
67 /* Default implementations of time functions for use by subclasses */
69 ESExpResult *e_cal_backend_sexp_func_time_now (ESExp *esexp, int argc, ESExpResult **argv, void *data);
70 ESExpResult *e_cal_backend_sexp_func_make_time (ESExp *esexp, int argc, ESExpResult **argv, void *data);
71 ESExpResult *e_cal_backend_sexp_func_time_add_day (ESExp *esexp, int argc, ESExpResult **argv, void *data);
72 ESExpResult *e_cal_backend_sexp_func_time_day_begin (ESExp *esexp, int argc, ESExpResult **argv, void *data);
73 ESExpResult *e_cal_backend_sexp_func_time_day_end (ESExp *esexp, int argc, ESExpResult **argv, void *data);
78 #endif /* __E_CAL_BACKEND_SEXP_H__ */