diff options
author | Dan Winship <danw@src.gnome.org> | 2003-10-24 23:00:11 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-10-24 23:00:11 +0800 |
commit | 56d094b8c063fa7edf5a91f8ca14afec59bdb12c (patch) | |
tree | 6e43299f718911f28b64bb7f09ba3d7cbcdb5851 /calendar | |
parent | 53f60e8802c75c9272cccc46f316f1fd47ef44b0 (diff) | |
download | gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar.gz gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar.bz2 gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar.lz gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar.xz gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.tar.zst gsoc2013-evolution-56d094b8c063fa7edf5a91f8ca14afec59bdb12c.zip |
Remove type arg
* cal-client/cal-client.c (cal_client_get_changes): Remove type arg
* conduits/calendar/calendar-conduit.c (pre_sync, post_sync):
Update for that
* conduits/todo/todo-conduit.c (pre_sync, post_sync): Likewise
* idl/evolution-calendar.idl (getChanges): Remove type arg.
* pcs/cal.c (impl_Cal_getChanges): Likewise
* pcs/cal-backend.c (cal_backend_get_changes): Likewise
* pcs/cal-backend-sync.c (cal_backend_sync_get_changes): Likewise
* pcs/cal-backend-file.c (cal_backend_file_get_changes): Update
for that
svn path=/trunk/; revision=23059
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 20 | ||||
-rw-r--r-- | calendar/cal-client/cal-client.c | 4 | ||||
-rw-r--r-- | calendar/cal-client/cal-client.h | 2 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 4 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 4 | ||||
-rw-r--r-- | calendar/idl/evolution-calendar.idl | 4 | ||||
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 12 | ||||
-rw-r--r-- | calendar/pcs/cal-backend-sync.c | 8 | ||||
-rw-r--r-- | calendar/pcs/cal-backend-sync.h | 4 | ||||
-rw-r--r-- | calendar/pcs/cal-backend.c | 5 | ||||
-rw-r--r-- | calendar/pcs/cal-backend.h | 4 | ||||
-rw-r--r-- | calendar/pcs/cal.c | 3 |
12 files changed, 46 insertions, 28 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index accca887e4..ecf7de001c 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,23 @@ +2003-10-24 Dan Winship <danw@ximian.com> + + * cal-client/cal-client.c (cal_client_get_changes): Remove type arg + + * conduits/calendar/calendar-conduit.c (pre_sync, post_sync): + Update for that + + * conduits/todo/todo-conduit.c (pre_sync, post_sync): Likewise + + * idl/evolution-calendar.idl (getChanges): Remove type arg. + + * pcs/cal.c (impl_Cal_getChanges): Likewise + + * pcs/cal-backend.c (cal_backend_get_changes): Likewise + + * pcs/cal-backend-sync.c (cal_backend_sync_get_changes): Likewise + + * pcs/cal-backend-file.c (cal_backend_file_get_changes): Update + for that + 2003-10-24 Rodrigo Moya <rodrigo@ximian.com> * cal-util/cal-util.[ch] (cal_util_construct_instance, diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index 91242a20c5..f69567b90e 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -2240,7 +2240,7 @@ cal_client_resolve_tzid_cb (const char *tzid, gpointer data) } gboolean -cal_client_get_changes (CalClient *client, CalObjType type, const char *change_id, GList **changes, GError **error) +cal_client_get_changes (CalClient *client, const char *change_id, GList **changes, GError **error) { CORBA_Environment ev; ECalendarOp *our_op; @@ -2270,7 +2270,7 @@ cal_client_get_changes (CalClient *client, CalObjType type, const char *change_i CORBA_exception_init (&ev); - GNOME_Evolution_Calendar_Cal_getChanges (client->priv->cal, type, change_id, &ev); + GNOME_Evolution_Calendar_Cal_getChanges (client->priv->cal, change_id, &ev); if (BONOBO_EX (&ev)) { e_calendar_remove_op (client, our_op); diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h index 277522f097..9491c73fa3 100644 --- a/calendar/cal-client/cal-client.h +++ b/calendar/cal-client/cal-client.h @@ -155,7 +155,7 @@ gboolean cal_client_get_object (CalClient *client, icalcomponent **icalcomp, GError **error); -gboolean cal_client_get_changes (CalClient *client, CalObjType type, const char *change_id, GList **changes, GError **error); +gboolean cal_client_get_changes (CalClient *client, const char *change_id, GList **changes, GError **error); gboolean cal_client_get_object_list (CalClient *client, const char *query, GList **objects, GError **error); gboolean cal_client_get_object_list_as_comp (CalClient *client, const char *query, GList **objects, GError **error); diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 05ddde2c7f..7a30262e6c 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -1392,7 +1392,7 @@ pre_sync (GnomePilotConduit *conduit, /* Find the added, modified and deleted items */ change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id); - if (!cal_client_get_changes (ctxt->client, CALOBJ_TYPE_EVENT, change_id, &ctxt->changed, NULL)) + if (!cal_client_get_changes (ctxt->client, change_id, &ctxt->changed, NULL)) return -1; ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal); g_free (change_id); @@ -1501,7 +1501,7 @@ post_sync (GnomePilotConduit *conduit, * a race condition if anyone changes a record elsewhere during sycnc */ change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id); - if (cal_client_get_changes (ctxt->client, CALOBJ_TYPE_EVENT, change_id, &changed, NULL)) + if (cal_client_get_changes (ctxt->client, change_id, &changed, NULL)) cal_client_change_list_free (changed); g_free (change_id); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 35251f4eb6..df69cdd088 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -930,7 +930,7 @@ pre_sync (GnomePilotConduit *conduit, /* Count and hash the changes */ change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id); - if (!cal_client_get_changes (ctxt->client, CALOBJ_TYPE_TODO, change_id, &ctxt->changed, NULL)) + if (!cal_client_get_changes (ctxt->client, change_id, &ctxt->changed, NULL)) return -1; ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal); g_free (change_id); @@ -1011,7 +1011,7 @@ post_sync (GnomePilotConduit *conduit, * a race condition if anyone changes a record elsewhere during sycnc */ change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id); - if (cal_client_get_changes (ctxt->client, CALOBJ_TYPE_TODO, change_id, &changed, NULL)) + if (cal_client_get_changes (ctxt->client, change_id, &changed, NULL)) cal_client_change_list_free (changed); g_free (change_id); diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl index 1b139fc6f5..8d0d344b5a 100644 --- a/calendar/idl/evolution-calendar.idl +++ b/calendar/idl/evolution-calendar.idl @@ -180,8 +180,8 @@ module Calendar { /* The timezone used to resolve DATE and floating DATE-TIME values. */ oneway void setDefaultTimezone (in CalTimezoneObjUID tzid); - /* Gets a list of components that changed based on object type */ - oneway void getChanges (in CalObjType type, in string change_id); + /* Gets a list of components that changed */ + oneway void getChanges (in string change_id); /* Returns free/busy objects for the given interval */ oneway void getFreeBusy (in UserList users, in Time_t start, in Time_t end); 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 */ |