aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/cal-backend-file.c12
-rw-r--r--calendar/pcs/cal-backend-sync.c8
-rw-r--r--calendar/pcs/cal-backend-sync.h4
-rw-r--r--calendar/pcs/cal-backend.c5
-rw-r--r--calendar/pcs/cal-backend.h4
-rw-r--r--calendar/pcs/cal.c3
6 files changed, 17 insertions, 19 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 11f611f9e5..d99b80a0b7 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1236,7 +1236,7 @@ cal_backend_file_get_free_busy (CalBackendSync *backend, Cal *cal, GList *users,
typedef struct
{
CalBackendFile *backend;
- CalObjType type;
+ icalcomponent_kind kind;
GList *deletes;
EXmlHash *ehash;
} CalBackendFileComputeChangesData;
@@ -1250,7 +1250,7 @@ cal_backend_file_compute_changes_foreach_key (const char *key, gpointer data)
CalComponent *comp;
comp = cal_component_new ();
- if (be_data->type == GNOME_Evolution_Calendar_TYPE_TODO)
+ if (be_data->kind == ICAL_VTODO_COMPONENT)
cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
else
cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
@@ -1263,7 +1263,7 @@ cal_backend_file_compute_changes_foreach_key (const char *key, gpointer data)
}
static CalBackendSyncStatus
-cal_backend_file_compute_changes (CalBackendFile *cbfile, CalObjType type, const char *change_id,
+cal_backend_file_compute_changes (CalBackendFile *cbfile, const char *change_id,
GList **adds, GList **modifies, GList **deletes)
{
CalBackendFilePrivate *priv;
@@ -1308,7 +1308,7 @@ cal_backend_file_compute_changes (CalBackendFile *cbfile, CalObjType type, const
/* Calculate deletions */
be_data.backend = cbfile;
- be_data.type = type;
+ be_data.kind = cal_backend_get_kind (CAL_BACKEND (cbfile));
be_data.deletes = NULL;
be_data.ehash = ehash;
e_xmlhash_foreach_key (ehash, (EXmlHashFunc)cal_backend_file_compute_changes_foreach_key, &be_data);
@@ -1323,7 +1323,7 @@ cal_backend_file_compute_changes (CalBackendFile *cbfile, CalObjType type, const
/* Get_changes handler for the file backend */
static CalBackendSyncStatus
-cal_backend_file_get_changes (CalBackendSync *backend, Cal *cal, CalObjType type, const char *change_id,
+cal_backend_file_get_changes (CalBackendSync *backend, Cal *cal, const char *change_id,
GList **adds, GList **modifies, GList **deletes)
{
CalBackendFile *cbfile;
@@ -1335,7 +1335,7 @@ cal_backend_file_get_changes (CalBackendSync *backend, Cal *cal, CalObjType type
g_return_val_if_fail (priv->icalcomp != NULL, GNOME_Evolution_Calendar_NoSuchCal);
g_return_val_if_fail (change_id != NULL, GNOME_Evolution_Calendar_ObjectNotFound);
- return cal_backend_file_compute_changes (cbfile, type, change_id, adds, modifies, deletes);
+ return cal_backend_file_compute_changes (cbfile, change_id, adds, modifies, deletes);
}
/* Discard_alarm handler for the file backend */
diff --git a/calendar/pcs/cal-backend-sync.c b/calendar/pcs/cal-backend-sync.c
index 9e7aec67e0..63f08171c1 100644
--- a/calendar/pcs/cal-backend-sync.c
+++ b/calendar/pcs/cal-backend-sync.c
@@ -235,14 +235,14 @@ cal_backend_sync_set_default_timezone (CalBackendSync *backend, Cal *cal, const
CalBackendSyncStatus
-cal_backend_sync_get_changes (CalBackendSync *backend, Cal *cal, CalObjType type, const char *change_id,
+cal_backend_sync_get_changes (CalBackendSync *backend, Cal *cal, const char *change_id,
GList **adds, GList **modifies, GList **deletes)
{
g_return_val_if_fail (CAL_IS_BACKEND_SYNC (backend), GNOME_Evolution_Calendar_OtherError);
g_assert (CAL_BACKEND_SYNC_GET_CLASS (backend)->get_changes_sync != NULL);
- return (* CAL_BACKEND_SYNC_GET_CLASS (backend)->get_changes_sync) (backend, cal, type, change_id,
+ return (* CAL_BACKEND_SYNC_GET_CLASS (backend)->get_changes_sync) (backend, cal, change_id,
adds, modifies, deletes);
}
@@ -484,12 +484,12 @@ _cal_backend_set_default_timezone (CalBackend *backend, Cal *cal, const char *tz
}
static void
-_cal_backend_get_changes (CalBackend *backend, Cal *cal, CalObjType type, const char *change_id)
+_cal_backend_get_changes (CalBackend *backend, Cal *cal, const char *change_id)
{
CalBackendSyncStatus status;
GList *adds = NULL, *modifies = NULL, *deletes = NULL, *l;
- status = cal_backend_sync_get_changes (CAL_BACKEND_SYNC (backend), cal, type, change_id,
+ status = cal_backend_sync_get_changes (CAL_BACKEND_SYNC (backend), cal, change_id,
&adds, &modifies, &deletes);
cal_notify_changes (cal, status, adds, modifies, deletes);
diff --git a/calendar/pcs/cal-backend-sync.h b/calendar/pcs/cal-backend-sync.h
index ead49fa4b7..3e5ac7c73c 100644
--- a/calendar/pcs/cal-backend-sync.h
+++ b/calendar/pcs/cal-backend-sync.h
@@ -59,7 +59,7 @@ struct _CalBackendSyncClass {
CalBackendSyncStatus (*add_timezone_sync) (CalBackendSync *backend, Cal *cal, const char *tzobj);
CalBackendSyncStatus (*set_default_timezone_sync) (CalBackendSync *backend, Cal *cal, const char *tzid);
- CalBackendSyncStatus (*get_changes_sync) (CalBackendSync *backend, Cal *cal, CalObjType type, const char *change_id, GList **adds, GList **modifies, GList **deletes);
+ CalBackendSyncStatus (*get_changes_sync) (CalBackendSync *backend, Cal *cal, const char *change_id, GList **adds, GList **modifies, GList **deletes);
CalBackendSyncStatus (*get_freebusy_sync) (CalBackendSync *backend, Cal *cal, GList *users, time_t start, time_t end, GList **freebusy);
/* Padding for future expansion */
@@ -138,7 +138,7 @@ CalBackendSyncStatus cal_backend_sync_get_timezone (CalBackendSync *backend, Cal
CalBackendSyncStatus cal_backend_sync_add_timezone (CalBackendSync *backend, Cal *cal, const char *tzobj);
CalBackendSyncStatus cal_backend_sync_set_default_timezone (CalBackendSync *backend, Cal *cal, const char *tzid);
-CalBackendSyncStatus cal_backend_sync_get_changes (CalBackendSync *backend, Cal *cal, CalObjType type, const char *change_id, GList **adds, GList **modifies, GList **deletes);
+CalBackendSyncStatus cal_backend_sync_get_changes (CalBackendSync *backend, Cal *cal, const char *change_id, GList **adds, GList **modifies, GList **deletes);
CalBackendSyncStatus cal_backend_sync_get_free_busy (CalBackendSync *backend, Cal *cal, GList *users, time_t start, time_t end, GList **freebusy);
G_END_DECLS
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index 3d70c192b5..7b299d80bf 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -709,7 +709,6 @@ cal_backend_get_free_busy (CalBackend *backend, Cal *cal, GList *users, time_t s
/**
* cal_backend_get_changes:
* @backend: A calendar backend
- * @type: Bitmask with types of objects to return.
* @change_id: A unique uid for the callers change list
*
* Builds a sequence of objects and the type of change that occurred on them since
@@ -718,14 +717,14 @@ cal_backend_get_free_busy (CalBackend *backend, Cal *cal, GList *users, time_t s
* Return value: A list of the objects that changed and the type of change
**/
void
-cal_backend_get_changes (CalBackend *backend, Cal *cal, CalObjType type, const char *change_id)
+cal_backend_get_changes (CalBackend *backend, Cal *cal, const char *change_id)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (IS_CAL_BACKEND (backend));
g_return_if_fail (change_id != NULL);
g_assert (CLASS (backend)->get_changes != NULL);
- (* CLASS (backend)->get_changes) (backend, cal, type, change_id);
+ (* CLASS (backend)->get_changes) (backend, cal, change_id);
}
/**
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
index b33a2c32a0..7fa209cdec 100644
--- a/calendar/pcs/cal-backend.h
+++ b/calendar/pcs/cal-backend.h
@@ -101,7 +101,7 @@ struct _CalBackendClass {
void (* set_mode) (CalBackend *backend, CalMode mode);
void (* get_free_busy) (CalBackend *backend, Cal *cal, GList *users, time_t start, time_t end);
- void (* get_changes) (CalBackend *backend, Cal *cal, CalObjType type, const char *change_id);
+ void (* get_changes) (CalBackend *backend, Cal *cal, const char *change_id);
/* Internal methods for use only in the pcs */
icaltimezone *(* internal_get_default_timezone) (CalBackend *backend);
@@ -152,7 +152,7 @@ void cal_backend_get_timezone (CalBackend *backend, Cal *cal, const char *tzid);
void cal_backend_add_timezone (CalBackend *backend, Cal *cal, const char *object);
void cal_backend_set_default_timezone (CalBackend *backend, Cal *cal, const char *tzid);
-void cal_backend_get_changes (CalBackend *backend, Cal *cal, CalObjType type, const char *change_id);
+void cal_backend_get_changes (CalBackend *backend, Cal *cal, const char *change_id);
void cal_backend_get_free_busy (CalBackend *backend, Cal *cal, GList *users, time_t start, time_t end);
icaltimezone* cal_backend_internal_get_default_timezone (CalBackend *backend);
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index 2651f0898e..deaf44ec92 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -221,7 +221,6 @@ impl_Cal_getObjectList (PortableServer_Servant servant,
/* Cal::getChanges method */
static void
impl_Cal_getChanges (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjType type,
const CORBA_char *change_id,
CORBA_Environment *ev)
{
@@ -231,7 +230,7 @@ impl_Cal_getChanges (PortableServer_Servant servant,
cal = CAL (bonobo_object_from_servant (servant));
priv = cal->priv;
- cal_backend_get_changes (priv->backend, cal, type, change_id);
+ cal_backend_get_changes (priv->backend, cal, change_id);
}
/* Cal::getFreeBusy method */