added support for synchronizing Evolution memos in iCalendar 2.0 VJOURNAL format

git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@305 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
Patrick Ohly 2007-01-04 20:54:11 +00:00
parent a6c0c6cf5d
commit 8d3031396b
6 changed files with 32 additions and 7 deletions

10
README
View File

@ -274,10 +274,12 @@ It is recommended to sync against the new vCard 3.0 URI (card3) and
iCalendar 2.0 URIs (cal2, task2), using the "text/vcard", "text/calendar"
and "text/x-todo" type setting respectively. These are the native formats of
Evolution and a lot of effort went into ensuring that they store as
much Evolution data as possible. SyncEvolution is primarily tested
against ScheduleWorld. The "scheduleworld_1" example configuration is
ready to be used with these URIs, one only has to fill in the real
username and password.
much Evolution data as possible. The "note" URI and "text/x-journal" type
can be used to synchronize memos.
SyncEvolution is primarily tested against ScheduleWorld. The
"scheduleworld_1" example configuration is ready to be used with these
URIs, one only has to fill in the real username and password.
Configuration with Funambol

View File

@ -14,7 +14,9 @@ localhost_copy = \
$(localhost_copy_syncml) \
$(localhost_copy_sources)
scheduleworld_copy = \
$(subst localhost,scheduleworld,$(localhost_copy) $(localhost_source))
$(subst localhost,scheduleworld,$(localhost_copy) $(localhost_source)) \
scheduleworld_1/spds/sources/memo_1/config.txt \
scheduleworld_2/spds/sources/memo_2/config.txt
all_copy = \
$(localhost_copy) \
@ -41,6 +43,10 @@ localhost_2/spds/sources/todo_2/config.txt : localhost_1/spds/sources/addressboo
mkdir -p $(@D)
sed -e s/addressbook_1/todo_2/ -e s/#1/#2/ -e 's:type = text/x-vcard:type = text/x-todo:' -e 's/uri = card/uri = todo/' $< >$@
localhost_2/spds/sources/memo_2/config.txt : localhost_1/spds/sources/addressbook_1/config.txt
mkdir -p $(@D)
sed -e s/addressbook_1/memo_2/ -e s/#1/#2/ -e 's:type = text/x-vcard:type = text/x-journal:' -e 's/uri = card/uri = note/' $< >$@
localhost_1/spds/sources/calendar_1/config.txt : localhost_1/spds/sources/addressbook_1/config.txt
mkdir -p $(@D)
sed -e s/addressbook_1/calendar_1/ -e 's:type = text/x-vcard:type = text/calendar:' -e 's/uri = card/uri = cal/' $< >$@
@ -49,6 +55,10 @@ localhost_1/spds/sources/todo_1/config.txt : localhost_1/spds/sources/addressboo
mkdir -p $(@D)
sed -e s/addressbook_1/todo_1/ -e 's:type = text/x-vcard:type = text/x-todo:' -e 's/uri = card/uri = todo/' $< >$@
localhost_1/spds/sources/memo_1/config.txt : localhost_1/spds/sources/addressbook_1/config.txt
mkdir -p $(@D)
sed -e s/addressbook_1/memo_1/ -e 's:type = text/x-vcard:type = text/x-journal:' -e 's/uri = card/uri = note/' $< >$@
# www.scheduleworld.com configuration:
# - different URL

View File

@ -19,6 +19,7 @@ syncModes = slow,two-way,refresh-from-client,refresh-from-server
#
# text/calendar = Evolution calender data (in iCalendar 2.0 format)
# text/x-todo = Evolution task data (iCalendar 2.0)
# text/x-journal = Evolution memos (iCalendar 2.0)
# text/x-vcard = Evolution contact data in vCard 2.1 format
# (works with most servers)
# test/vcard = Evolution contact data in vCard 3.0 (RFC 2425) format

View File

@ -111,8 +111,8 @@ class EvolutionCalendarSource : public EvolutionSyncSource
/** returns the type which the ical library uses for our components */
icalcomponent_kind getCompType() {
return m_type == E_CAL_SOURCE_TYPE_EVENT ?
ICAL_VEVENT_COMPONENT :
return m_type == E_CAL_SOURCE_TYPE_EVENT ? ICAL_VEVENT_COMPONENT :
m_type == E_CAL_SOURCE_TYPE_JOURNAL ? ICAL_VJOURNAL_COMPONENT :
ICAL_VTODO_COMPONENT;
}

View File

@ -141,6 +141,12 @@ EvolutionSyncSource *EvolutionSyncSource::createSource(
return new EvolutionCalendarSource(E_CAL_SOURCE_TYPE_TODO, name, sc, strippedChangeId, id);
#else
LOG.error("access to calendars not compiled into this binary, text/x-todo not supported");
#endif
} else if (mimeType == "text/x-journal") {
#ifdef ENABLE_ECAL
return new EvolutionCalendarSource(E_CAL_SOURCE_TYPE_JOURNAL, name, sc, strippedChangeId, id);
#else
LOG.error("access to memos not compiled into this binary, text/x-journal not supported");
#endif
} else if (mimeType == "text/calendar" ||
mimeType == "text/x-vcalendar") {

View File

@ -97,6 +97,12 @@ int main( int argc, char **argv )
string("list"),
NULL);
listSources(todoSource, "tasks");
cout << "\n";
EvolutionCalendarSource journalSource(E_CAL_SOURCE_TYPE_JOURNAL,
string("list"),
NULL);
listSources(todoSource, "memos");
#endif
fprintf( stderr, "\nusage: %s <server>\n", argv[0] );