aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r--calendar/pcs/cal-backend.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index e0dd3a713b..95dc9957e6 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -143,6 +143,7 @@ cal_backend_class_init (CalBackendClass *class)
class->get_uri = NULL;
class->open = NULL;
class->is_loaded = NULL;
+ class->get_query = NULL;
class->get_mode = NULL;
class->set_mode = NULL;
class->get_n_objects = NULL;
@@ -297,6 +298,32 @@ cal_backend_is_loaded (CalBackend *backend)
}
/**
+ * cal_backend_get_query:
+ * @backend: A calendar backend.
+ * @ql: The query listener.
+ * @sexp: Search expression.
+ *
+ * Create a query object for this backend.
+ */
+Query *
+cal_backend_get_query (CalBackend *backend,
+ GNOME_Evolution_Calendar_QueryListener ql,
+ const char *sexp)
+{
+ Query *result;
+
+ g_return_val_if_fail (backend != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE);
+
+ if (CLASS (backend)->get_query != NULL)
+ result = (* CLASS (backend)->get_query) (backend, ql, sexp);
+ else
+ result = query_new (backend, ql, sexp);
+
+ return result;
+}
+
+/**
* cal_backend_get_mode:
* @backend: A calendar backend.
*