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 879364dc10 regression in 0.8 alpha 1: setting sync mode during status query or sync affected *all* sources, even the disabled ones
The intented behavior is that inactive sources can only be activated
by listing them explicitly after the server name. Fixed by moving
the handling of the sync mode override from the generic config
handling to EvolutionSyncClient, which knows about this special
semantic.

Minor code cleanup: avoid duplicating the "sync" string by
declaring the syncSourceProp as member of EvolutionSyncSourceConfig.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@626 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-06-15 21:31:36 +00:00
Patrick Ohly 909d137156 added missing initialization of sources during --status processing
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@577 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-07 18:47:05 +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 b77aa872dd check config before open() and beginSync() to detect errors when it is still safe (change tracking not modified yet; exceptions handled gracefully
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@566 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-05 12:09:44 +00:00
Patrick Ohly 20048a5b13 added several options for SSL connections
SSLServerCertificates = non-standard path to server certificates
SSLVerifyServer = check server certificate?
SSLVerifyHost = check server host name?


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@563 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-04-05 09:17:58 +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 452ff34c74 moved utility code into separate file: directory iteration, rm -r, mkdir -p
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@541 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-28 22:31:21 +00:00
Patrick Ohly 415aa45e37 fixed compiler warnings and unit test of EvolutionContactSource
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@537 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-24 21:42:47 +00:00
Patrick Ohly ca282a4dff adapted to new normalized name for disabled sync mode
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@530 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-20 21:58:26 +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 873dc81719 added comment about setting sync mode
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@512 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-03-09 17:11:44 +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 f12b8db898 revised error handling: lastError* variables are now hidden, use new methods
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@504 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-02-14 19:48:51 +00:00
Patrick Ohly acc239c090 Use the new singleton implementation for logging, if available.
LOG_HAVE_SET_LOGGER and LOG_HAVE_DEVELOPER preprocessor symbols in
the new Log.h header file are checked to detect that.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@481 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-01-12 22:53:50 +00:00
Patrick Ohly 05e69f2569 disabled the background glib event loop again because it caused segfaults
Without the event loop SyncEvolution will get stuck again in EDS API calls
when the EDS dies, but that is the lesser evil.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@475 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-12-15 16:43:12 +00:00
Patrick Ohly f1abff3829 myFUNAMBOL does not like empty types in the capability, so always send a valid (even if wrong) type
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@474 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-12-10 19:59:02 +00:00
Patrick Ohly 3b2ad15743 avoid including invalid information about inactive sources in DevInf by clearing it
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@464 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-12-01 21:04:41 +00:00
Patrick Ohly d808603aef avoid delivering SIGALRM to background thread - glib/ebook crash when that happens
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@460 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-28 18:05:22 +00:00
Patrick Ohly 1da4976ce7 added better error message when 'syncevolution' is started with non-existant sources as parameter
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@458 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-22 21:06:21 +00:00
Patrick Ohly fb105807d2 clarified post-sync comparison by adding 'Changes applied to client during synchronization'
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@454 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-10 13:26:11 +00:00
Patrick Ohly 0d5993eed5 - revised an updated usage instructions (myFUNAMBOL instead of Funambol)
- added dumping of local changes before sync (works best with logdir)
- added command line options:

  --sync|-s <mode>
    Temporarily synchronize the active sources in that mode. Useful
    for a 'refresh-from-server' or 'refresh-from-client' sync which
    clears all data at one end and copies all items from the other.

  --status|-t
    The changes made to local data since the last synchronization are
    shown without starting a new one. This can be used to see in advance
    whether the local data needs to be synchronized with the server.

  --quiet|-q
    Suppresses most of the normal output during a synchronization. The
    log file still contains all the information.

  --help|-h
    Prints usage information.

  --version
    Prints the SyncEvolution version.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@449 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-08 21:22:52 +00:00
Patrick Ohly e207027ae1 dump user name, date and SyncEvolution at beginning of debug log
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@443 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-11-04 17:33:27 +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 f89ddf337e improved error handling: catch errors during post-processing and continue
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@421 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-14 18:19:44 +00:00
Patrick Ohly 8f07dae54b added a table which summarizes the changes made on client and server
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@419 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-14 16:25:39 +00:00
Patrick Ohly f7cd1459cc replaced ambiguous 'Modifications:' with 'Changes applied during synchronization:'
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@418 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-14 14:49:07 +00:00
Patrick Ohly 429160af1c fixed segfault due to unintentional infinite recursion in new throwError() call
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@410 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-13 16:04:57 +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 ed4c8d0f9b problem with C++ output stream (http://code.google.com/p/iphone-dev/issues/detail?id=48):
throws exception although everything is fine - disabled exceptions in one case and replaced
with ANSI C calls in another

IPHONE define now in configure (cleaner).

Creating contacts twice (during dump and when sending) caused crash - ref counting problem?
Disabled any CFRelease() for now on iPhone.

compile error fix for Mac OS X (probably more necessary)


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@403 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-07 19:06:01 +00:00
Patrick Ohly 5aee503cae finished change tracking, update and delete - still needs improved import/export with own functions because Address Book vcard parser merges X- properties into NOTE and cannot update contact
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@385 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-08-21 20:15:32 +00:00
Patrick Ohly e59701c932 fixed error handling: a failed source was not forced into a slow sync, one failed source prevented saving configs of not-failed ones
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@363 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-21 13:14:43 +00:00
Patrick Ohly 614d3b5210 - improved logging: log file and backup can be avoided with logdir=none,
loglevel is configurable
- fixed off-by-one counting of months in backup directory names
- only one example configuration per server, users typically do not
  need the _1/2 suffices and the testing system no longer has to be
  configured manually either
- documented the switch from the original SyncEvolution testing to its
  successor, the generic Funambol C++ client testing framework


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@362 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-21 12:33:23 +00:00
Patrick Ohly 7b6a72d62a always summarize ERROR/INFO messages at the end, even if sync didn't start - there might be errors which prevent starting it
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@350 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-04-09 19:58:23 +00:00
Patrick Ohly d0a9067be2 synccompare and test suite are now taken from C++ client library
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@343 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-03-31 16:22:40 +00:00
Patrick Ohly 3ac3d9905b Errors while writing the initial datatbase dumps was not handled
properly and led to a direct dump of the error exception. Now the
error is logged first and the '.after' dump is skipped.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@320 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-03-23 21:00:32 +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 e77d43f8a5 fixed free/delete [] mismatch
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@313 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-01-26 22:32:17 +00:00
Patrick Ohly f7a387149c fixed missing return code
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@298 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-12-17 16:33:45 +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 9b64d15b58 adapted to const qualifier changes in client library and fixed minor memory leak
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@290 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-11-27 21:08:12 +00:00
Patrick Ohly e257b10aeb VerDTD must be configured, otherwise Funambol 3.0a (but not 3.0b5) fails during the second sync
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@269 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-10-29 15:22:37 +00:00
Patrick Ohly db5a9b3b01 setting config is no longer necessary
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@266 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-10-04 19:39:00 +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 0a67a4a786 adapted to C++ client API change: supported datatypes now in config
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@258 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-16 09:00:50 +00:00
Patrick Ohly c6033da406 deviceId property was renamed -> restored compatibility with old configs
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@241 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-08 19:57:08 +00:00
Patrick Ohly 168dd2b911 adapted to official DevInf API with one patch: config passed to SyncClient::conf()
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@237 15ad00c4-1369-45f4-8270-35d70d36bdcd
2006-09-07 19:47:29 +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