NOTE:
YOU MAY GET UNESPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS, 
IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM
THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES
HAVE TOO MUCH DIFFERENCE.


CONTENT:

0) How syncing works
1) Qick overview of settings
2) Sync settings in sync dialog
3) Syncing background
4) Sync preferences

*************************************************************************
0) How syncing works
*************************************************************************

In KO/Pi you can synchronize ( sync ) your calendar 
with another calendar, by syncing  your (local) calendar with a 
(remote) file. This remote file may on your local filesystem
or on another (remote) device.
If it is on another device, you have to specify a 
command line download/upload command ( like scp, ftp, ...) to 
a) download the remote file to your local machine to a temp file
b) sync with this temp file
c) upload the synced file to the remote device

You should create for every device, to sync with, a sync profile.

NOTE:
Before syncing, it is recommended to close 
a running KO/Pi on the remote device.
(Note: KO/Pi running on Zaurus with 
FastLoad enabled will never be closed!)
After syncing with a running KO/Pi on the remote device,
a "save" on the remote device will tell you that it needs to merge (sync).
After merging (just a syncing with the changed file) 
you will get the new data showing in remote KO/Pi. 

*************************************************************************
1) Qick overview of settings
*************************************************************************

a) Open sync settings dialog
b) Give your device a unique name.
   (unique in the set of all devices you want to sync with).
   If you have already configured another devive and created 
   there a sync profile to sync with this device, give your device
   the same name as this sync profile! The same name is important!
c) Create a new sync profile and give it a unique name.
   (unique in the set of all sync profiles on this device).
   If you want to sync with a device, where KO/Pi is already installed
   and which has a given unique device name, use this device name as
   your profile name.
d) Coose the profile kind of your syncing method:
      (i) Local file or
     (ii) Remote file
c) If you did choose (i), 
      specify the file name you want to sync with.
   If you did choose (ii), 
      specify the system (command line) 
      download/upload command of the remote file.
d) Choose the other profile options.
   Detailed explanation in 2.) 
e) Close sync dialog with OK.
f) Sync.

NOTE:
AFTER SYNCING THERE ARE "SYNC EVENTS" CREATED 
(OR UPDATED, IF IT ALREADY EXITS) FOR EACH SYNC PROFILE.
YOU MAY NOT DELETE OR CHANGE THESE EVENTS. 

*************************************************************************
2) Sync settings in sync dialog
*************************************************************************

a) Local device name:
   -> 1) b)
b) Profile:
   -> 1) c)
c) Include in multiple sync:
   In the Synchronize menu, there is a multiple sync menu entry.
   If you choose this menu entry, all user defined profiles with this
   'Include in multiple sync' option enabled will be  synced 
   one after another. And this twice. This will take some time.
   After that sync, on all devices should be the same data.
d) Ask for preferences before sync:
   Check this to be asked for sync settings before each sync.
e) Sync preferences:
   Choose here your sync preferences.
   Details -> 4)
f) Show summary after sync:
   Check this to get a small summary dialog after sync 
   about number of added/changed/deleted events on local/remote.
g) Write back existing entries only:
   Check this to update the remote calendar only.
   I.e. no event/todo from yor local calendar is added to the
   remote calendar. You may use this option to 
   sync against some kind of "public calendar" without 
   writing back your personal data.
h) Write back file:
   Check this to update the local calendar only.
   I.e. your local calendar is synced with the remote calendar
   but nothing on the remote calendar is changed.
i) Profile kind:
   -> 1) d)

*************************************************************************
3) Syncing background
*************************************************************************

Synchronizing calendars ( i.e. files ) means, 
to merge two calendars in a useful way.
If the two calendars are completely different, 
there is no problem, the resulting calendar contains 
all data from the local and from the remote calendar.

Problems will occur, if you have edited items 
from the local calendar on the remote machine. 
Then it could be, that items are in conflict. 
Two items are "in conflict", if they have the 
same unique ID (which get an item at time of 
creation and owns it until it is deleted )
and they both are modified after the last 
synchronization.

At first sync of two calendars there is no item deleted. 
If the calendars are synced before and there is an item, 
which is not edited after the last sync and is only 
available in one calendar, then this item is deleted 
in this calendar.

But when was the last synchronization between two calendars?

To know that, KO/Pi creates at first syncing 
of two files an unique event "<profile name> - sync Event" 
on the remote and the local calendar. 
After syncing, the start time of this event is set 
to the time of syncing. 
The event is read only and the user may not change it.

If two such files are synced, that both have an event 
"<profile name> - sync Event" and the events have 
the same start time, then deleted items on the one calendar 
are deleted on the other as well.


*************************************************************************
4) Sync preferences
*************************************************************************

Two items are "in conflict", if they have the same unique ID 
and they both are  modified after the last synchronization.
(Details -> 3) ).

If an item is not modified after the last sync and 
it is not found in the other calendar, it is deleted.

On the first sync, there is no item deleted.

SYNC PREFERENCES:
 -Take local entry on conflict:
  Takes the local entry on conflict. 
  If it is the first sync, 
  "Ask for every entry" 
  is chosen automatically, 
  if this is selected.

 -Take remote entry on conflict:
  Takes the remote entry on conflict. 
  If it is the first sync, 
  "Ask for every entry" 
  is chosen automatically, 
  if this is selected.

 -Take newest entry on conflict:
  This takes the newest entry on conflict. 
  May be the most useful syncing mode.

 -Ask for every entry on conflict:
  Pops up an event viewer dialog and 
  shows the two conflicting entries there. 
  The user can chose, which entry he would like to take.
  The button for the newest entry 
  is automatically set as default button.
  The color for the newest entry is green.

 -Force: Take local entry always:
  Even if the calendars are already synced
  there is no item deleted on local. 

 -Force: Take remote entry always:
  Analogous to  
  "Force: Take local entry always"

