1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 4 * 5 * This library is free software: you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This library is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * Authors: Chris Lahey <clahey@ximian.com> 18 */ 19 20 #if !defined (__LIBEDATA_CAL_H_INSIDE__) && !defined (LIBEDATA_CAL_COMPILATION) 21 #error "Only <libedata-cal/libedata-cal.h> should be included directly." 22 #endif 23 24 #ifndef E_CAL_BACKEND_SEXP_H 25 #define E_CAL_BACKEND_SEXP_H 26 27 #include <libecal/libecal.h> 28 29 /* Standard GObject macros */ 30 #define E_TYPE_CAL_BACKEND_SEXP \ 31 (e_cal_backend_sexp_get_type ()) 32 #define E_CAL_BACKEND_SEXP(obj) \ 33 (G_TYPE_CHECK_INSTANCE_CAST \ 34 ((obj), E_TYPE_CAL_BACKEND_SEXP, ECalBackendSExp)) 35 #define E_CAL_BACKEND_SEXP_CLASS(cls) \ 36 (G_TYPE_CHECK_CLASS_CAST \ 37 ((cls), E_TYPE_CAL_BACKEND_SEXP, ECalBackendSExpClass)) 38 #define E_IS_CAL_BACKEND_SEXP(obj) \ 39 (G_TYPE_CHECK_INSTANCE_TYPE \ 40 ((obj), E_TYPE_CAL_BACKEND_SEXP)) 41 #define E_IS_CAL_BACKEND_SEXP_CLASS(cls) \ 42 (G_TYPE_CHECK_CLASS_TYPE \ 43 ((cls), E_TYPE_CAL_BACKEND_SEXP)) 44 #define E_CAL_BACKEND_SEXP_GET_CLASS(cls) \ 45 (G_TYPE_INSTANCE_GET_CLASS \ 46 ((obj), E_TYPE_CAL_BACKEND_SEXP, CALBackendSExpClass)) 47 48 G_BEGIN_DECLS 49 50 typedef struct _ECalBackendSExp ECalBackendSExp; 51 typedef struct _ECalBackendSExpClass ECalBackendSExpClass; 52 typedef struct _ECalBackendSExpPrivate ECalBackendSExpPrivate; 53 54 /** 55 * ECalBackendSexp: 56 * 57 * Contains only private data that should be read and manipulated using the 58 * functions below. 59 */ 60 struct _ECalBackendSExp { 61 /*< private >*/ 62 GObject parent; 63 ECalBackendSExpPrivate *priv; 64 }; 65 66 /** 67 * ECalBackendSexpClass: 68 * 69 * Class structure for the #ECalBackendSexp class. 70 */ 71 struct _ECalBackendSExpClass { 72 /*< private >*/ 73 GObjectClass parent_class; 74 }; 75 76 GType e_cal_backend_sexp_get_type (void) G_GNUC_CONST; 77 ECalBackendSExp * 78 e_cal_backend_sexp_new (const gchar *text); 79 const gchar * e_cal_backend_sexp_text (ECalBackendSExp *sexp); 80 81 gboolean e_cal_backend_sexp_match_object (ECalBackendSExp *sexp, 82 const gchar *object, 83 ETimezoneCache *cache); 84 gboolean e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp, 85 ECalComponent *comp, 86 ETimezoneCache *cache); 87 void e_cal_backend_sexp_lock (ECalBackendSExp *sexp); 88 void e_cal_backend_sexp_unlock (ECalBackendSExp *sexp); 89 90 /* Default implementations of time functions for use by subclasses */ 91 92 ESExpResult * e_cal_backend_sexp_func_time_now 93 (ESExp *esexp, 94 gint argc, 95 ESExpResult **argv, 96 gpointer data); 97 ESExpResult * e_cal_backend_sexp_func_make_time 98 (ESExp *esexp, 99 gint argc, 100 ESExpResult **argv, 101 gpointer data); 102 ESExpResult * e_cal_backend_sexp_func_time_add_day 103 (ESExp *esexp, 104 gint argc, 105 ESExpResult **argv, 106 gpointer data); 107 ESExpResult * e_cal_backend_sexp_func_time_day_begin 108 (ESExp *esexp, 109 gint argc, 110 ESExpResult **argv, 111 gpointer data); 112 ESExpResult * e_cal_backend_sexp_func_time_day_end 113 (ESExp *esexp, 114 gint argc, 115 ESExpResult **argv, 116 gpointer data); 117 gboolean e_cal_backend_sexp_evaluate_occur_times 118 (ECalBackendSExp *sexp, 119 time_t *start, 120 time_t *end); 121 122 G_END_DECLS 123 124 #endif /* E_CAL_BACKEND_SEXP_H */ 125