aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client-multi.h
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-09-19 04:16:39 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-09-19 04:16:39 +0800
commit2b78b5294a6a047a971446595c9e7f5f32f583a2 (patch)
tree6b74cd7376bb1ab8024871a5e2b059d669ebf6d8 /calendar/cal-client/cal-client-multi.h
parent3e079da9b69b8f5c47c79bcbb269ac17cc094c6e (diff)
downloadgsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar.gz
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar.bz2
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar.lz
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar.xz
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.tar.zst
gsoc2013-evolution-2b78b5294a6a047a971446595c9e7f5f32f583a2.zip
new class for managing multiple calendars, with an API very similar to the
2001-09-18 Rodrigo Moya <rodrigo@ximian.com> * cal-client/cal-client-multi.[ch]: new class for managing multiple calendars, with an API very similar to the CalClient one, for ease of transition from one to the other * gui/component-factory.c (xfer_folder, remove_folder, create_folder): reworked to be able to manage folders for any calendar backend, and not only the file: one 2001-09-18 Rodrigo Moya <rodrigo@ximian.com> * idl/evolution-calendar.idl: changed signature for the getFreeBusy method, to return a sequence of CalObj's, and added sequence of users as a new parameter to that method * cal-client/cal-client.c (cal_client_get_free_busy): adapted to new IDL method signature, by adding a new "GList *users" parameter, for callers to be able to specify a list of users * pcs/cal-backend.[ch] (cal_backend_get_free_busy): * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): add the "GList *users" parameter. In cal_backend_file_get_free_busy, call lookup_component to get the CalComponent for each uid, instead of calling cal_backend_get_object, which meant converting the component to a string and then parsing it again. * cal-client/client-test.c (cal_opened_cb): * gui/e-itip-control.c (send_freebusy): * gui/calendar-commands.c (publish_freebusy_cmd): adapted to new getFreeBusy method signature svn path=/trunk/; revision=12951
Diffstat (limited to 'calendar/cal-client/cal-client-multi.h')
-rw-r--r--calendar/cal-client/cal-client-multi.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/calendar/cal-client/cal-client-multi.h b/calendar/cal-client/cal-client-multi.h
new file mode 100644
index 0000000000..0b7eec40e4
--- /dev/null
+++ b/calendar/cal-client/cal-client-multi.h
@@ -0,0 +1,105 @@
+/* Evolution calendar client
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * Author: Rodrigo Moya <rodrigo@ximian.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CAL_CLIENT_MULTI_H
+#define CAL_CLIENT_MULTI_H
+
+#include <cal-client/cal-client.h>
+
+BEGIN_GNOME_DECLS
+
+#define CAL_CLIENT_MULTI_TYPE (cal_client_multi_get_type ())
+#define CAL_CLIENT_MULTI(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_MULTI_TYPE, CalClientMulti))
+#define CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_MULTI_TYPE, CalClientMultiClass))
+#define IS_CAL_CLIENT_MULTI(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_MULTI_TYPE))
+#define IS_CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_MULTI_TYPE))
+
+typedef struct _CalClientMulti CalClientMulti;
+typedef struct _CalClientMultiClass CalClientMultiClass;
+typedef struct _CalClientMultiPrivate CalClientMultiPrivate;
+
+struct _CalClientMulti {
+ GtkObject object;
+
+ /* Private data */
+ CalClientMultiPrivate *priv;
+};
+
+struct _CalClientMultiClass {
+ GtkObjectClass parent_class;
+
+ /* notification signals */
+ void (* cal_opened) (CalClientMulti *multi, CalClient *client, CalClientOpenStatus status);
+
+ void (* obj_updated) (CalClientMulti *multi, CalClient *client, const char *uid);
+ void (* obj_removed) (CalClientMulti *multi, CalClient *client, const char *uid);
+
+ void (* categories_changed) (CalClientMulti *multi, CalClient *client, GPtrArray *categories);
+
+ void (* forget_password) (CalClientMulti *multi, CalClient *client, const char *key);
+};
+
+GtkType cal_client_multi_get_type (void);
+
+CalClientMulti *cal_client_multi_new (void);
+
+void cal_client_multi_add_client (CalClientMulti *multi, CalClient *client);
+void cal_client_multi_set_auth_func (CalClientMulti *multi,
+ CalClientAuthFunc func,
+ gpointer user_data);
+
+CalClient *cal_client_multi_open_calendar (CalClientMulti *multi,
+ const char *str_uri,
+ gboolean only_if_exists);
+CalClient *cal_client_multi_get_client_for_uri (CalClientMulti *multi,
+ const char *uri);
+
+int cal_client_multi_get_n_objects (CalClientMulti *multi, CalObjType type);
+CalClientGetStatus cal_client_multi_get_object (CalClientMulti *multi,
+ const char *uid,
+ CalComponent **comp);
+CalClientGetStatus cal_client_multi_get_timezone (CalClientMulti *multi,
+ const char *tzid,
+ icaltimezone **zone);
+GList *cal_client_multi_get_uids (CalClientMulti *multi, CalObjType type);
+GList *cal_client_multi_get_changes (CalClientMulti *multi,
+ CalObjType type,
+ const char *change_id);
+GList *cal_client_multi_get_objects_in_range (CalClientMulti *multi,
+ CalObjType type,
+ time_t start,
+ time_t end);
+GList *cal_client_multi_get_free_busy (CalClientMulti *multi,
+ GList *users,
+ time_t start,
+ time_t end);
+void cal_client_multi_generate_instances (CalClientMulti *multi,
+ CalObjType type,
+ time_t start,
+ time_t end,
+ CalRecurInstanceFn cb,
+ gpointer cb_data);
+GSList *cal_client_multi_get_alarms_in_range (CalClientMulti *multi,
+ time_t start, time_t end);
+
+END_GNOME_DECLS
+
+#endif