From 58b5fd92fc9f5419beabe82d38622aba064cc56e Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 19 Sep 2000 22:48:47 +0000 Subject: Add some other cases where a slow sync is in order (pre_sync): Pre load 2000-09-19 JP Rosevear * conduits/todo/todo-conduit.c (check_for_slow_setting): Add some other cases where a slow sync is in order (pre_sync): Pre load the uids, the map and the add/mod/del lists (match_record): Use the map hash to match records (iterate): Iterate using the pre-loaded uid list (iterate_specific): Iterate using the add/mod/del lists (purge): Delete all entries in the del list (set_status): Set status by adding to an appropriate list (set_pilot_id): Set pilot_id by updating map hash * conduits/todo/todo-conduit.h: Add lists for added, modified and deleted objects * conduits/todo/todo-conduit.c (map_name): Get the pilot_id->uid map file name (map_sax_start_element): SAX handler to extract a pilot_id->uid mapping (map_sax_parse): Parse the given file and build a pilot_id->uid hash (map_write_foreach): Write out individual mapping elements (map_write): Write out the pilot_id->uid mapping (start_calendar_server_cb): Rename from gnome_calendar_load_cb * conduits/todo/todo-conduit-config.h: Rename pilotID to pilot_id * conduits/todo/e-todo.conduit.in: A little renaming * conduits/todo/Makefile.am: Fix build slightly * pcs/cal.c (build_change_seq): Build a corba sequence out of a list of CalObjChanges (Cal_get_objects_in_range): Implement new corba function * pcs/cal-backend.c (cal_backend_init): Intiliaze to NULL (cal_backend_load): Track the uri so we can write the log file to the same place (cal_backend_log_name): Figure out the log filename/path based on the calendar uri (cal_backend_set_node_timet): Set an xml node property value from a time_t (cal_backend_log_entry): Adds a log entry to list waiting to be written out (cal_backend_log_sync): Syncs the log entries to disk (cal_backend_log_sax_start_element): SAX callback for reading in log entries (cal_backend_log_sax_end_element): ditto (cal_backend_log_sax_parse): Main SAX parser call to parse the log file looking for particular log entries and creating a CalObjChange hash with the last change for each object (cal_backend_get_log_entries): Returns a hash of objects of a given type changed since the given time (cal_backend_update_object): Add appropriate log entries (cal_backend_remove_object): ditto (cal_backend_get_changed_uids): Implement new idl interface call (cal_backend_foreach_changed): Convert CalObjChange hash into a list * pcs/cal-backend-imc.[hc]: Remove crufty files * pcs/cal-backend-file.c (cal_backend_file_get_type_by_uid): New function that returns the CalObjType for a uid. * cal-client/cal-client.h: Update prototypes. * cal-client/cal-client.c (build_change_list): Build a list of CalObjChange items from a corba sequence. (cal_client_get_changed_uids): New accessor method for the similarly named addition to the idl file. * cal-util/cal-util.h: Update prototypes and add CalObjChangeType enum. * cal-util/cal-util.c (cal_obj_change_list_free): New utility method to free a list of CalObjChange objects. * idl/evolution-calendar.idl: Add get_changed_uids method and associated types. svn path=/trunk/; revision=5512 --- calendar/conduits/todo/todo-conduit-config.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'calendar/conduits/todo/todo-conduit-config.h') diff --git a/calendar/conduits/todo/todo-conduit-config.h b/calendar/conduits/todo/todo-conduit-config.h index 18bb353b08..38f3cf8e39 100644 --- a/calendar/conduits/todo/todo-conduit-config.h +++ b/calendar/conduits/todo/todo-conduit-config.h @@ -33,16 +33,16 @@ typedef struct _EToDoConduitCfg EToDoConduitCfg; struct _EToDoConduitCfg { gboolean open_secret; - guint32 pilotId; + guint32 pilot_id; GnomePilotConduitSyncType sync_type; /* only used by capplet */ }; static void -todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilotId) +todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilot_id) { gchar prefix[256]; g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", - pilotId); + pilot_id); *c = g_new0 (EToDoConduitCfg,1); g_assert (*c != NULL); @@ -54,7 +54,7 @@ todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilotId) (*c)->sync_type = GnomePilotConduitSyncTypeCustom; gnome_config_pop_prefix (); - (*c)->pilotId = pilotId; + (*c)->pilot_id = pilot_id; } /* Saves the configuration data. */ @@ -64,7 +64,7 @@ todoconduit_save_configuration (EToDoConduitCfg *c) gchar prefix[256]; g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", - c->pilotId); + c->pilot_id); gnome_config_push_prefix (prefix); gnome_config_set_bool ("open_secret", c->open_secret); @@ -85,7 +85,7 @@ todoconduit_dupe_configuration (EToDoConduitCfg *c) retval = g_new0 (EToDoConduitCfg, 1); retval->sync_type = c->sync_type; retval->open_secret = c->open_secret; - retval->pilotId = c->pilotId; + retval->pilot_id = c->pilot_id; return retval; } -- cgit v1.2.3