Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / calendar / libedata-cal / e-cal-backend-sexp.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * cal-backend-card-sexp.h
4  * Copyright 2000, 2001, Ximian, Inc.
5  *
6  * Authors:
7  *   Chris Lahey <clahey@ximian.com>
8  *
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.
12  *
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.
17  *
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
21  * 02110-1301, USA.
22  */
23
24 #ifndef __E_CAL_BACKEND_SEXP_H__
25 #define __E_CAL_BACKEND_SEXP_H__
26
27 #include <glib.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"
32
33 G_BEGIN_DECLS
34
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))
41
42 typedef struct _ECalBackendSExpPrivate ECalBackendSExpPrivate;
43
44 struct _ECalBackendSExp {
45         GObject parent_object;
46
47         ECalBackendSExpPrivate *priv;
48 };
49
50 struct _ECalBackendSExpClass {
51         GObjectClass parent_class;
52 };
53
54 GType            e_cal_backend_sexp_get_type     (void);
55
56 ECalBackendSExp *e_cal_backend_sexp_new          (const char      *text);
57 const char      *e_cal_backend_sexp_text         (ECalBackendSExp *sexp);
58
59 gboolean         e_cal_backend_sexp_match_object (ECalBackendSExp *sexp,
60                                                   const char      *object,
61                                                   ECalBackend     *backend);
62 gboolean         e_cal_backend_sexp_match_comp   (ECalBackendSExp *sexp,
63                                                   ECalComponent   *comp,
64                                                   ECalBackend     *backend);
65
66
67 /* Default implementations of time functions for use by subclasses */
68
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);
74
75
76 G_END_DECLS
77
78 #endif /* __E_CAL_BACKEND_SEXP_H__ */