aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-09-20 06:48:47 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-09-20 06:48:47 +0800
commit58b5fd92fc9f5419beabe82d38622aba064cc56e (patch)
treea8219b9cc9b1311466f9854b0fa673045250edb1 /calendar/cal-client
parent6820bb50e53b479997ae5a9616186301c333fad8 (diff)
downloadgsoc2013-evolution-58b5fd92fc9f5419beabe82d38622aba064cc56e.tar.gz
gsoc2013-evolution-58b5fd92fc9f5419beabe82d38622aba064cc56e.tar.zst
gsoc2013-evolution-58b5fd92fc9f5419beabe82d38622aba064cc56e.zip
Add some other cases where a slow sync is in order (pre_sync): Pre load
2000-09-19 JP Rosevear <jpr@helixcode.com> * 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
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c70
-rw-r--r--calendar/cal-client/cal-client.h1
2 files changed, 71 insertions, 0 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 65c0c4aea4..7b5f248d85 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -1,3 +1,4 @@
+
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* Evolution calendar client
*
@@ -800,6 +801,75 @@ cal_client_get_uids (CalClient *client, CalObjType type)
return uids;
}
+/* Builds a GList of CalObjChange structures from the CORBA sequence */
+static GList *
+build_change_list (Evolution_Calendar_CalObjChangeSeq *seq)
+{
+ GList *list;
+ int i;
+
+ /* Create the list in reverse order */
+ list = NULL;
+ for (i = 0; i < seq->_length; i++) {
+ Evolution_Calendar_CalObjChange *corba_coc;
+ CalObjChange *coc;
+
+ corba_coc = &seq->_buffer[i];
+ coc = g_new (CalObjChange, 1);
+
+ coc->uid = g_strdup (corba_coc->uid);
+ coc->type = corba_coc->type;
+
+ list = g_list_prepend (list, coc);
+ }
+
+ list = g_list_reverse (list);
+ return list;
+}
+
+/**
+ * cal_client_get_changed_uids:
+ * @client: A calendar client.
+ * @type: Bitmask with types of objects to return.
+ *
+ * Queries a calendar for a list of unique identifiers corresponding to calendar
+ * objects whose type matches one of the types specified in the @type flags.
+ *
+ * Return value: A list of strings that are the sought UIDs.
+ **/
+GList *
+cal_client_get_changed_uids (CalClient *client, CalObjType type, time_t since)
+{
+ CalClientPrivate *priv;
+ CORBA_Environment ev;
+ Evolution_Calendar_CalObjChangeSeq *seq;
+ int t;
+ GList *changes;
+
+ g_return_val_if_fail (client != NULL, NULL);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
+
+ priv = client->priv;
+ g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, NULL);
+
+ t = corba_obj_type (type);
+ CORBA_exception_init (&ev);
+
+ seq = Evolution_Calendar_Cal_get_changed_uids (priv->cal, t, since, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_message ("cal_client_get_changed_uids(): could not get the list of changes");
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ CORBA_exception_free (&ev);
+
+ changes = build_change_list (seq);
+ CORBA_free (seq);
+
+ return changes;
+}
+
/* FIXME: Not used? */
#if 0
/* Builds a GList of CalObjInstance structures from the CORBA sequence */
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index 6747c7488e..9853c63e2c 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -101,6 +101,7 @@ void cal_client_update_pilot_id (CalClient *client, char *uid,
unsigned long pilot_status);
GList *cal_client_get_uids (CalClient *client, CalObjType type);
+GList *cal_client_get_changed_uids (CalClient *client, CalObjType type, time_t since);
GList *cal_client_get_objects_in_range (CalClient *client, CalObjType type,
time_t start, time_t end);
it/multimedia/Makefile?h=gnome-3.24&id=cdca9440c60ee4b79bb12792ac48717a47b6a6f6'>- Delete expired portpav2008-04-211-1/+0 * - Rename AtomicParsley to atomicparsley (requested by danfe)jadawin2008-04-161-1/+1 * AtomicParsley is a lightweight command line program for reading, parsing andjadawin2008-04-151-0/+1 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-241-0/+4 * A multimedia server for KiSS/Linksys media players that enables the player topav2008-03-231-0/+1 * Script that allows to change the timestamp of a Subtitle file.edwin2008-03-191-0/+1 * This video thumbnailer can be used by file managers to create thumbnailsmiwi2008-02-251-0/+1 * Smilutils is a collection of command line utilitiesrafan2008-02-241-0/+1 * dv2sub is a simple utility that extracts the date and time of recording frommiwi2008-01-231-0/+1 * Subtitle Composer supports the basic operations (text, time, andmiwi2008-01-131-0/+1 * This is the VTK MPEG2 encoder library, which has been removed from thethierry2008-01-101-0/+1 * gPodder is a GTK2 media aggregator written in Python. A user canpav2007-12-151-0/+1 * Miro, formerly known as Democray, is an internet TV platform so that watchingthierry2007-12-121-0/+1 * - Sort category Makefilessat2007-10-061-3/+3 * xfmedia remote plugin enables control of xfce4 media player via amiwi2007-09-251-0/+1 * [new port] multimedia/flv2mpeg4: Fast and less lossy FLV toedwin2007-09-251-0/+1 * [NEW PORT] multimedia/openmovieeditor: Simple non-linear movie editoredwin2007-09-231-0/+1 * As promised, remove net-im/gaim, and all dependent ports. Gaim has beenmarcus2007-09-071-1/+0 * TransKode is a KDE/Qt based frontend for varios audio transcoding tools.miwi2007-08-221-0/+1 * GMiMMS is a GTK+ frontend for MiMMS, a multimedia-stream ripper.itetcu2007-08-211-0/+1 * MMS is a program designed to allow you to download streams usingitetcu2007-08-201-0/+1 * - Add port multimedia/mencoder as slave to mplayer port.sem2007-08-071-0/+1 * Initial import of recordmydesktop 0.3.5.1kevlo2007-07-181-0/+1 * YAMDI stands for Yet Another MetaData Injector and is a metadata injectormiwi2007-07-131-0/+1 * Remove multimedia/handbrake-gtk2:mezz2007-07-051-1/+0 * Retire libdivxdecore, libdivxdecore-devel, and libdivxencore as project mayoahze2007-07-051-3/+0 * Add gstreamer-plugins-buzztardahze2007-06-251-0/+1 * DeVeDe is a program to create video DVDs and CDs (VCD, sVCD or CVD), suitablesmiwi2007-06-221-0/+1 * Readd gstreamer-plugins-x264ahze2007-06-191-0/+1 * smplayer intents to be a complete front-end for mplayer,fromrafan2007-06-181-0/+1 * smplayer intents to be a complete front-end for mplayer,fromrafan2007-06-181-0/+1 * Add smplayer-themes 0.1.1, themes for smplayer.rafan2007-06-181-0/+1 * multimedia/audacious-docklet port can be removed from the ports tree, becausepav2007-06-151-1/+0 * This wizard will create a DVD with fully animated menumiwi2007-06-061-0/+1 * 2007-06-01 multimedia/snd-music-duplicates: Development has been ceased, succ...miwi2007-06-051-1/+0 * - Retire gstreamer 0.8.0ahze2007-06-021-18/+0 * Add x264-gtkahze2007-06-011-0/+1 * Add ruby-flvtool2 1.0.6, manipulation tool for Macromedia Flash Videoclsung2007-05-291-0/+1 * Remove ffmpeg-develahze2007-05-261-1/+0 * - Rename libdts to libdca and update to 0.0.5pav2007-05-021-1/+1 * Add gnome-subtitles:tmclaugh2007-04-151-0/+1 * 2007-03-27 emulators/kmamerun: Project was abandoned 4 years ago and expects ...miwi2007-04-111-1/+0 * libspiff is a parser library for the XSPF file format. XSPF is anlx2007-03-201-0/+1 * Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOMEmarcus2007-03-191-1/+1 * A KDE program to simply create your own slideshowmiwi2007-03-161-0/+1 * Add manencode , utility to simply transcode your videos.clsung2007-03-061-0/+1 * Systemtray plugin for audacious media player.miwi2007-02-281-0/+1 * New port for getting Australian TV listings.grog2007-02-271-0/+1 * Add gstreamer-plugins-fluendo-mpegdemuxahze2007-02-261-0/+1 * Add mandvd , utility to simply create dvd-video.rafan2007-02-161-0/+1 * clive is a command line program that extracts videos from YouTube andnivit2007-02-121-0/+1 * mp4box is a mp4 container merge tool from gpac.gabor2007-02-061-0/+1 * link the two drivers to the buildluigi2007-02-031-0/+2 * Add port multimedia/lives:sat2007-01-261-0/+1 * Add port multimedia/gaupol:sat2007-01-221-0/+1 * Hook into build.grog2007-01-171-0/+1 * Actually remove any2dvd to pacify portsmon.linimon2007-01-121-1/+0 * Add port multimedia/subtitleeditor:sat2007-01-081-0/+1 * 2006-12-01 net/citadel: http://www.FreeBSD.org/ports/portaudit/4c005a5e-2541-...miwi2007-01-061-1/+0 * 2006-12-01 multimedia/bsdav: does not work. We need to import bktv patches fr...miwi2007-01-061-2/+0 * - Update to 0.16.0.mezz2007-01-021-1/+0 * This software converts a .TiVo file (produced by the TiVoToGo functionalityitetcu2007-01-021-0/+1 * - add iso2mkv 0.8.3alexbl2007-01-011-0/+1 * Babbler is a simple media player.dinoex2006-12-301-0/+1 * New port to create multimedia DVDs.grog2006-12-291-0/+1 * MultimediaKit provides common backend engine to play multimedia stream.dinoex2006-12-231-0/+1 * Revive gstreamer-plugins-mpeg2encahze2006-12-231-0/+1 * This is a port of Shell.FM, a console based player for the streamsmiwi2006-12-171-0/+1 * Remove expired leaf port:vd2006-12-131-1/+0 * Remove expired ports:vd2006-12-131-1/+0 * Remove expired leaf ports:vd2006-12-121-1/+0 * import audacious-plugins, the input, output, visualization and effect pluginsoliver2006-12-041-0/+1 * GNUstep port of MPlayerOSXdinoex2006-11-181-0/+1 * Poe: A Pugnacious Ogg Editor. Poe is a vorbis comment editor. It tries todinoex2006-11-171-0/+1 * This utility rips Music and Sound class objectsmiwi2006-11-071-0/+1 * Remove expired leaf ports:vd2006-10-311-1/+0 * Add new entries for:marcus2006-10-141-0/+2 * Remove bmpx-devel, it is obsolete.novel2006-10-101-1/+0 * Add multimedia/pvrxxx, a patched version of pvr250 to support 150/500 cards.alepulver2006-10-061-0/+1 * - Add dirac-referenceahze2006-09-251-0/+1 * Add port multimedia/linux-libtheora - Linux version of multimedia/libtheorasat2006-09-171-0/+1 * - add iriverterahze2006-09-071-0/+1 * add vodcatcher 1.3.3ijliao2006-09-051-0/+1 * add podcatcher 1.3.5ijliao2006-09-051-0/+1 * BMPx is a media player that features support for specifications likenovel2006-08-271-0/+1 * A wrapper class for ffmpeg command line utility.sumikawa2006-08-241-0/+1 * Add snd-music-duplicates 1.9.8, locate and remove duplicated musicrafan2006-08-221-0/+1 * Add multimedia/v4l_compat port, a port that installs the <linux/videodev.h>flz2006-08-021-0/+1 * Add eclair 20060719, an EFL powered media player.vanilla2006-07-251-0/+1 * Add emotion 20060719, video playback wrapper library for e17.vanilla2006-07-251-0/+1 * Add port multimedia/p5-File-Format-RIFF:sat2006-07-241-0/+1 * This module reads Macromedia FLV files and reports metadata abouterwin2006-07-141-0/+1 * Add multimedia/handbrake-gtk2, still at 0.6.x version because in the 0.7.xmezz2006-07-021-0/+1 * KatchTV is an "Internet TV" application (for KDE). KatchTV makes it easyitetcu2006-06-101-0/+1 * CastPodder is a podcast receiver. Its goal is to simplify trackingpav2006-06-081-0/+1 * PyBMP is a Python package allowing full control of BMP as well aspav2006-06-081-0/+1 * Add tunapie 0.9.9, tuner for streaming internet radio and TV.clsung2006-06-071-0/+1 * Remove expired leaf port:vd2006-05-311-1/+0 * Remove expired leaf port:vd2006-05-301-1/+0 * The Helix Player is the Helix Community's open source media player forthierry2006-05-181-0/+1 * Attempt to unbreak ports INDEX build by connecting gstreamer-plugins-xvidcperciva2006-05-171-0/+1 * - Update gstreamer-plugins to 0.10.7ahze2006-05-161-0/+2 * - Remove multimedia/gnonlin port in favor of gstreamer-plugins-gnonlin portpav2006-05-081-1/+0 * - Remove gstreamer-plugins not in 0.10 (yet)_ahze2006-04-301-8/+0 * - Update gstreamer to 0.10ahze2006-04-301-1/+22 * This port provides a FreeBSD kernel module thatsem2006-04-291-0/+1 * program used to "time" subtitles:dinoex2006-01-181-0/+1 * Project is merged into multimedia/kinoedwin2006-01-141-1/+0 * Add subtools 20051215, command-line tools for movie subtitles inanray2006-01-111-0/+1 * Add rox-videothumbnail, a video thumbnail provider for the ROX file manager.olgeni2006-01-091-0/+1 * New port: multimedia/mmsripedwin2006-01-071-0/+1 * Add ggrab 0.22a, which records MPEG2 streams directly from your Dbox2 overmarkus2006-01-071-0/+1 * New port qvamps version 0.20: Dvd rip gui written in qt that useslioux2006-01-061-0/+1 * New port multimedia/audacious A media player based on BMP and XMMSedwin2006-01-051-0/+1 * New port vamps version 0.98: High performance tool to transcode DVDlioux2006-01-041-0/+1 * Add new port: p5-Subtitles.osa2005-12-291-0/+1 * Add dvbcut, a Qt based program for cutting of MPEG TS stream filesse2005-12-291-0/+1 * Quod Libet is a GTK+-based audio player written in Python.pav2005-12-281-0/+1 * New port tovid version 0.24: A collection of video disc authoringlioux2005-12-281-0/+1 * [NEW PORT] multimedia/k9copy A DVD-9 to DVD-5 shrinking application for KDEedwin2005-12-261-0/+1 * Add motion 3.2.4, a motion detection application.ehaupt2005-12-261-0/+1 * New port dvdwizard version 0.4.1: Automated creation of DVDs withlioux2005-12-141-0/+1 * - Add p5-MP4-Info, a perl module to extract information from MPEG4 audioflz2005-12-111-0/+1 * New portmnag2005-12-071-0/+1 * Add BMPx, an audio player that can be either used with a built-innovel2005-11-231-0/+1 * Remove expired portskris2005-11-051-1/+0 * Add bsdav 1.3, BSD native set of programs for audio and video readingvanilla2005-11-051-0/+1 * Add streamanalyze.jylefort2005-11-011-0/+1 * - Add p5-GStreamerahze2005-10-181-0/+1 * New port subtitleripper version 0.3-4: convert DVD subtitles intolioux2005-10-151-0/+1 * - Rename gpac-libm4systems -> gpac-libgpacahze2005-10-101-1/+1 * Add gstreamer-pitfdll plugin.kwm2005-10-081-0/+1 * This is a fork off of the vstream library from the tivo-mplayer project.mnag2005-10-071-0/+1 * Jahshaka is a video and film compositing, editing and special fx systempav2005-09-191-0/+1 * - Update to 2.0.1 and reflect the project name change [1]jylefort2005-09-111-1/+1 * gstreamer-plugins-x264 --> multimedia/gstreamer-plugins-x264kwm2005-09-091-0/+1 * Add streamdvd.jylefort2005-09-061-0/+1 * Toxine is a text user interface using the xine library. It permit to playbackpav2005-07-061-0/+1 * - Add multimedia/istanbulahze2005-07-051-0/+1 * Add gnonlin, This was included in pitivi.kwm2005-06-021-0/+1 * Update to 0.8.9.kwm2005-05-311-1/+0 * - Add gstreamer-plugins-allahze2005-05-271-0/+1 * GCfilms is a perl application that can be used to manage a movie collection.pav2005-05-181-0/+1 * - Add vlc-develahze2005-05-151-0/+1 * Connect ffmpeg-devel to build after repo copy from ffmpeglioux2005-05-121-0/+1 * - Add gpac-libm4systemsahze2005-05-041-0/+1 * Project X - a free Java based demux utilityhq2005-04-211-0/+1 * - Add mjpegtools-yuvfiltersahze2005-04-101-0/+1 * Remove multimedia/linux-divxplayer since developer's dropped thelioux2005-04-031-1/+0 * Complete the removal of nautilus-media.marcus2005-03-131-1/+0 * - split multimedia/gstreamer-plugins in to individual ports perahze2005-03-011-0/+12 * New port dvd-slideshow. set of scripts to make it easier for me to burn apav2005-02-201-0/+1 * Libmpeg3 supports advanced editing and manipulation of MPEG streams.pav2005-02-091-0/+1 * Add xfce4-media (xfmedia), a lightweight media player based on the xine enginepav2005-01-301-0/+1 * dvdrip is a Command Line Tool to make a copy from a Video DVD for private Use.pav2005-01-291-0/+1 * Finish repocopy from graphics to multimedia.kwm2005-01-141-0/+1 * Add x264ahze2005-01-121-0/+1 * o New port cupid version 0.0.1: GNOME Gstreamer based video/audiolioux2005-01-09