syncevolution/src/backends/activesync
Patrick Ohly b60c3bccb2 ActiveSync: fixed "merge" detection in case of fast path
When replacing a single, existing item, the "merged" flag wasn't set
when it had be. Found in the testLinkedItemsInsertParentTwice test.
2011-09-01 12:39:55 +02:00
..
activesync.am autotools: improved ActiveSync rules 2011-08-31 12:13:25 +02:00
ActiveSyncCalendarSource.cpp ActiveSync: fixed "merge" detection in case of fast path 2011-09-01 12:39:55 +02:00
ActiveSyncCalendarSource.h ActiveSync: improved testImport for ActiveSyncCalendarSource 2011-08-30 09:18:39 +02:00
ActiveSyncSource.cpp ActiveSync: check for unexpected NULL pointers (BMC #22048) 2011-08-30 09:18:39 +02:00
ActiveSyncSource.h ActiveSync: fixed testImport test 2011-08-30 09:18:39 +02:00
ActiveSyncSourceRegister.cpp client-test + ActiveSync: avoid tests which depend on storing detached children alone 2011-09-01 12:38:37 +02:00
configure-sub.in autotools: improved ActiveSync rules 2011-08-31 12:13:25 +02:00
README ActiveSync: enabled compilation 2011-08-30 09:18:39 +02:00

Compilation
===========

activesyncd development files must be installed so that pkg-config
finds libeassync.pc. --enable-activesync then enables the ActiveSync
backend. It is off by default, even if development files are found.


Quickstart
==========

Check that it is enabled:

$ syncevolution backend=? | grep -i activesync
   ActiveSync Address Book = eas-contacts
   ActiveSync Events = eas-events
   ActiveSync Todos = eas-todos
   ActiveSync Memos = eas-memos

Configure access to the server:
$ syncevolution --configure \
                syncURL= \
                username=<email adddress identifying the account> \
                addressbook/backend=eas-contacts \
                calendar/backend=eas-events \
                todo/backend=eas-todos \
                memo/backend=eas-memos \
                target-config@exchange addressbook calendar todo memo

List items:
$ syncevolution --print-items target-config@exchange [calendar|addressbook|todo|memo]

Debugging:
- run with --daemon=no (otherwise syncevo-dbus-server will execute the operation)
- set SYNCEVOLUTION_DEBUG (otherwise SyncEvolution will suppress stdout/stderr from libs)

Configure synchronization:
$ syncevolution --configure \
                --template SyncEvolution_Client \
                syncURL=local://@exchange \
                username= \
                password= \
                exchange

Run a sync (involving all four data types!):
$ syncevolution exchange

Sync only events:
$ syncevolution exchange calendar


Backend Testing
===============

In addition to an activesyncd account called <EAS account ID> (usually
an email adddress), also create an activesyncd account called <EAS
account ID>_B ("_B" appended) with the same settings *plus*
"device_id" set explicitly. The value must be different than the one
chosen automatically (see apps/activesyncd/device_id key). Because
Exchange might not accept arbitrary strings, stick to the scheme of
"32 digit hexadecimal number".

This second accounts is required for Client::Source::*::testChanges,
which must simulate two independent ActiveSync clients.

Configure "local" testing (backend is covered, no syncing involved):
./syncevolution --configure username=<EAS account ID> \
                --template SyncEvolution target-config@client-test-exchange

On MeeGo:
- install syncevolution-test and syncevolution-synccompare
- create an empty directory, enter it
- copy /usr/share/doc/syncevolution/testcases
- CLIENT_TEST_UNIQUE_UID=1 \
  CLIENT_TEST_SERVER=exchange \
  client-test Client::Source::eas_event

When compiling SyncEvolution:
- enter the src directory
- CLIENT_TEST_UNIQUE_UID=1 \
  CLIENT_TEST_SERVER=exchange \
  PATH=.:$PATH \
  ./client-test Client::Source::eas_event

CLIENT_TEST_UNIQUE_UID is necessary to avoid a UID conflict in a
simple-minded insertion test. The proper solution is to add an "item
exists" error to activesyncd and handle that in
ActiveSyncSource::insertItem().

The test data that is used for testImport is in:
  testcases/eds_event.ics

This data was meant for Evolution. Because it is standard iCalendar 2.0,
it is a suitable starting point for Exchange. If it turns out that this
data doesn't work with Exchange, then a simplified/adapter version of
the file can be put into:
  testcases/eds_event.ics.exchange.tem


Sync Testing
============

- Configure target-config@exchange with source 'calendar'.
- Create two sync configs:
  syncevolution --configure username= password= \
                syncURL=local://@exchange uri=calendar \
                backend=evolution-calendar \
                --template SyncEvolution_Client exchange_1@client-test-1 eds_event
  syncevolution --configure username= password= \
                syncURL=local://@exchange uri=calendar \
                backend=evolution-calendar \
                --template SyncEvolution_Client exchange_2@client-test-2 eds_event
- Create calendars named as follows in Evolution:
  SyncEvolution_Test_eds_event_1
  SyncEvolution_Test_eds_event_2
- run test (see above for invoking client-test and setting up "testcases"):
  CLIENT_TEST_UNIQUE_UID=1 CLIENT_TEST_SERVER=exchange \
  client-test Client::Sync::eds_event::testCopy