Commit Graph

64 Commits

Author SHA1 Message Date
Patrick Ohly 5e8fa6eb94 major restructuring of the file layout and autotools build
This change makes it possible to add a new backend without
changing any of the core files. It also gets rid of some
hacks (like -export-dynamic for the binary) by putting all
core SyncEvolution code into a library.

The transition is not quite complete: there are still
some lists of existing backends, which will be removed
soon. EvolutionSmartPtr.h and EvolutionSyncSource depend
on Evolution/GNOME libs, which forces all backends to
use the right -I flags.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@684 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-29 21:06:11 +00:00
Patrick Ohly f32501af5f reduced explicit usage of iterators (mostly with BOOST_FOREACH)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@665 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-11 20:25:02 +00:00
Patrick Ohly ca390a7743 cleaned up EvolutionSyncSource interface+implementation
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@664 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-10 19:17:42 +00:00
Patrick Ohly 3c12d2c05d code cleanup (map access)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@658 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-06 20:36:29 +00:00
Patrick Ohly 01f00fe40b fixed mem leak when listing databases
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@654 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-03 19:59:03 +00:00
Patrick Ohly 7f2d6903b2 avoid useless 'list: unable to access calendars: failure' error message
The error was printed when listing databases failed without setting
an error, like on Maemo where memos are not supported by the Evolution
backend.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@648 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-02 19:30:49 +00:00
Patrick Ohly daf952c893 made detached recurrence handling more resilient
Child items can now be inserted without the
corresponding parent or before the parent.
Semantically this makes no sense, but servers
which do not know about the semantic might do
it. Also removing the parent without the children
is now supported.

Technically this has to workaround limitations of
the EDS API and is done as:
* child before parent: temporarily save and remove children, insert parent, update parent with children
* remove parent, but not child: temporarily save and remove children, reinsert after removal of parent



git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@627 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-06-25 17:21:48 +00:00
Patrick Ohly a37733c1fb fixed compile error
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@622 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-06-12 18:43:47 +00:00
Patrick Ohly 6c55dc24dd removed/replaced 'calendar' string from message in libecal backend because it is also used for memos and tasks
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@621 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-06-12 16:39:07 +00:00
Patrick Ohly 735a54cd33 fixed modifying parent/child (=detached) calendar items
- must track which items exist locally because
  asking for a detached recurrence succeeds even if
  the object doesn't exist yet; also reduces communication
  with backend
- new child items must be created via e_cal_modify_object()
- log adding new items with extracted UID/RECURRENCE-ID
- sort item lists so that parent items are processed
  first (required by ScheduleWorld)

More work is needed to handle semantically not quite
correct situations, like adding a child without a parent.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@620 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-06-08 12:10:04 +00:00
Patrick Ohly f2666b74af optionally patch components stored in a GList (required by evolution-exchange)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@612 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-05-08 20:45:55 +00:00
Patrick Ohly 7b6427b71a GNOME Bugzilla #516408: always free ical strings, duplicate when necessary
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@609 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-05-02 19:05:37 +00:00
Patrick Ohly 36cf397fca finished proposal for inclusion of e_cal_check_timezones() into Evolution
- renamed files to comply with Evolution naming conventions
- implemented time zone lookup for file backend


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@601 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-19 13:26:00 +00:00
Patrick Ohly de2a60b9cf map TZIDs to system timezones, if possible
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@594 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-17 19:52:08 +00:00
Patrick Ohly 5520f9deb3 make sure that the icomp UID is set before calling the update method (EDS crashes otherwise)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@581 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-10 18:49:45 +00:00
Patrick Ohly 78c2ae137c implemented support for detached recurrences
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@579 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-08 22:42:59 +00:00
Patrick Ohly fb69c3642e make results from insertItem explicit by putting them all in one struct
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@576 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-07 18:38:25 +00:00
Patrick Ohly af7d2783c2 EvolutionCalendarSyncSource now uses change tracking based on modification time stamp.
- const SyncItem cleanup
- distinguish between added/merged in TrackingSyncSource::insertItem():
  required for calendar events
- getData() util function not needed.
- TrackingSyncSource key/value strings can be arbitrary strings now.
- Clarified insertItem() semantic and errors.
- Added new required SyncSource::removeAllItems() call.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@574 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-07 17:59:17 +00:00
Patrick Ohly 62169738fc - all passwords can be specified as env variables (${foo}) or read from stdin (-)
- fixed config access in sync sources (broke during rewrite)


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@562 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-03 20:01:56 +00:00
Patrick Ohly b6e4f69511 simplified configuration
- deviceId is at the end of the config now because it hardly ever has to be set
- evolutionsource can be left unset in most cases: the first Evolution database is
  the default
- mark default data source when listing them


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@558 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-30 19:08:19 +00:00
Patrick Ohly 7538b19553 fixed some memory leaks for results of e_book_get_contacts/changes and e_cal_get_object_list_as_comp/e_cal_get_changes
The API documentation of these calls doesn't say so explicitly, but it
seems that a combination of g_object_unref()/g_free()/g_list_free() is
necessary. Rewrote the eptr smart pointer so that different deleter
functions can be selected as template parameters.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@521 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-18 13:36:59 +00:00
Patrick Ohly 80b8d8c6d7 - implemented value aliases for the configuration
- rewrote interpretation of "type" property: is now a combination of backend and mime type
- improved registration of sync sources (RegisterSyncSource)


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@514 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-10 22:45:36 +00:00
Patrick Ohly f88d117d64 - introduced new SyncEvolution config handling
- cleaned up passing of SyncSource creation parameters
- reads old configs and should also work with new layout (not tested yet)


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@507 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-06 22:23:13 +00:00
Patrick Ohly 64756c9860 removed SyncState parameter out of all createItem() implementations into the caller; requires smartptr release()
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@484 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-01-13 01:41:21 +00:00
Patrick Ohly d1d2290037 Detect unexpected crashes of the Evolution Data Server. A workaround for
the fact that the synchronous EDS API calls block infinitely in that case.
- drive default glib event look in background thread
- listen for "backend-died" signals
- if triggered, print a message ("Evolution Data Server has died unexpectedly,
  database no longer available.") and abort the process (other error handling is
  impossible)
- for contacts instead of "database" "contacts" is printed


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@441 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-03 17:07:42 +00:00
Patrick Ohly effa4b307a adapted calendar event insert/update to Evolution 2.12: the UID needs to be restored, otherwise the Evolution backend crashes (GNOME issue #488881)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@440 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-03 13:30:37 +00:00
Patrick Ohly fb86f9fa4e added workaround for missing exception handling on iPhone (http://code.google.com/p/iphone-dev/issues/detail?id=48)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@406 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-11 21:02:49 +00:00
Patrick Ohly e8bfe76334 less verbose INFO logging: extracting items is now logged as DEBUG
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@387 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-08-25 13:22:26 +00:00
Patrick Ohly 8a5400d690 workaround for Evolution bug in the calendar import/export:
Evolution uses \, as separator for CATEGORIES, but the standard
specifies a plain comma. The effect was that multiple categories were
treated as one category with commas by ScheduleWorld. Events imported
into Evolution were stored incorrectly and the GUI only used the last
category.

As a workaround SyncEvolution now converts back and forth between , and \,


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@370 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-06-24 17:19:07 +00:00
Patrick Ohly 36f2140ce2 added synchronization of Memos as plain text
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@360 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-15 13:42:42 +00:00
Patrick Ohly c8c29ccc3f avoid not freeing error/overwriting error when trying again
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@352 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-09 19:59:39 +00:00
Patrick Ohly 131add0dde avoid e_cal_new_system_memos(), it breaks compilation with older Evolution
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@346 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-01 17:59:07 +00:00
Patrick Ohly 6c44ecf84d added the possibility to create databases if evolutionsource is set to a file:// uri
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@345 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-01 13:02:56 +00:00
Patrick Ohly 3c40292066 added error checking for broken events which cannot be converted to iCal, e.g. because of a missing timezone definition (SF #1685637)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@321 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-03-23 22:05:13 +00:00
Patrick Ohly 4ebb979fe9 --enable-ecal/ebook are only enabled by default if the libs are present
--enable-shared will build backends as modules which are loaded dynamically if possible (off by default)


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@315 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-03-11 22:13:13 +00:00
Patrick Ohly e7cd458d37 copyright transfer to Funambol
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@297 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-12-10 17:35:20 +00:00
Patrick Ohly d649064860 messages about local changes are now logged as DEBUG and not INFO because they were confusing for users; now they are not visible in the final report
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@282 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-11-11 16:00:37 +00:00
Patrick Ohly 4de56c607e adapted to new API
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@263 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-10-03 11:44:34 +00:00
Patrick Ohly 0a533feef3 adapted to additional SyncSourceConfig parameter in SyncSource constructor, added testing of LargeObject support
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@260 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-28 23:02:43 +00:00
Patrick Ohly fcf7046295 do not treat requests to delete non-existant items as error, instead log the event (grep for DEBUG and non-existant) and proceed - this is currently necessary with ScheduleWorld server
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@246 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-10 14:43:38 +00:00
Patrick Ohly 8fbee48f0c added missing space to error messages
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@245 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-10 08:06:17 +00:00
Patrick Ohly 9a2e1cf30a do not overwrite the UID in an addItem operation even if we fall back to an update
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@244 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-09 14:58:05 +00:00
Patrick Ohly f7d31296cc beware to not overwrite valid UID with empty one (some tests broke due to this recent change)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@236 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-07 19:06:35 +00:00
Patrick Ohly 7dfe68ea9a SF issue 1511951: support copying changes back from EGroupware server by not expecting the UID of calendar items to be unmodified
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@233 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-31 21:34:36 +00:00
Patrick Ohly 7daf4f924c moved reading of changes into helper function so that it can be used in the pre- and post-processing
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@220 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-19 08:42:07 +00:00
Patrick Ohly 455da2660d changed list into a set to be more resilient against getting UIDs multiple times
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@218 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-17 20:39:35 +00:00
Patrick Ohly bfc7f64173 implemented Evolution authentication
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@217 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-17 20:26:08 +00:00
Patrick Ohly 1668c30008 - rename qptr to eptr to avoid name clash with sstring
- moved unref() into global name space so that more unref() functions
  can be added (otherwise local methods shadow the global functions)
- use eptr for SourceList (wasn't destructed in case of error otherwise and
  logging in 0.4 pre continued to go to file)
- check for server configuration and abort in prepare if none given with
  a suitable error message


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@215 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-14 20:52:34 +00:00
Patrick Ohly 23e1a67b91 workaround for incomplete result of e_cal_get_changes()
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@197 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-08-06 12:41:50 +00:00
Patrick Ohly 9c886fd2b5 added --disable-ecal/ebook for installations without the required libs
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@192 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-07-23 10:27:21 +00:00