diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2010-02-01 17:03:18 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2010-02-02 15:34:22 +0100 |
commit | 097e31ff14e3fe545d250b4a66196691b927c9f6 (patch) | |
tree | c7001c0c5ed0317f8cd4c116ca29e96e14f0a586 | |
parent | d60930129610d3ba4c4f24dbc9d6e267cc4b2c72 (diff) |
XML config samples: split up into individual fragmentssynthesis-xml-fragments
The sample configs contain common elements (datatypes, scripts, remote
rules, debug settings) which are maintained as separate files in the
corresponding directories. When modifying those common elements, run
"update-samples.pl" in this directory to update the sample configs.
The complete samples are under version control for several reasons:
1. avoid dependency on Perl unless common elements need to be updated
2. effect of changes on complete config show up in patches
3. the file layout and unshared parts (<client> and <server>) are
determined by the sample configs
The naming of common elements determines the order in which they get
inserted. Files not ending in .xml are ignored. Elements that only
apply to a client or server are stored in the corresponding sub
directories, while the shared elements are in the
"debug/scripting/datatypes/remoterules".
It is a somewhat subjective choice which elements are stored in one
file and which ones are split up. The three elements of a datatype
definition (field list, profile, datatype) where split up because
there might be multiple different profiles using the same field list
and some users of these files might want to replace the default one.
This patch unifies some definitions in client and servers. These
user-visible changes are:
- <folding>auto</folding> and <disable option="match"/> added to client
- unused SYNCLVL field added to client
- bookmark CATEGORIES definition in client updated to the more versatile
one from the server
- minor white space and comment changes
- "note" -> "note10", "vbookmark" -> "vBookmark", "vbookmark" -> "vBookmark10"
renames in server to be consistent with client
As Lukas pointed out, the email scripts and datatypes are server
specific because they depend on server-only methods. A normal client
doesn't need them anyway resp. has to implement email support
differently.
libsynthesis commit ID:
3decb42564f2cc62f56ca3249b7d383664ec191d
71 files changed, 2375 insertions, 0 deletions
diff --git a/src/syncevo/configs/README b/src/syncevo/configs/README new file mode 100644 index 00000000..ea01f5ca --- /dev/null +++ b/src/syncevo/configs/README @@ -0,0 +1,22 @@ +The sample configs contain common elements (datatypes, scripts, remote +rules, debug settings) which are maintained as separate files in the +corresponding directories. When modifying those common elements, run +"update-samples.pl" in this directory to update the sample configs. + +The complete samples are under version control for several reasons: +1. avoid dependency on Perl unless common elements need to be updated +2. effect of changes on complete config show up in patches +3. the file layout and unshared parts (<client> and <server>) are + determined by the sample configs + +The naming of common elements determines the order in which they get +inserted. Files not ending in .xml are ignored. Elements that only +apply to a client or server are stored in the corresponding sub +directories, while the shared elements are in the +"debug/scripting/datatypes/remoterules". + +It is a somewhat subjective choice which elements are stored in one +file and which ones are split up. The three elements of a datatype +definition (field list, profile, datatype) where split up because +there might be multiple different profiles using the same field list +and some users of these files might want to replace the default one. diff --git a/src/syncevo/configs/datatypes/00vcard-fieldlist.xml b/src/syncevo/configs/datatypes/00vcard-fieldlist.xml new file mode 100644 index 00000000..93f57921 --- /dev/null +++ b/src/syncevo/configs/datatypes/00vcard-fieldlist.xml @@ -0,0 +1,64 @@ + <!-- list of internal fields representing vCard data --> + <fieldlist name="contacts"> + <field name="SYNCLVL" type="integer" compare="never"/> + <field name="REV" type="timestamp" compare="never" age="yes"/> + + <!-- Name elements --> + <field name="N_LAST" type="string" compare="always"/> + <field name="N_FIRST" type="string" compare="always"/> + <field name="N_MIDDLE" type="string" compare="always"/> + <field name="N_PREFIX" type="string" compare="conflict"/> + <field name="N_SUFFIX" type="string" compare="conflict"/> + <field name="NICKNAME" type="string" compare="conflict"/> + <field name="TITLE" type="string" compare="conflict" merge="fillempty"/> + + <field name="FN" type="string" compare="conflict" merge="fillempty"/> + + <!-- categories and classification --> + <field name="CATEGORIES" array="yes" type="string" compare="conflict"/> + + <!-- organisation --> + <field name="ORG_NAME" type="string" compare="slowsync" merge="fillempty"/> + <field name="ORG_DIVISION" type="string" compare="conflict" merge="fillempty"/> + + <!-- birthday --> + <field name="BDAY" type="date" compare="conflict" merge="fillempty"/> + + <!-- telephone numbers --> + <field name="TEL" array="yes" type="telephone" compare="conflict"/> + <field name="TEL_FLAGS" array="yes" type="integer" compare="conflict"/> <!-- offset 0 --> + <field name="TEL_LABEL" array="yes" type="string" compare="conflict"/> <!-- offset 1 --> + <field name="TEL_ID" array="yes" type="integer" compare="conflict"/> <!-- offset 2 --> + + <!-- emails --> + <field name="EMAIL" array="yes" type="multiline" compare="conflict"/> + <field name="EMAIL_FLAGS" array="yes" type="integer" compare="conflict"/> <!-- offset 0 --> + <field name="EMAIL_LABEL" array="yes" type="string" compare="conflict"/> <!-- offset 1 --> + <field name="EMAIL_ID" array="yes" type="integer" compare="conflict"/> <!-- offset 2 --> + + <!-- web addresses --> + <field name="WEB" array="yes" type="url" compare="conflict"/> + <field name="WEB_FLAGS" array="yes" type="integer" compare="conflict"/> <!-- offset 0 --> + <field name="WEB_LABEL" array="yes" type="string" compare="conflict"/> <!-- offset 1 --> + <field name="WEB_ID" array="yes" type="integer" compare="conflict"/> <!-- offset 2 --> + + <!-- home address --> + <field name="ADR_STREET" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_ADDTL" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_STREET_FLAGS" array="yes" type="integer" compare="conflict"/> <!-- offset 0 (from ADR_STREET_FLAGS) --> + <field name="ADR_STREET_LABEL" array="yes" type="string" compare="conflict"/> <!-- offset 1 --> + <field name="ADR_STREET_ID" array="yes" type="integer" compare="conflict"/> <!-- offset 2 --> + <field name="ADR_POBOX" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_CITY" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_REG" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_ZIP" array="yes" type="multiline" compare="conflict"/> + <field name="ADR_COUNTRY" array="yes" type="multiline" compare="conflict"/> + + <!-- Note --> + <field name="NOTE" type="multiline" compare="conflict" merge="lines"/> + + <!-- Photo --> + <field name="PHOTO" type="blob" compare="never" merge="fillempty"/> + <field name="PHOTO_TYPE" type="integer" compare="never" merge="fillempty"/> + + </fieldlist> diff --git a/src/syncevo/configs/datatypes/01vcard-profile.xml b/src/syncevo/configs/datatypes/01vcard-profile.xml new file mode 100644 index 00000000..8c012214 --- /dev/null +++ b/src/syncevo/configs/datatypes/01vcard-profile.xml @@ -0,0 +1,138 @@ + <!-- vCard profile --> + <mimeprofile name="vCard" fieldlist="contacts"> + + <profile name="VCARD" nummandatory="0"> <!-- we allow records without "N" as Address book can store them --> + <property name="VERSION"> + <value conversion="version"/> + </property> + + <property onlyformode="standard" name="PRODID" mandatory="no"> + <value conversion="prodid"/> + </property> + + <property name="REV"> + <value field="REV"/> + </property> + + <property name="N" values="5" mandatory="yes"> <!-- Note: makes N parse and generate even if not in remote's CTCap --> + <value index="0" field="N_LAST"/> + <value index="1" field="N_FIRST"/> + <value index="2" field="N_MIDDLE"/> + <value index="3" field="N_PREFIX"/> + <value index="4" field="N_SUFFIX"/> + </property> + + <property name="FN"> + <value field="FN"/> + </property> + + <property name="NICKNAME" onlyformode="standard"> + <value field="NICKNAME"/> + </property> + + <property name="TITLE"> + <value field="TITLE"/> + </property> + + <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";" > <!-- non-standard, but 1:1 as in vCard 3.0 (NOT like in vCalendar 1.0, where separator is ";") --> + <value field="CATEGORIES"/> + <position field="CATEGORIES" repeat="array" increment="1" minshow="0"/> + </property> + + <property name="ORG" values="2"> + <value index="0" field="ORG_NAME"/> + <value index="1" field="ORG_DIVISION"/> + </property> + + <property name="TEL"> + <value field="TEL"/> + <position field="TEL" repeat="array" increment="1" minshow="1"/> + <parameter name="TYPE" default="yes" positional="no" show="yes"> + <value field="TEL_FLAGS" conversion="multimix" combine=","> + <enum name="HOME" value="B0"/> + <enum name="WORK" value="B1"/> + <enum mode="ignore" value="B2"/> <!-- OTHER --> + <enum name="VOICE" value="B3"/> + <enum name="CELL" value="B4"/> + <enum name="FAX" value="B5"/> + <enum name="PAGER" value="B6"/> + <enum name="PREF" value="B7"/> + + <enum mode="prefix" name="X-CustomLabel-" value="1.L"/> + <enum mode="prefix" name="X-Synthesis-Ref" value="2.L"/> + </value> + </parameter> + </property> + + <property name="EMAIL"> + <value field="EMAIL"/> + <position field="EMAIL" repeat="array" increment="1" minshow="1"/> + <parameter name="TYPE" default="yes" positional="no" show="yes"> + <value field="EMAIL_FLAGS" conversion="multimix" combine=","> + <enum name="HOME" value="B0"/> + <enum name="WORK" value="B1"/> + <enum mode="ignore" value="B2"/> <!-- OTHER --> + <enum name="INTERNET" value="B3"/> + + <enum mode="prefix" name="X-CustomLabel-" value="1.L"/> + <enum mode="prefix" name="X-Synthesis-Ref" value="2.L"/> + </value> + </parameter> + </property> + + <property name="URL"> + <value field="WEB"/> + <position field="WEB" repeat="array" increment="1" minshow="1"/> + <parameter name="TYPE" default="yes" positional="no" show="yes"> + <value field="WEB_FLAGS" conversion="multimix" combine=","> + <enum name="HOME" value="B0"/> + <enum name="WORK" value="B1"/> + <enum mode="ignore" value="B2"/> <!-- OTHER --> + <enum name="PREF" value="B3"/> + + <enum mode="prefix" name="X-CustomLabel-" value="1.L"/> + <enum mode="prefix" name="X-Synthesis-Ref" value="2.L"/> + </value> + </parameter> + </property> + + <property name="ADR" values="7"> + <value index="0" field="ADR_POBOX"/> + <value index="1" field="ADR_ADDTL"/> + <value index="2" field="ADR_STREET"/> + <value index="3" field="ADR_CITY"/> + <value index="4" field="ADR_REG"/> + <value index="5" field="ADR_ZIP"/> + <value index="6" field="ADR_COUNTRY"/> + <position field="ADR_POBOX" repeat="array" increment="1" minshow="1"/> + <parameter name="TYPE" default="yes" positional="no" show="yes"> + <value field="ADR_STREET_FLAGS" conversion="multimix" combine=","> + <enum name="HOME" value="B0"/> + <enum name="WORK" value="B1"/> + <enum mode="ignore" value="B2"/> <!-- OTHER --> + + <enum mode="prefix" name="X-CustomLabel-" value="1.L"/> + <enum mode="prefix" name="X-Synthesis-Ref" value="2.L"/> + </value> + </parameter> + </property> + + <property name="BDAY"> + <value field="BDAY"/> + </property> + + <property name="NOTE" filter="no"> + <value field="NOTE"/> + </property> + + <property name="PHOTO" filter="no"> + <value field="PHOTO" conversion="BLOB_B64"/> + <parameter name="TYPE" default="no" show="yes"> + <value field="PHOTO_TYPE"> + <enum name="JPEG" value="0"/> + </value> + </parameter> + </property> + + </profile> + </mimeprofile> diff --git a/src/syncevo/configs/datatypes/02vcard-types.xml b/src/syncevo/configs/datatypes/02vcard-types.xml new file mode 100644 index 00000000..36515ad8 --- /dev/null +++ b/src/syncevo/configs/datatypes/02vcard-types.xml @@ -0,0 +1,13 @@ + + + <!-- vCard 2.1 datatype, using vCard profile defined above --> + <datatype name="vCard21" basetype="vcard"> + <version>2.1</version> + <use mimeprofile="vCard"/> + </datatype> + + <!-- vCard 3.0 datatype, using vCard profile defined above --> + <datatype name="vCard30" basetype="vcard"> + <version>3.0</version> + <use mimeprofile="vCard"/> + </datatype> diff --git a/src/syncevo/configs/datatypes/10calendar-fieldlist.xml b/src/syncevo/configs/datatypes/10calendar-fieldlist.xml new file mode 100644 index 00000000..58586692 --- /dev/null +++ b/src/syncevo/configs/datatypes/10calendar-fieldlist.xml @@ -0,0 +1,65 @@ + <!-- common field list for events and todos (both represented by vCalendar/iCalendar) --> + <fieldlist name="calendar"> + <field name="SYNCLVL" type="integer" compare="never"/> + <field name="ISEVENT" type="integer" compare="always"/> + + <field name="DMODIFIED" type="timestamp" compare="never" age="yes"/> + <field name="DCREATED" type="timestamp" compare="never"/> + + <field name="DGENERATED" type="timestamp" compare="never"/> + + <field name="UID" type="string" compare="never"/> + + <field name="CATEGORIES" array="yes" type="string" compare="conflict" merge="fillempty"/> + <field name="CLASS" type="integer" compare="conflict" merge="fillempty"/> + <field name="TRANSP" type="integer" compare="conflict" merge="fillempty"/> + + <field name="SUMMARY" type="multiline" compare="always"/> + <field name="DESCRIPTION" type="multiline" compare="slowsync" merge="lines"/> + <field name="LOCATION" type="multiline" compare="slowsync" merge="lines"/> + + <!-- recurrence rule block, fields must be in that order, including + DTSTART as last field !! --> + <field name="RR_FREQ" type="string" compare="conflict"/> + <field name="RR_INTERVAL" type="integer" compare="conflict"/> + <field name="RR_FMASK" type="integer" compare="conflict"/> + <field name="RR_LMASK" type="integer" compare="conflict"/> + <field name="RR_END" type="timestamp" compare="conflict"/> + + <!-- Note: DTSTART/DTEND are compared in the <comparescript>, + therefore compare is set no "never" here --> + <field name="DTSTART" type="timestamp" compare="never"/> + <field name="DTEND" type="timestamp" compare="never"/> + <field name="DURATION" type="timestamp" compare="never"/> + <field name="COMPLETED" type="timestamp" compare="never"/> + <field name="DUE" type="timestamp" compare="never"/> + + <field name="GEO_LAT" type="string" compare="never"/> + <field name="GEO_LONG" type="string" compare="never"/> + + <field name="PRIORITY" type="integer" compare="conflict"/> + <field name="STATUS" type="integer" compare="conflict" merge="fillempty"/> + + <field name="ALARM_TIME" type="timestamp" compare="conflict"/> + <field name="ALARM_SNOOZE" type="string" compare="conflict"/> + <field name="ALARM_REPEAT" type="string" compare="conflict"/> + <field name="ALARM_MSG" type="string" compare="conflict"/> + <field name="ALARM_ACTION" type="string" compare="conflict"/> + <field name="ALARM_REL" type="integer" compare="never"/> + + <!-- non-standard --> + <field name="PARENT_UID" type="string" compare="never"/> + + <!-- for events --> + <field name="EXDATES" array="yes" type="timestamp" compare="never"/> + + <field name="ORIGSTART" array="no" type="timestamp" compare="never"/> + <field name="SEQNO" array="no" type="integer" compare="never"/> + + <field name="ATTENDEES" array="yes" type="string" compare="never"/> + <field name="ATTENDEE_CNS" array="yes" type="string" compare="never"/> + <field name="ATTENDEE_PARTSTATS" array="yes" type="integer" compare="never"/> + <field name="ORGANIZER" array="no" type="string" compare="never"/> + <field name="ORGANIZER_CN" array="no" type="string" compare="never"/> + + </fieldlist> diff --git a/src/syncevo/configs/datatypes/11calendar-profile.xml b/src/syncevo/configs/datatypes/11calendar-profile.xml new file mode 100644 index 00000000..b7d788a4 --- /dev/null +++ b/src/syncevo/configs/datatypes/11calendar-profile.xml @@ -0,0 +1,456 @@ + <!-- vCalendar with VTODO and VEVENT variants --> + <mimeprofile name="vCalendar" fieldlist="calendar"> + + <vtimezonegenmode>current</vtimezonegenmode> + <tzidgenmode>olson</tzidgenmode> + + <profile name="VCALENDAR" nummandatory="1"> + + <property name="VERSION" mandatory="yes"> + <value conversion="version"/> + </property> + + <property onlyformode="standard" name="PRODID" mandatory="no"> + <value conversion="prodid"/> + </property> + + <property onlyformode="old" name="TZ" filter="false" suppressempty="yes"> + <value field="DTSTART" conversion="tz"/> + </property> + + <property onlyformode="old" name="DAYLIGHT" mode="daylight" filter="false" suppressempty="yes"> + <value field="DTSTART" conversion="daylight"/> + </property> + + <property name="GEO" values="2" suppressempty="yes" onlyformode="old" valueseparator=","> + <!-- LON,LAT in vCalendar 1.0 --> + <value index="0" field="GEO_LAT"/> + <value index="1" field="GEO_LONG"/> + </property> + + <subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/> + + <!-- sub-profile for tasks --> + <subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0"> + + <property name="LAST-MODIFIED"> + <value field="DMODIFIED"/> + </property> + + <property name="DTSTAMP" suppressempty="yes" onlyformode="standard"> + <value field="DGENERATED"/> + </property> + + <property name="DCREATED" suppressempty="yes" onlyformode="old"> + <value field="DCREATED"/> + </property> + <property name="CREATED" suppressempty="yes" onlyformode="standard"> + <value field="DCREATED"/> + </property> + + <property name="UID" suppressempty="yes"> + <value field="UID"/> + </property> + + <property name="SEQUENCE" suppressempty="yes"> + <value field="SEQNO"/> + </property> + + <property name="GEO" values="2" suppressempty="yes" onlyformode="standard" valueseparator=";"> + <!-- LAT;LON in iCalendar 2.0 --> + <value index="0" field="GEO_LONG"/> + <value index="1" field="GEO_LAT"/> + </property> + + <property onlyformode="standard" name="CATEGORIES" values="list" valueseparator="," suppressempty="yes"> + <value field="CATEGORIES" /> + <position field="CATEGORIES" repeat="array" minshow="0"/> + </property> + + <property onlyformode="old" name="CATEGORIES" values="list" valueseparator=";" altvalueseparator="," suppressempty="yes"> + <value field="CATEGORIES" /> + <position field="CATEGORIES" repeat="array" minshow="0"/> + </property> + + <property name="CLASS" suppressempty="yes"> + <value field="CLASS"> + <enum name="PUBLIC" value="0"/> + <enum name="PRIVATE" value="1"/> + <enum name="CONFIDENTIAL" value="2"/> + </value> + </property> + + <property name="SUMMARY" mandatory="yes"> + <value field="SUMMARY"/> + </property> + + <property name="DESCRIPTION" mandatory="yes"> + <value field="DESCRIPTION"/> + </property> + + <property name="LOCATION" mandatory="no"> + <value field="LOCATION"/> + </property> + + <property name="DTSTART" suppressempty="yes" delayedparsing="1"> + <value field="DTSTART" conversion="autodate"/> + <parameter onlyformode="standard" name="TZID" default="no" show="yes"> + <value field="DTSTART" conversion="TZID"/> + </parameter> + <parameter onlyformode="standard" name="VALUE" default="no" show="yes"> + <value field="DTSTART" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="COMPLETED" suppressempty="yes" delayedparsing="1"> + <value field="COMPLETED" conversion="autoenddate"/> + <parameter onlyformode="standard" name="TZID" default="no" show="yes"> + <value field="COMPLETED" conversion="TZID"/> + </parameter> + <parameter onlyformode="standard" name="VALUE" default="no" show="yes"> + <value field="COMPLETED" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="DUE" suppressempty="yes" delayedparsing="1"> + <value field="DUE" conversion="autodate"/> + <parameter onlyformode="standard" name="TZID" default="no" show="yes"> + <value field="DUE" conversion="TZID"/> + </parameter> + <parameter onlyformode="standard" name="VALUE" default="no" show="yes"> + <value field="DUE" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="PRIORITY" suppressempty="yes"> + <value field="PRIORITY"/> + </property> + + <property name="STATUS" onlyformode="standard" suppressempty="yes"> + <value field="STATUS" conversion="emptyonly"> + <enum name="COMPLETED" value="0"/> + <enum name="NEEDS-ACTION" value="1"/> + <enum name="IN-PROCESS" value="2"/> + <enum name="CANCELLED" value="3"/> + <enum name="ACCEPTED" value="4"/> + <enum name="TENTATIVE" value="5"/> + <enum name="DELEGATED" value="6"/> + <enum name="DECLINED" value="7"/> + <enum name="SENT" value="8"/> + <enum name="CONFIRMED" value="9"/> + <enum name="DRAFT" value="10"/> + <enum name="FINAL" value="11"/> + </value> + </property> + + <property name="STATUS" onlyformode="old" suppressempty="yes"> + <value field="STATUS" conversion="emptyonly"> + <enum name="COMPLETED" value="0"/> + <enum name="NEEDS ACTION" value="1"/> + <enum mode="defaultvalue" value="1"/> <!-- catch unknown, but also non-conformant NEEDS_ACTION --> + <enum name="IN PROCESS" value="2"/> + <enum name="CANCELLED" value="3"/> + <enum name="ACCEPTED" value="4"/> + <enum name="TENTATIVE" value="5"/> + <enum name="DELEGATED" value="6"/> + <enum name="DECLINED" value="7"/> + <enum name="SENT" value="8"/> + <enum name="CONFIRMED" value="9"/> + <enum name="DRAFT" value="10"/> + <enum name="FINAL" value="11"/> + </value> + </property> + + + <!-- AALARM and DALARM both use the same fields --> + <property name="AALARM" onlyformode="old" values="4" suppressempty="yes"> + <value index="0" field="ALARM_TIME" conversion="emptyonly"/> + <value index="1" field="ALARM_SNOOZE" conversion="emptyonly"/> + <value index="2" field="ALARM_REPEAT" conversion="emptyonly"/> + <value index="3" field="ALARM_MSG" conversion="emptyonly"/> + </property> + <property name="DALARM" onlyformode="old" values="4" suppressempty="yes"> + <value index="0" field="ALARM_TIME" conversion="emptyonly"/> + <value index="1" field="ALARM_SNOOZE" conversion="emptyonly"/> + <value index="2" field="ALARM_REPEAT" conversion="emptyonly"/> + <value index="3" field="ALARM_MSG" conversion="emptyonly"/> + </property> + + <subprofile onlyformode="standard" name="VALARM" nummandatory="1" field="ALARM_TIME"> + <property name="TRIGGER" suppressempty="no" mandatory="yes"> + <value field="ALARM_TIME"/> + <parameter name="VALUE" default="no" show="yes"> + <value field="ALARM_TIME" conversion="FULLVALUETYPE"/> + </parameter> + <parameter name="RELATED" default="no" show="yes"> + <value field="ALARM_REL"> + <enum mode="ignore" value="0"/> + <enum name="START" value="1"/> + <enum name="END" value="2"/> + </value> + </parameter> + </property> + <property name="ACTION" suppressempty="yes" mandatory="yes"> + <value field="ALARM_ACTION"/> + </property> + <property name="DESCRIPTION" suppressempty="yes"> + <value field="ALARM_MSG"/> + </property> + <property name="REPEAT" suppressempty="yes"> + <value field="ALARM_REPEAT"/> + </property> + </subprofile> + + <property onlyformode="old" name="RELATED-TO" suppressempty="yes"> + <value field="PARENT_UID"/> + </property> + + <property onlyformode="standard" name="RELATED-TO" suppressempty="yes"> + <value field="PARENT_UID"/> + <parameter onlyformode="standard" name="RELTYPE" default="no" positional="yes" show="yes"> + <value> + <enum name="PARENT"/> + <enum mode="defaultvalue" name="other"/> + </value> + <position hasnot="other" shows="PARENT" field="PARENT_UID"/> + </parameter> + </property> + + </subprofile> + + <!-- sub-profile for event --> + <subprofile name="VEVENT" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="1"> + + <property name="LAST-MODIFIED"> + <value field="DMODIFIED"/> + </property> + + <property name="DTSTAMP" suppressempty="yes" onlyformode="standard"> + <value field="DGENERATED"/> + </property> + + <property name="DCREATED" suppressempty="yes" onlyformode="old"> + <value field="DCREATED"/> + </property> + <property name="CREATED" suppressempty="yes" onlyformode="standard"> + <value field="DCREATED"/> + </property> + + + <property name="UID" suppressempty="yes"> + <value field="UID"/> + </property> + + <property name="SEQUENCE" suppressempty="yes"> + <value field="SEQNO"/> + </property> + + <property name="GEO" values="2" suppressempty="yes" onlyformode="standard" valueseparator=";"> + <!-- LAT;LON in iCalendar 2.0 --> + <value index="0" field="GEO_LONG"/> + <value index="1" field="GEO_LAT"/> + </property> + + <property onlyformode="standard" name="CATEGORIES" values="list" valueseparator="," suppressempty="yes"> + <value field="CATEGORIES" /> + <position field="CATEGORIES" repeat="array" minshow="0"/> + </property> + + <property onlyformode="old" name="CATEGORIES" values="list" valueseparator=";" altvalueseparator="," suppressempty="yes"> + <value field="CATEGORIES" /> + <position field="CATEGORIES" repeat="array" minshow="0"/> + </property> + + <property name="CLASS" suppressempty="yes"> + <value field="CLASS"> + <enum name="PUBLIC" value="0"/> + <enum name="PRIVATE" value="1"/> + <enum name="CONFIDENTIAL" value="2"/> + </value> + </property> + + + <property name="TRANSP" suppressempty="yes" onlyformode="standard"> + <value field="TRANSP"> + <enum name="OPAQUE" value="0"/> + <enum name="TRANSPARENT" value="1"/> + <enum name="TENTATIVE" value="2"/> <!-- according to Oracle de facto usage in vCalendar 1.0 --> + <enum name="OUT_OF_OFFICE" value="3"/> <!-- according to Oracle de facto usage in vCalendar 1.0 --> + <enum mode="defaultvalue" value="0"/> + </value> + </property> + <property name="TRANSP" suppressempty="yes" onlyformode="old"> + <value field="TRANSP"/> <!-- directly numeric in vCalendar 1.0 --> + </property> + + + <property name="PRIORITY" suppressempty="yes"> + <value field="PRIORITY"/> + </property> + + <property name="SUMMARY" mandatory="yes"> + <value field="SUMMARY"/> + </property> + + <property name="DESCRIPTION" mandatory="yes"> + <value field="DESCRIPTION"/> + </property> + + <property name="LOCATION" mandatory="no"> + <value field="LOCATION"/> + </property> + + <property name="DTSTART" suppressempty="yes" delayedparsing="1"> + <value field="DTSTART" conversion="autodate"/> + <parameter onlyformode="standard" name="TZID" default="no" show="yes"> + <value field="DTSTART" conversion="TZID"/> + </parameter> + <parameter onlyformode="standard" name="VALUE" default="no" show="yes"> + <value field="DTSTART" conversion="VALUETYPE"/> + </parameter> + </property> + + <!-- recurrence rule (with delayed parsing, as it is dependent on DTSTART) --> + <property name="RRULE" suppressempty="yes" delayedparsing="2"> + <!-- Note: RR_FREQ is the beginning of a block of fields + suitable for the "rrule" conversion mode --> + <value field="RR_FREQ" conversion="rrule"/> + </property> + + <!-- Symbian uses this, so it might make the client work with symbian-prepared servers better --> + <property name="X-RECURRENCE-ID" suppressempty="yes" onlyformode="old"> + <value field="ORIGSTART" conversion="autodate"/> + </property> + + <property name="RECURRENCE-ID" suppressempty="yes" onlyformode="standard" delayedparsing="1"> + <value field="ORIGSTART" conversion="autodate"/> + <parameter name="TZID" default="no" show="yes"> + <value field="ORIGSTART" conversion="TZID"/> + </parameter> + <parameter name="VALUE" default="no" show="yes"> + <value field="ORIGSTART" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="EXDATE" values="list" suppressempty="yes" onlyformode="standard" delayedparsing="1" valueseparator="," altvalueseparator=";"> + <value field="EXDATES"/> + <position field="EXDATES" repeat="array" increment="1" minshow="0"/> + <parameter name="TZID" default="no" show="yes"> + <value field="EXDATES" conversion="TZID"/> + </parameter> + </property> + + <property name="EXDATE" values="list" suppressempty="yes" onlyformode="old" delayedparsing="1" valueseparator=";" altvalueseparator=","> + <value field="EXDATES"/> + <position field="EXDATES" repeat="array" increment="1" minshow="0"/> + </property> + + + <property name="DTEND" suppressempty="yes" delayedparsing="1"> + <value field="DTEND" conversion="autoenddate"/> + <parameter onlyformode="standard" name="TZID" default="no" show="yes"> + <value field="DTEND" conversion="TZID"/> + </parameter> + <parameter onlyformode="standard" name="VALUE" default="no" show="yes"> + <value field="DTEND" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="DURATION" suppressempty="yes" delayedparsing="1" onlyformode="standard"> + <value field="DURATION"/> + <parameter onlyformode="standard" name="VALUE" default="no" show="no"> + <value field="DURATION" conversion="VALUETYPE"/> + </parameter> + </property> + + <property name="ATTENDEE" suppressempty="yes" onlyformode="old"> + <value field="ATTENDEES"/> + <parameter name="ROLE" default="no" positional="yes" show="yes"> + <value> + <enum name="ORGANIZER"/> + </value> + <position has="ORGANIZER" field="ORGANIZER" overwriteempty="yes"/> + <position hasnot="ORGANIZER" field="ATTENDEES" repeat="array" increment="1" overwriteempty="yes"/> + </parameter> + <parameter name="STATUS" default="no" show="yes"> + <value field="ATTENDEE_PARTSTATS"> + <enum name="NEEDS ACTION" value="1"/> + <enum mode="defaultvalue" value="1"/> <!-- catch unknown, but also non-conformant NEEDS_ACTION --> + <enum name="ACCEPTED" value="4"/> + <enum name="DECLINED" value="7"/> + <enum name="TENTATIVE" value="5"/> + <enum name="DELEGATED" value="6"/> + </value> + </parameter> + </property> + + <property name="ATTENDEE" suppressempty="yes" onlyformode="standard"> + <value field="ATTENDEES" conversion="mailto"/> + <position field="ATTENDEES" repeat="array" increment="1" minshow="0"/> + <parameter name="CN" default="no" show="yes" shownonempty="yes"> + <value field="ATTENDEE_CNS"/> + </parameter> + <parameter name="PARTSTAT" default="no" show="yes"> + <value field="ATTENDEE_PARTSTATS"> + <enum name="NEEDS-ACTION" value="1"/> + <enum mode="defaultvalue" value="1"/> <!-- catch unknown, but also non-conformant NEEDS_ACTION --> + <enum name="ACCEPTED" value="4"/> + <enum name="DECLINED" value="7"/> + <enum name="TENTATIVE" value="5"/> + <enum name="DELEGATED" value="6"/> + </value> + </parameter> + </property> + + <property name="ORGANIZER" suppressempty="yes" onlyformode="standard"> + <value field="ORGANIZER" conversion="mailto"/> + <parameter name="CN" default="no" show="yes"> + <value field="ORGANIZER_CN"/> + </parameter> + </property> + + + <!-- AALARM and DALARM both use the same fields --> + <property name="AALARM" onlyformode="old" values="4" suppressempty="yes"> + <value index="0" field="ALARM_TIME" conversion="emptyonly"/> + <value index="1" field="ALARM_SNOOZE" conversion="emptyonly"/> + <value index="2" field="ALARM_REPEAT" conversion="emptyonly"/> + <value index="3" field="ALARM_MSG" conversion="emptyonly"/> + </property> + <property name="DALARM" onlyformode="old" values="4" suppressempty="yes"> + <value index="0" field="ALARM_TIME" conversion="emptyonly"/> + <value index="1" field="ALARM_SNOOZE" conversion="emptyonly"/> + <value index="2" field="ALARM_REPEAT" conversion="emptyonly"/> + <value index="3" field="ALARM_MSG" conversion="emptyonly"/> + </property> + + <subprofile onlyformode="standard" name="VALARM" nummandatory="1" field="ALARM_TIME"> + <property name="TRIGGER" suppressempty="no" mandatory="yes"> + <value field="ALARM_TIME"/> + <parameter name="VALUE" default="no" show="yes"> + <value field="ALARM_TIME" conversion="FULLVALUETYPE"/> + </parameter> + <parameter name="RELATED" default="no" show="yes"> + <value field="ALARM_REL"> + <enum mode="ignore" value="0"/> + <enum name="START" value="1"/> + <enum name="END" value="2"/> + </value> + </parameter> + </property> + <property name="ACTION" suppressempty="yes" mandatory="yes"> + <value field="ALARM_ACTION"/> + </property> + <property name="DESCRIPTION" suppressempty="yes"> + <value field="ALARM_MSG"/> + </property> + <property name="REPEAT" suppressempty="yes"> + <value field="ALARM_REPEAT"/> + </property> + </subprofile> + + </subprofile> + + </profile> + </mimeprofile> + diff --git a/src/syncevo/configs/datatypes/12calendar-types.xml b/src/syncevo/configs/datatypes/12calendar-types.xml new file mode 100644 index 00000000..15c64c08 --- /dev/null +++ b/src/syncevo/configs/datatypes/12calendar-types.xml @@ -0,0 +1,31 @@ + <!-- vCalendar 1.0 datatype, using vCalendar profile defined above --> + <datatype name="vCalendar10" basetype="vcalendar"> + <version>1.0</version> + <use mimeprofile="vCalendar"/> + + <incomingscript><![CDATA[ + $VCALENDAR_INCOMING_SCRIPT + ]]></incomingscript> + + <outgoingscript><![CDATA[ + $VCALENDAR_OUTGOING_SCRIPT + ]]></outgoingscript> + + </datatype> + + + <!-- iCalendar 2.0 datatype, using vCalendar profile defined above --> + <datatype name="iCalendar20" basetype="vcalendar"> + <version>2.0</version> + <use mimeprofile="vCalendar"/> + + <incomingscript><![CDATA[ + $VCALENDAR_INCOMING_SCRIPT + ]]></incomingscript> + + <outgoingscript><![CDATA[ + $VCALENDAR_OUTGOING_SCRIPT + ]]></outgoingscript> + + </datatype> + diff --git a/src/syncevo/configs/datatypes/20note-fieldlist.xml b/src/syncevo/configs/datatypes/20note-fieldlist.xml new file mode 100644 index 00000000..8eda2a5d --- /dev/null +++ b/src/syncevo/configs/datatypes/20note-fieldlist.xml @@ -0,0 +1,7 @@ + <!-- list of internal fields representing plain text note data --> + <fieldlist name="Note"> + <field name="SYNCLVL" type="integer" compare="never"/> + <field name="SUBJECT" type="multiline" compare="always"/> + <field name="TEXT" type="multiline" compare="conflict" merge="lines"/> + </fieldlist> + diff --git a/src/syncevo/configs/datatypes/21note-profile.xml b/src/syncevo/configs/datatypes/21note-profile.xml new file mode 100644 index 00000000..8f5eb8c2 --- /dev/null +++ b/src/syncevo/configs/datatypes/21note-profile.xml @@ -0,0 +1,14 @@ + <textprofile name="Note" fieldlist="Note"> + <linemap field="SUBJECT"> + <numlines>1</numlines> + <inheader>false</inheader> + <allowempty>true</allowempty> + <filterkeyword>SUBJECT</filterkeyword> + </linemap> + <linemap field="TEXT"> + <numlines>0</numlines> + <inheader>false</inheader> + <allowempty>true</allowempty> + </linemap> + </textprofile> + diff --git a/src/syncevo/configs/datatypes/22notes-types.xml b/src/syncevo/configs/datatypes/22notes-types.xml new file mode 100644 index 00000000..ebd1dfdd --- /dev/null +++ b/src/syncevo/configs/datatypes/22notes-types.xml @@ -0,0 +1,12 @@ + <datatype name="note10" basetype="text"> + <use profile="Note"/> + <typestring>text/plain</typestring> + <versionstring>1.0</versionstring> + </datatype> + + <datatype name="note11" basetype="text"> + <use profile="Note"/> + <typestring>text/plain</typestring> + <versionstring>1.1</versionstring> + </datatype> + diff --git a/src/syncevo/configs/datatypes/30bookmark-fieldlist.xml b/src/syncevo/configs/datatypes/30bookmark-fieldlist.xml new file mode 100644 index 00000000..cde7c539 --- /dev/null +++ b/src/syncevo/configs/datatypes/30bookmark-fieldlist.xml @@ -0,0 +1,20 @@ + <!-- list of internal fields representing vBookmark data --> + <fieldlist name="bookmarks"> + <field name="REV" type="timestamp" compare="never" age="yes"/> + <field name="SYNCLVL" type="integer" compare="never"/> + + <!-- Name --> + <field name="TITLE" type="string" compare="always"/> + + <!-- categories and classification --> + <field name="CATEGORIES" type="string" compare="conflict" merge="fillempty"/> + <field name="CLASS" type="string" compare="conflict" merge="fillempty"/> + + <!-- web addresses --> + <field name="URL" type="url" compare="slowsync" merge="fillempty"/> + + <!-- Note --> + <field name="NOTE" type="multiline" compare="conflict" merge="lines"/> + + </fieldlist> + diff --git a/src/syncevo/configs/datatypes/31bookmark-profile.xml b/src/syncevo/configs/datatypes/31bookmark-profile.xml new file mode 100644 index 00000000..1f9b73a2 --- /dev/null +++ b/src/syncevo/configs/datatypes/31bookmark-profile.xml @@ -0,0 +1,38 @@ + <!-- vBookmark profile --> + <mimeprofile name="vBookmark" fieldlist="bookmarks"> + + <profile name="VBKM" nummandatory="0"> + <property name="VERSION"> + <value conversion="version"/> + </property> + + <property name="X-LAST-MODIFIED"> + <value field="REV"/> + </property> + + <property name="TITLE"> + <value field="TITLE"/> + </property> + + <property name="URL"> + <value field="URL"/> + </property> + + <!-- non-standard properties --> + + <!-- inherit CATEGORIES from vCard 3.0, i.e. comma separated --> + <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";"> + <value field="CATEGORIES" combine=","/> + </property> + + <property name="CLASS" suppressempty="yes"> + <value field="CLASS"/> + </property> + + <property name="NOTE" filter="no"> + <value field="NOTE"/> + </property> + + </profile> + </mimeprofile> + diff --git a/src/syncevo/configs/datatypes/32bookmark-type.xml b/src/syncevo/configs/datatypes/32bookmark-type.xml new file mode 100644 index 00000000..e7142ac6 --- /dev/null +++ b/src/syncevo/configs/datatypes/32bookmark-type.xml @@ -0,0 +1,7 @@ + <!-- vBookmark datatype, using vBookmark profile defined above --> + <datatype name="vBookmark10" basetype="mimedir"> + <typestring>text/x-vbookmark</typestring> + <versionstring>1.0</versionstring> + <use profile="vBookmark"/> + </datatype> + diff --git a/src/syncevo/configs/datatypes/server/40email-fieldlist.xml b/src/syncevo/configs/datatypes/server/40email-fieldlist.xml new file mode 100644 index 00000000..e3fb6a33 --- /dev/null +++ b/src/syncevo/configs/datatypes/server/40email-fieldlist.xml @@ -0,0 +1,24 @@ + <!-- list of internal fields representing email data --> + <fieldlist name="email"> + <field name="SYNCLVL" type="integer" compare="never"/> + <field name="MODIFIED" type="timestamp" compare="never" age="yes"/> + <field name="SENDER" type="multiline" compare="always"/> + <field name="RECEIVER" type="multiline" compare="always"/> + <field name="CARBONCOPY" type="multiline" compare="always"/> + <field name="BLINDCARBONCOPY" type="multiline" compare="always"/> + <field name="REPLY_TO" type="multiline" compare="never"/> + <field name="SUBJECT" type="multiline" compare="always"/> + <field name="PRIORITY" type="integer" compare="never"/> + <field name="MAILDATE" type="timestamp" compare="never"/> + <field name="STATUS" type="string" compare="never"/> + <field name="FOLDER" type="string" compare="conflict"/> + <field name="ISREAD" type="string" compare="never"/> + <field name="LIMIT" type="integer" compare="never"/> + <field name="BODY" type="multiline" compare="never"/> + <field name="ATT_COUNT" type="integer" compare="never"/> + <field name="ATT_NAMES" array="yes" type="string" compare="never"/> + <field name="ATT_MIMETYPES" array="yes" type="string" compare="never"/> + <field name="ATT_SIZES" array="yes" type="integer" compare="never"/> + <field name="ATT_CONTENTS" array="yes" type="blob" compare="never"/> + </fieldlist> + diff --git a/src/syncevo/configs/datatypes/server/41email-profile.xml b/src/syncevo/configs/datatypes/server/41email-profile.xml new file mode 100644 index 00000000..9f52d7b2 --- /dev/null +++ b/src/syncevo/configs/datatypes/server/41email-profile.xml @@ -0,0 +1,96 @@ + <!-- this is the text profile used to generate and decode RFC2822/MIME-Multipart + email messages. --> + <textprofile name="rfc2822_email" fieldlist="email"> + + <mimemail>true</mimemail> + <!-- attachment configuration --> + <maxattachments>100</maxattachments> + <attachmentcountfield>ATT_COUNT</attachmentcountfield> + <attachmentmimetypesfield>ATT_MIMETYPES</attachmentmimetypesfield> + <attachmentsfield>ATT_CONTENTS</attachmentsfield> + <attachmentsizesfield>ATT_SIZES</attachmentsizesfield> + <attachmentnamesfield>ATT_NAMES</attachmentnamesfield> + <sizelimitfield>LIMIT</sizelimitfield> + + + <linemap field="SENDER"> + <headertag>From:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + <filterkeyword>FROM</filterkeyword> + </linemap> + + <linemap field="RECEIVER"> + <headertag>To:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + <filterkeyword>TO</filterkeyword> + </linemap> + + <linemap field="CARBONCOPY"> + <headertag>Cc:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + <filterkeyword>CC</filterkeyword> + </linemap> + + <linemap field="BLINDCARBONCOPY"> + <headertag>Bcc:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + <filterkeyword>BCC</filterkeyword> + </linemap> + + <linemap field="REPLY_TO"> + <headertag>Reply-To:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + </linemap> + + <linemap field="SUBJECT"> + <headertag>Subject:</headertag> + <valuetype>rfc2047</valuetype> + <inheader>true</inheader> + <filterkeyword>SUBJECT</filterkeyword> + </linemap> + + <linemap field="PRIORITY"> + <headertag>X-Priority:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="MAILDATE"> + <valuetype>date</valuetype> + <headertag>Date:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="STATUS"> + <headertag>Status:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="FOLDER"> + <headertag>X-Sync-Parent-Folder:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="ISREAD"> + <headertag>X-Sync-Message-Read:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="MODIFIED"> + <!-- note that this is a ISO8601 date --> + <headertag>X-Sync-Lastmodified:</headertag> + <inheader>true</inheader> + </linemap> + + <linemap field="BODY"> + <valuetype>body</valuetype> + <numlines>0</numlines> + <inheader>false</inheader> + <allowempty>true</allowempty> + </linemap> + </textprofile> + diff --git a/src/syncevo/configs/datatypes/server/42email-type-zipped.xml b/src/syncevo/configs/datatypes/server/42email-type-zipped.xml new file mode 100644 index 00000000..c560f0d2 --- /dev/null +++ b/src/syncevo/configs/datatypes/server/42email-type-zipped.xml @@ -0,0 +1,43 @@ + <!-- Note: This is a proprietary extension datatype for Synthesis AG Windows Mobile SyncML clients. + This format is a compressed form of the standard RFC2822 format. For one, the entire data + is compressed using the zip algorithm (<zippedbindata>), and secondly attachments are included + in binary form in the RFC2822 data stream rather than bandwidth wasting B64, adding a + "Content-Length:" header for each MIME part (<binaryparts>). --> + + <datatype name="email_zipbin" basetype="text"> + <use profile="rfc2822_email"/> + <typestring>application/x-zip-message</typestring> <!-- our own private zipped binary optimized format --> + <versionstring>1.1</versionstring> + <binaryparts>yes</binaryparts> + <zippedbindata>yes</zippedbindata> + <zipcompressionlevel>9</zipcompressionlevel> <!-- -1=default, 0=no compression, 1=fast & least effective ... 9=slow and most effective --> + + <initscript><![CDATA[ + $EMAIL_INIT_SCRIPT + ]]></initscript> + + <processitemscript><![CDATA[ + $EMAIL_PROCESSITEM_SCRIPT + ]]></processitemscript> + + + <mergescript><![CDATA[ + $EMAIL_MERGE_SCRIPT + ]]></mergescript> + + + <outgoingscript><![CDATA[ + $EMAIL_OUTGOING_SCRIPT + ]]></outgoingscript> + + <filterinitscript><![CDATA[ + $EMAIL_FILTERINIT_SCRIPT + ]]></filterinitscript> + + + <filterscript><![CDATA[ + $EMAIL_FILTER_SCRIPT + ]]></filterscript> + + </datatype> + diff --git a/src/syncevo/configs/datatypes/server/42email-type.xml b/src/syncevo/configs/datatypes/server/42email-type.xml new file mode 100644 index 00000000..1dcdf740 --- /dev/null +++ b/src/syncevo/configs/datatypes/server/42email-type.xml @@ -0,0 +1,34 @@ + <datatype name="email" basetype="text"> + <use profile="rfc2822_email"/> + <typestring>text/message</typestring> <!-- this is P800-like --> + <versionstring>1.0</versionstring> + + <initscript><![CDATA[ + $EMAIL_INIT_SCRIPT + ]]></initscript> + + <processitemscript><![CDATA[ + $EMAIL_PROCESSITEM_SCRIPT + ]]></processitemscript> + + + <mergescript><![CDATA[ + $EMAIL_MERGE_SCRIPT + ]]></mergescript> + + + <outgoingscript><![CDATA[ + $EMAIL_OUTGOING_SCRIPT + ]]></outgoingscript> + + <filterinitscript><![CDATA[ + $EMAIL_FILTERINIT_SCRIPT + ]]></filterinitscript> + + + <filterscript><![CDATA[ + $EMAIL_FILTER_SCRIPT + ]]></filterscript> + + </datatype> + diff --git a/src/syncevo/configs/datatypes/server/43email-sonyericsson.xml b/src/syncevo/configs/datatypes/server/43email-sonyericsson.xml new file mode 100644 index 00000000..af492dff --- /dev/null +++ b/src/syncevo/configs/datatypes/server/43email-sonyericsson.xml @@ -0,0 +1,34 @@ + <datatype name="email_sonyericsson" basetype="text"> + <use profile="rfc2822_email"/> + <typestring>message/rfc822</typestring> <!-- this is M600i/P990-like --> + <versionstring>1.0</versionstring> + + <initscript><![CDATA[ + $EMAIL_INIT_SCRIPT + ]]></initscript> + + <processitemscript><![CDATA[ + $EMAIL_PROCESSITEM_SCRIPT + ]]></processitemscript> + + + <mergescript><![CDATA[ + $EMAIL_MERGE_SCRIPT + ]]></mergescript> + + + <outgoingscript><![CDATA[ + $EMAIL_OUTGOING_SCRIPT + ]]></outgoingscript> + + <filterinitscript><![CDATA[ + $EMAIL_FILTERINIT_SCRIPT + ]]></filterinitscript> + + + <filterscript><![CDATA[ + $EMAIL_FILTER_SCRIPT + ]]></filterscript> + + </datatype> + diff --git a/src/syncevo/configs/datatypes/server/44email-nokia9500.xml b/src/syncevo/configs/datatypes/server/44email-nokia9500.xml new file mode 100644 index 00000000..e9f17501 --- /dev/null +++ b/src/syncevo/configs/datatypes/server/44email-nokia9500.xml @@ -0,0 +1,135 @@ + <datatype name="email_nokia9500" basetype="text"> + <use profile="rfc2822_email"/> + <typestring>message/x-rfc822</typestring> <!-- this is Nokia 9500/9300-like --> + <versionstring>1.0</versionstring> + + <initscript><![CDATA[ + INTEGER ITEMLIMIT; + // default limit is limit of session + ITEMLIMIT = SIZELIMIT(); + ]]></initscript> + + <processitemscript><![CDATA[ + INTEGER n; + + // For Nokia Email, we must derive folder ID from source LocURI + // which has form "./somestrangenumber/folder/itemid" + // where folder can be "Inbox" or "Outbox" + if (FIND(REMOTEID(),"Inbox",0)!=UNASSIGNED) { + FOLDER="INBOX"; + } + else if (FIND(REMOTEID(),"Outbox",0)!=UNASSIGNED) { + FOLDER="OUTBOX"; + } + // pre-process item + if (UPPERCASE(FOLDER)=="INBOX") { + // In any case, prevent adding to inbox (delete remote items instead) + PREVENTADD(); + // server always wins for inbox + CONFLICTSTRATEGY("server-wins"); + if (SLOWSYNC()) { + // also prevent modifications in server + IGNOREUPDATE(); + } + else { + // normal sync items going to inbox from client need special treatment + if (SYNCOP()=="add" || SYNCOP()=="replace") { + // make sure that existing server item will conflict with this item + if (LIMIT!=EMPTY && (LIMIT<0 || LIMIT>SIZELIMIT())) { + // force conflict only if this is a reload + FORCECONFLICT(); + } + // make sure we never overwrite a body in the inbox + BODY = UNASSIGNED; + // delete always wins over replace in inbox (to avoid adds to inbox) + DELETEWINS(); + } + } + } + else if (UPPERCASE(FOLDER)=="OUTBOX") { + // never try to change something in outbox + IGNOREUPDATE(); + if (SYNCOP()!="delete") { + // - date of mail is NOW, set it such that a correct date is written to the DB + MAILDATE = DBNOW(); + // MAILDATE = (INTEGER)DBNOW() - TIMEUNITS(120); // %%% backdate it 2 mins to make sure it does not get retransmitted + // - echo item as delete (this causes that it is moved to the "sent" folder in the 9500) + ECHOITEM("delete"); + } + CONFLICTSTRATEGY("client-wins"); + } + else { + // Other folder + // - silently discard incoming item for other folder than the above + // except if it is a delete + if (SYNCOP()!="delete") + REJECTITEM(0); + } + ]]></processitemscript> + + + <mergescript><![CDATA[ + // pre-process item + if (UPPERCASE(LOOSING.FOLDER)!="OUTBOX") { + // non-outbox (especially inbox) needs special merge to accomplish reload feature + // - loosing item is client's, winning is server's + if (LOOSING.LIMIT!=EMPTY) { + // loosing (remote) item specifies a new limit, override winning's default + WINNING.LIMIT=LOOSING.LIMIT; + SETWINNINGCHANGED(TRUE); + } + // make sure winning has right folder + WINNING.FOLDER=LOOSING.FOLDER; + // make sure a set read-flag gets propagated to server + if (LOOSING.ISREAD=="true") WINNING.ISREAD="true"; + // merge other fields normally + MERGEFIELDS(); + // make sure body does not get re-written to local DB even if merge would cause local update + LOOSING.BODY=UNASSIGNED; + } + else { + // normal merging in other folders + MERGEFIELDS(); + } + ]]></mergescript> + + + <outgoingscript><![CDATA[ + // we can only send to inbox or outbox + // - If we have no remote ID (=add command) prepare special Target item ID + // containing target folder. + if (REMOTEID()==EMPTY) { + if (UPPERCASE(FOLDER)=="INBOX") { + SETREMOTEID(REMOTEDBNAME()+"/Inbox/"); + } + else if (UPPERCASE(FOLDER)=="OUTBOX") { + SETREMOTEID(REMOTEDBNAME()+"/Outbox/"); + } + } + ]]></outgoingscript> + + <filterinitscript><![CDATA[ + // check if we need to filter + INTEGER NEEDFILTER; + + NEEDFILTER = + !DBHANDLESOPTS() && // only if DB cannot handle it + (STARTDATE()!=EMPTY); // and only if a start date is set (end date not needed as there are never future emails today) + SETFILTERALL(NEEDFILTER); + RETURN NEEDFILTER; + ]]></filterinitscript> + + + <filterscript><![CDATA[ + INTEGER PASSES; + + // check if item passes filter + PASSES=FALSE; + // Filter out anything not for Inbox or Outbox + if (UPPERCASE(FOLDER)!="INBOX" && UPPERCASE(FOLDER)!="OUTBOX") RETURN FALSE; + // Emails pass if they have a MAILDATE on or later than start date + PASSES = MAILDATE>=STARTDATE(); + RETURN PASSES; + ]]></filterscript> + + </datatype> diff --git a/src/syncevo/configs/debug/00default.xml b/src/syncevo/configs/debug/00default.xml new file mode 100644 index 00000000..5b24c4c9 --- /dev/null +++ b/src/syncevo/configs/debug/00default.xml @@ -0,0 +1,31 @@ + <!-- path where logfiles are stored --> + <!-- <logpath platform="linux">/your/log/directory</logpath> --> + <logflushmode>buffered</logflushmode> <!-- buffered is fastest mode, but may loose data on process abort. Other options: "flush" (after every line) or "openclose" (safest, slowest, like in 2.x server) --> + <!-- per session log --> + <sessionlogs>yes</sessionlogs> <!-- by default, create a session log file for every sync session (might be disabled for special users/devices in scripts) --> + <!-- debug format options --> + <logformat>html</logformat> <!-- html is nicely colored and easily viewable with a web browser. Other options: "xml", "text" --> + <folding>auto</folding> <!-- dynamic folding of blocks enabled, automatically expanded or collapsed default. Other options: "none", "expanded", "collapsed" --> + <timestamp>yes</timestamp> <!-- show timestamps for structure elements in log --> + <timestampall>no</timestampall> <!-- don't show timestamp for every log line --> + <timedsessionlognames>yes</timedsessionlognames> <!-- session logs also have the session start timestamp in the filename - makes them more easily sortable --> + <!-- thread logging mode --> + <subthreadmode>separate</subthreadmode> <!-- write log info from subthreads into separate log files. Other options: "suppress" --> + <!-- basic debug level selection --> + <enable option="extended"/> <!-- "extended" is a good choice for start testing. For production, use "normal" or "minimal" --> + <!-- <enable option="normal"/> --> <!-- "normal" provides rich debug info, but still in reasonable size --> + <!-- <enable option="minimal"/> --> <!-- "minimal" just shows basic flow and error. Not suitable for debugging --> + <!-- <enable option="maximal"/> --> <!-- "maximal" can create VERY LARGE logs and cause HEAVY SLOWDOWN. Only for detail debugging --> + <!-- <enable option="all"/> --> <!-- "all" shows EVERYTHING possible, and way too much for any normal situation. For hardcore debugging ONLY! --> + <!-- additional debug info switches --> + <enable option="userdata"/> <!-- Make this <disable ...> if you don't want user data in the logs --> + <disable option="scripts"/> <!-- Make this <enable ...> to show script execution in logs --> + <disable option="match"/> <!-- Make this <enable ...> to show slow sync matching. CAN PRODUCE ENORMOUS LOGS and HEAVILY IMPACT PERFORMANCE for large slow syncs - use with care! --> + <disable option="exotic"/> <!-- Make this <enable ...> to include very in-detail info. CAN PRODUCE ENORMOUS LOGS and HEAVILY IMPACT PERFORMANCE for large slow syncs - use with care! --> + <!-- see manual for more debug info switches --> + <!-- global log options --> + <globallogs>no</globallogs> <!-- by default, do not log global session dispatching, creation etc. (not useful in multi-user operation) --> + <singlegloballog>no</singlegloballog> <!-- a new global log will be started for every start of the server/application --> + <!-- SyncML message dumping options --> + <msgdump>no</msgdump> <!-- do not dump syncml traffic 1:1 to files --> + <xmltranslate>no</xmltranslate> <!-- do not try to translate syncml traffic into XML (DO NOT SET THIS OPTION IN PRODUCTIVE SERVERS!) --> diff --git a/src/syncevo/configs/remoterules/server/00_t39m.xml b/src/syncevo/configs/remoterules/server/00_t39m.xml new file mode 100644 index 00000000..b2f88070 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/00_t39m.xml @@ -0,0 +1,11 @@ + <remoterule name="t39m"> + <!-- Rule for Ericsson T39m client --> + <manufacturer>Ericsson</manufacturer> + <software>R1A</software> + + <limitedfieldlengths>yes</limitedfieldlengths> + <inputcharset>ANSI</inputcharset> + <descriptivename>Ericsson T39m</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/01_t68.xml b/src/syncevo/configs/remoterules/server/01_t68.xml new file mode 100644 index 00000000..03bc6c5c --- /dev/null +++ b/src/syncevo/configs/remoterules/server/01_t68.xml @@ -0,0 +1,11 @@ + <remoterule name="t68"> + <!-- Rule for Ericsson T68 client --> + <manufacturer>Ericsson</manufacturer> + <software>R1B</software> + + <limitedfieldlengths>yes</limitedfieldlengths> + <inputcharset>ANSI</inputcharset> + <descriptivename>Ericsson T68</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/02_V3.xml b/src/syncevo/configs/remoterules/server/02_V3.xml new file mode 100644 index 00000000..952b13b9 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/02_V3.xml @@ -0,0 +1,14 @@ + <remoterule name="V3"> + <!-- Rule for Motorola V3 --> + <manufacturer>Motorola*</manufacturer> + <model>V3</model> + + <limitedfieldlengths>yes</limitedfieldlengths> + <quote8bitcontent>yes</quote8bitcontent> + <nocontentfolding>yes</nocontentfolding> + <outputcharset>ANSI</outputcharset> + <inputcharset>ANSI</inputcharset> + <descriptivename>Motorola V3</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/03_V3i.xml b/src/syncevo/configs/remoterules/server/03_V3i.xml new file mode 100644 index 00000000..f85500c2 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/03_V3i.xml @@ -0,0 +1,13 @@ + <remoterule name="V3i"> + <!-- Rule for Motorola V3i --> + <manufacturer>Motorola*</manufacturer> + <model>V3i</model> + + <limitedfieldlengths>yes</limitedfieldlengths> + <quote8bitcontent>yes</quote8bitcontent> + <nocontentfolding>yes</nocontentfolding> + <outputcharset>ANSI</outputcharset> + <descriptivename>Motorola V3i</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/04_6230.xml b/src/syncevo/configs/remoterules/server/04_6230.xml new file mode 100644 index 00000000..d31334cb --- /dev/null +++ b/src/syncevo/configs/remoterules/server/04_6230.xml @@ -0,0 +1,10 @@ + <remoterule name="6230"> + <manufacturer>NOKIA</manufacturer> + <model>6230</model> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6230</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/05_9210.xml b/src/syncevo/configs/remoterules/server/05_9210.xml new file mode 100644 index 00000000..ef1b3cf1 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/05_9210.xml @@ -0,0 +1,14 @@ + <remoterule name="9210"> + <manufacturer>NOKIA</manufacturer> + <model>9210</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 9210</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/06_9210i.xml b/src/syncevo/configs/remoterules/server/06_9210i.xml new file mode 100644 index 00000000..5925ebb0 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/06_9210i.xml @@ -0,0 +1,14 @@ + <remoterule name="9210i"> + <manufacturer>NOKIA</manufacturer> + <model>9210i</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 9210</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/07_3220.xml b/src/syncevo/configs/remoterules/server/07_3220.xml new file mode 100644 index 00000000..65968f85 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/07_3220.xml @@ -0,0 +1,15 @@ + <remoterule name="3220"> + <manufacturer>NOKIA</manufacturer> + <model>3220</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3220</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/08_3230.xml b/src/syncevo/configs/remoterules/server/08_3230.xml new file mode 100644 index 00000000..ac7fe01e --- /dev/null +++ b/src/syncevo/configs/remoterules/server/08_3230.xml @@ -0,0 +1,15 @@ + <remoterule name="3230"> + <manufacturer>NOKIA</manufacturer> + <model>3230</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3230</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/09_3600.xml b/src/syncevo/configs/remoterules/server/09_3600.xml new file mode 100644 index 00000000..db3f2aab --- /dev/null +++ b/src/syncevo/configs/remoterules/server/09_3600.xml @@ -0,0 +1,15 @@ + <remoterule name="3600"> + <manufacturer>NOKIA</manufacturer> + <model>3600</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3600</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/10_3620.xml b/src/syncevo/configs/remoterules/server/10_3620.xml new file mode 100644 index 00000000..1cd67f34 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/10_3620.xml @@ -0,0 +1,15 @@ + <remoterule name="3620"> + <manufacturer>NOKIA</manufacturer> + <model>3620</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3620</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/11_3650.xml b/src/syncevo/configs/remoterules/server/11_3650.xml new file mode 100644 index 00000000..e06016a4 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/11_3650.xml @@ -0,0 +1,15 @@ + <remoterule name="3650"> + <manufacturer>NOKIA</manufacturer> + <model>3650</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3650</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/12_3660.xml b/src/syncevo/configs/remoterules/server/12_3660.xml new file mode 100644 index 00000000..54b5d756 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/12_3660.xml @@ -0,0 +1,15 @@ + <remoterule name="3660"> + <manufacturer>NOKIA</manufacturer> + <model>3660</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 3660</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/13_6260.xml b/src/syncevo/configs/remoterules/server/13_6260.xml new file mode 100644 index 00000000..62a59ce9 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/13_6260.xml @@ -0,0 +1,15 @@ + <remoterule name="6260"> + <manufacturer>NOKIA</manufacturer> + <model>6260</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6260</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/14_6600.xml b/src/syncevo/configs/remoterules/server/14_6600.xml new file mode 100644 index 00000000..954902be --- /dev/null +++ b/src/syncevo/configs/remoterules/server/14_6600.xml @@ -0,0 +1,15 @@ + <remoterule name="6600"> + <manufacturer>NOKIA</manufacturer> + <model>6600</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6600</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/15_6620.xml b/src/syncevo/configs/remoterules/server/15_6620.xml new file mode 100644 index 00000000..580a93ec --- /dev/null +++ b/src/syncevo/configs/remoterules/server/15_6620.xml @@ -0,0 +1,15 @@ + <remoterule name="6620"> + <manufacturer>NOKIA</manufacturer> + <model>6620</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6620</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/16_6630.xml b/src/syncevo/configs/remoterules/server/16_6630.xml new file mode 100644 index 00000000..f64994a7 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/16_6630.xml @@ -0,0 +1,15 @@ + <remoterule name="6630"> + <manufacturer>NOKIA</manufacturer> + <model>6630</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6630</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/17_6670.xml b/src/syncevo/configs/remoterules/server/17_6670.xml new file mode 100644 index 00000000..ef3bfdf1 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/17_6670.xml @@ -0,0 +1,15 @@ + <remoterule name="6670"> + <manufacturer>NOKIA</manufacturer> + <model>6670</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 6670</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/18_7250.xml b/src/syncevo/configs/remoterules/server/18_7250.xml new file mode 100644 index 00000000..6f896e71 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/18_7250.xml @@ -0,0 +1,15 @@ + <remoterule name="7250"> + <manufacturer>NOKIA</manufacturer> + <model>7250</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 7250</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/19_7250i.xml b/src/syncevo/configs/remoterules/server/19_7250i.xml new file mode 100644 index 00000000..7a50e2a8 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/19_7250i.xml @@ -0,0 +1,15 @@ + <remoterule name="7250i"> + <manufacturer>NOKIA</manufacturer> + <model>7250i</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 7250i</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/20_7260.xml b/src/syncevo/configs/remoterules/server/20_7260.xml new file mode 100644 index 00000000..2fbf3ce8 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/20_7260.xml @@ -0,0 +1,15 @@ + <remoterule name="7260"> + <manufacturer>NOKIA</manufacturer> + <model>7260</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 7260</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/21_7610.xml b/src/syncevo/configs/remoterules/server/21_7610.xml new file mode 100644 index 00000000..c7a74c52 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/21_7610.xml @@ -0,0 +1,15 @@ + <remoterule name="7610"> + <manufacturer>NOKIA</manufacturer> + <model>7610</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 7610</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/22_7650.xml b/src/syncevo/configs/remoterules/server/22_7650.xml new file mode 100644 index 00000000..e97bd6d3 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/22_7650.xml @@ -0,0 +1,15 @@ + <remoterule name="7650"> + <manufacturer>NOKIA</manufacturer> + <model>7650</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia 7650</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/23_N-Gage.xml b/src/syncevo/configs/remoterules/server/23_N-Gage.xml new file mode 100644 index 00000000..e2e1c42e --- /dev/null +++ b/src/syncevo/configs/remoterules/server/23_N-Gage.xml @@ -0,0 +1,15 @@ + <remoterule name="N-Gage"> + <manufacturer>NOKIA</manufacturer> + <model>N-Gage</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia N-Gage</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/24_N-Gage_QD.xml b/src/syncevo/configs/remoterules/server/24_N-Gage_QD.xml new file mode 100644 index 00000000..73c299a3 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/24_N-Gage_QD.xml @@ -0,0 +1,15 @@ + <remoterule name="N-Gage QD"> + <manufacturer>NOKIA</manufacturer> + <model>N-Gage QD</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Nokia N-Gage QD</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/25_9300.xml b/src/syncevo/configs/remoterules/server/25_9300.xml new file mode 100644 index 00000000..9dd949a6 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/25_9300.xml @@ -0,0 +1,15 @@ + <remoterule name="9300"> + <manufacturer>NOKIA</manufacturer> + <model>9300</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <treatasutc>yes</treatasutc> <!-- needs 2.1.1 or later server --> + <descriptivename>Nokia 9300</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/26_9500.xml b/src/syncevo/configs/remoterules/server/26_9500.xml new file mode 100644 index 00000000..38a94a49 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/26_9500.xml @@ -0,0 +1,15 @@ + <remoterule name="9500"> + <manufacturer>NOKIA</manufacturer> + <model>9500</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <treatasutc>yes</treatasutc> <!-- needs 2.1.1 or later server --> + <descriptivename>Nokia 9500</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/27_E90.xml b/src/syncevo/configs/remoterules/server/27_E90.xml new file mode 100644 index 00000000..c9250f4f --- /dev/null +++ b/src/syncevo/configs/remoterules/server/27_E90.xml @@ -0,0 +1,14 @@ + <remoterule name="E90"> + <manufacturer>NOKIA</manufacturer> + <model>E90</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <ignoredevinfmaxsize>yes</ignoredevinfmaxsize> + <descriptivename>Nokia E90</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/28_X.xml b/src/syncevo/configs/remoterules/server/28_X.xml new file mode 100644 index 00000000..3977eed6 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/28_X.xml @@ -0,0 +1,15 @@ + <remoterule name="X"> + <manufacturer>Sendo</manufacturer> + <model>X</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>Sendo X</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/29_SX1.xml b/src/syncevo/configs/remoterules/server/29_SX1.xml new file mode 100644 index 00000000..b30183a8 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/29_SX1.xml @@ -0,0 +1,17 @@ + <remoterule name="SX1"> + <manufacturer>SIEMENS</manufacturer> + <model>SX1</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + ]]></rulescript> + + <limitedfieldlengths>yes</limitedfieldlengths> + <forcelocaltime>yes</forcelocaltime> + <!-- Note: SX1 crashes on contacts with empty properties --> + <noemptyproperties>yes</noemptyproperties> + <descriptivename>Siemens SX1</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/30_M55.xml b/src/syncevo/configs/remoterules/server/30_M55.xml new file mode 100644 index 00000000..f9a6e8f0 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/30_M55.xml @@ -0,0 +1,10 @@ + <remoterule name="M55"> + <manufacturer>SIEMENS</manufacturer> + <model>M55</model> + + <forcelocaltime>yes</forcelocaltime> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>Siemens M55</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/31_SL55.xml b/src/syncevo/configs/remoterules/server/31_SL55.xml new file mode 100644 index 00000000..13ce45d1 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/31_SL55.xml @@ -0,0 +1,10 @@ + <remoterule name="SL55"> + <manufacturer>SIEMENS</manufacturer> + <model>SL55</model> + + <forcelocaltime>yes</forcelocaltime> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>Siemens SL55</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/32_S55.xml b/src/syncevo/configs/remoterules/server/32_S55.xml new file mode 100644 index 00000000..9f898c99 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/32_S55.xml @@ -0,0 +1,10 @@ + <remoterule name="S55"> + <manufacturer>SIEMENS</manufacturer> + <model>S55</model> + + <forcelocaltime>yes</forcelocaltime> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>Siemens S55</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/33_S65.xml b/src/syncevo/configs/remoterules/server/33_S65.xml new file mode 100644 index 00000000..b58e65e4 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/33_S65.xml @@ -0,0 +1,10 @@ + <remoterule name="S65"> + <manufacturer>SIEMENS</manufacturer> + <model>S65</model> + + <forcelocaltime>yes</forcelocaltime> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>Siemens S65</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/34_SL65.xml b/src/syncevo/configs/remoterules/server/34_SL65.xml new file mode 100644 index 00000000..7119285e --- /dev/null +++ b/src/syncevo/configs/remoterules/server/34_SL65.xml @@ -0,0 +1,10 @@ + <remoterule name="SL65"> + <manufacturer>SIEMENS</manufacturer> + <model>SL65</model> + + <forcelocaltime>yes</forcelocaltime> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>Siemens SL65</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/35_K700.xml b/src/syncevo/configs/remoterules/server/35_K700.xml new file mode 100644 index 00000000..45959fc8 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/35_K700.xml @@ -0,0 +1,14 @@ + <remoterule name="K700"> + <!-- Rule for SonyEricsson K700 (aka SEMC Phone) client --> + <manufacturer>SonyEricsson</manufacturer> + <model>SEMC Phone</model> + <software>R3B</software> + + <!-- is a 1.1 client and claims UTC support, but it seems not to work ok + <forcelocaltime>yes</forcelocaltime> + --> + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>SonyEricsson K700</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/36_T610_T630.xml b/src/syncevo/configs/remoterules/server/36_T610_T630.xml new file mode 100644 index 00000000..6cc51770 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/36_T610_T630.xml @@ -0,0 +1,25 @@ + <remoterule name="T610/T630"> + <!-- Rule for SonyEricsson T610/T630 client --> + <manufacturer>SonyEricsson</manufacturer> + <software>R2B</software> + + <limitedfieldlengths>yes</limitedfieldlengths> + <descriptivename>SonyEricsson T610/T630</descriptivename> + </remoterule> + + + <!-- Due to a problem in M600i vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your M600i is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your M600i has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + M600i devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the M600i is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/37_M600i.xml b/src/syncevo/configs/remoterules/server/37_M600i.xml new file mode 100644 index 00000000..ea086dc6 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/37_M600i.xml @@ -0,0 +1,32 @@ + <remoterule name="M600i"> + <manufacturer>Sony Ericsson</manufacturer> + <model>M600i</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson M600i</descriptivename> + </remoterule> + + + <!-- Due to a problem in P800 vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your P800 is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your P800 has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + P800 devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the P800 is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/38_P800.xml b/src/syncevo/configs/remoterules/server/38_P800.xml new file mode 100644 index 00000000..49297f9d --- /dev/null +++ b/src/syncevo/configs/remoterules/server/38_P800.xml @@ -0,0 +1,32 @@ + <remoterule name="P800"> + <manufacturer>Sony Ericsson</manufacturer> + <model>P800</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson P800</descriptivename> + </remoterule> + + + <!-- Due to a problem in P900 vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your P900 is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your P900 has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + P900 devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the P900 is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/39_P900.xml b/src/syncevo/configs/remoterules/server/39_P900.xml new file mode 100644 index 00000000..eaa84ea7 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/39_P900.xml @@ -0,0 +1,32 @@ + <remoterule name="P900"> + <manufacturer>Sony Ericsson</manufacturer> + <model>P900</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson P900</descriptivename> + </remoterule> + + + <!-- Due to a problem in P910 vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your P910 is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your P910 has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + P910 devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the P910 is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/40_P910.xml b/src/syncevo/configs/remoterules/server/40_P910.xml new file mode 100644 index 00000000..1b186b14 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/40_P910.xml @@ -0,0 +1,32 @@ + <remoterule name="P910"> + <manufacturer>Sony Ericsson</manufacturer> + <model>P910</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson P910</descriptivename> + </remoterule> + + + <!-- Due to a problem in P910i vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your P910i is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your P910i has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + P910i devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the P910i is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/41_P910i.xml b/src/syncevo/configs/remoterules/server/41_P910i.xml new file mode 100644 index 00000000..8b582ceb --- /dev/null +++ b/src/syncevo/configs/remoterules/server/41_P910i.xml @@ -0,0 +1,32 @@ + <remoterule name="P910i"> + <manufacturer>Sony Ericsson</manufacturer> + <model>P910i</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson P910i</descriptivename> + </remoterule> + + + <!-- Due to a problem in P990i vCalendar implementation, + the device does not calculate time zones correctly + in all cases. + If your P990i is brand new, you need to specify + "calendar?/o(Z)" as database path instead of just + "calendar". If your P990i has already been synced + at least once via the cradle and the software + delivered with the device, you must omit the + "?/o(Z)" appendix and specify just "calendar" instead. + Please also note that the o(Z) option for never-synced + P990i devices only works if your server's config is + derived from a recent version of our sample config. + Otherwise, just make sure the P990i is synced once + in the cradle before using SyncML. + --> diff --git a/src/syncevo/configs/remoterules/server/42_P990i.xml b/src/syncevo/configs/remoterules/server/42_P990i.xml new file mode 100644 index 00000000..8b1549c5 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/42_P990i.xml @@ -0,0 +1,17 @@ + <remoterule name="P990i"> + <manufacturer>Sony Ericsson</manufacturer> + <model>P990i</model> + + <rulescript><![CDATA[ + // no dates before 1980 + mindate=(TIMESTAMP)"19800101T000000Z"; + // retransfer body when items are moved to sent box + retransfer_body=TRUE; + ]]></rulescript> + + <treataslocaltime>no</treataslocaltime> <!-- can be set to yes to have /o(Z) mode (see comment above) as default, otherwise /o(z) is default --> + <forcelocaltime>yes</forcelocaltime> + <descriptivename>SonyEricsson P990i</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/43_t68i.xml b/src/syncevo/configs/remoterules/server/43_t68i.xml new file mode 100644 index 00000000..5d093347 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/43_t68i.xml @@ -0,0 +1,11 @@ + <remoterule name="t68i"> + <!-- Rule for SonyEricsson T68i client --> + <manufacturer>SonyEricsson</manufacturer> + <software>R2A</software> + + <limitedfieldlengths>yes</limitedfieldlengths> + <inputcharset>ANSI</inputcharset> + <descriptivename>SonyEricsson T68i</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/44_Funambol_Outlook.xml b/src/syncevo/configs/remoterules/server/44_Funambol_Outlook.xml new file mode 100644 index 00000000..e343069c --- /dev/null +++ b/src/syncevo/configs/remoterules/server/44_Funambol_Outlook.xml @@ -0,0 +1,9 @@ + <remoterule name="Funambol_Outlook"> + <!-- Rule for Funambol Outlook Sync Client --> + <model>Funambol Outlook Sync Client</model> + + <lenientmode>yes</lenientmode> <!-- some status messages are missing at end of session --> + <descriptivename>Funambol Outlook Sync Client</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/remoterules/server/45_SyncJe_Outlook.xml b/src/syncevo/configs/remoterules/server/45_SyncJe_Outlook.xml new file mode 100644 index 00000000..63c5e096 --- /dev/null +++ b/src/syncevo/configs/remoterules/server/45_SyncJe_Outlook.xml @@ -0,0 +1,9 @@ + <remoterule name="SyncJe_Outlook"> + <!-- Rule for NextHaus SyncJe Outlook Edition --> + <model>SyncJe Outlook Edition</model> + + <ignorectcap>yes</ignorectcap> <!-- can do contact photo sync, but is missing in CTCap --> + <descriptivename>NextHaus SyncJe Outlook Client</descriptivename> + </remoterule> + + diff --git a/src/syncevo/configs/scripting/10newuid.xml b/src/syncevo/configs/scripting/10newuid.xml new file mode 100644 index 00000000..6974d879 --- /dev/null +++ b/src/syncevo/configs/scripting/10newuid.xml @@ -0,0 +1,8 @@ + <function><![CDATA[ + // create a UID + string newuid() { + return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW()); + } + ]]></function> + + diff --git a/src/syncevo/configs/scripting/11calendar.xml b/src/syncevo/configs/scripting/11calendar.xml new file mode 100644 index 00000000..adaea2b0 --- /dev/null +++ b/src/syncevo/configs/scripting/11calendar.xml @@ -0,0 +1,127 @@ + <!-- define script macros for scripts that are used by both vCalendar 1.0 and iCalendar 2.0 --> + + <macro name="VCALENDAR_INCOMING_SCRIPT"><![CDATA[ + STRING MATCHES[]; + STRING CAT,CN,EM; + INTEGER i; + TIMESTAMP ts; + // make sure we have all trailing and leading spaces eliminated + DESCRIPTION=NORMALIZED(DESCRIPTION); + SUMMARY=NORMALIZED(SUMMARY); + // eliminate description that is the same as summary + if (DESCRIPTION==SUMMARY) DESCRIPTION=EMPTY; + // calendar or todo + if (ISEVENT) { + // VEVENT + // - handle duration cases + if (ISDURATION(DURATION)) { + if (DTEND==EMPTY) DTEND = DTSTART + DURATION; + if (DTSTART==EMPTY) DTSTART = DTEND - DURATION; + } + // - detect alldays in vCalendar 1.0 (0:00-0:00 or 23:59 localtime) + i = ALLDAYCOUNT(DTSTART,DTEND,TRUE); + if (ITEMDATATYPE()=="vCalendar10" && i>0) { + // DTSTART and DTEND represent allday event, make them date-only values + // - convert start to user zone (or floating) so it represents midnight + DTSTART = CONVERTTOUSERZONE(DTSTART); + MAKEALLDAY(DTSTART,DTEND,i); + } + else { + // iCalendar 2.0 - only if DTSTART is a date-only value this really is an allday + if (ISDATEONLY(DTSTART)) { + // reshape to make sure we don't have invalid zero-duration alldays (old OCS 9 servers) + MAKEALLDAY(DTSTART,DTEND,i); + } + } + // - shape attendees (and make sure ATTENDEES[] is assigned even for empty email addresses) + i=0; + while(i<SIZE(ATTENDEES) || i<SIZE(ATTENDEE_CNS)) { + PARSEEMAILSPEC(ATTENDEES[i], CN, EM); + ATTENDEES[i] = EM; // pure email address + // in case we have no specific common name, use the one extracted from the email + // This catches the vCalendar 1.0 case and eventually ill-formed iCalendar 2.0 as well + if (ATTENDEE_CNS[i]==EMPTY) + ATTENDEE_CNS[i]=CN; + // default participation status to needs-action + if (ATTENDEE_PARTSTATS[i]==EMPTY) + ATTENDEE_PARTSTATS[i]=1; // 1=needs action + i=i+1; + } + // - shape organizer + PARSEEMAILSPEC(ORGANIZER, CN, EM); + ORGANIZER = EM; // pure email address + if (ORGANIZER_CN==EMPTY) + ORGANIZER_CN=CN; + } + else { + // VTODO + // - make sure we have at least a summary + if (SUMMARY==EMPTY) SUMMARY=DESCRIPTION; // use description if we don't have a summary + if (SUMMARY==EMPTY) SUMMARY="unnamed"; // set dummy summary if we still don't have one + // due shaping for non-iCalendar 2.0 + if (ITEMDATATYPE()=="vCalendar10" && ALLDAYCOUNT(DUE,DUE,TRUE,TRUE)>0) { + DUE = DATEONLY(DUE); + } + } + // Common alarm handling + // - handle relative alarm time (as possible with VALARM TRIGGER) + if (ISDURATION(ALARM_TIME)) { + if (ALARM_REL==2) + ts = DTEND; // relative to end + else { + if (ISEVENT) + ts = DTSTART; // relative to start for events + else + ts = DUE; // relative to due for todos + } + // for now, make ALARM user(=system) zone in all cases + ALARM_TIME = CONVERTTOUSERZONE(POINTINTIME(ts),TRUE) + ALARM_TIME; + } + ]]></macro> + + + <macro name="VCALENDAR_OUTGOING_SCRIPT"><![CDATA[ + // set UTC time of generation for iCalendar 2.0 DTSTAMP + DGENERATED = NOW(); + // make sure we have all trailing and leading spaces eliminated + DESCRIPTION=NORMALIZED(DESCRIPTION); + SUMMARY=NORMALIZED(SUMMARY); + if (ISEVENT) { + // VEVENT + // - combine attendee email address and common name into single string for vCalendar 1.0 + if (ITEMDATATYPE()=="vCalendar10") { + i=0; + while(i<SIZE(ATTENDEES)) { + ATTENDEES[i] = MAKEEMAILSPEC(ATTENDEE_CNS[i], ATTENDEES[i]); + i=i+1; + } + ORGANIZER = MAKEEMAILSPEC(ORGANIZER_CN, ORGANIZER); + } + } + else { + // VTODO + // - Nothing special so far + } + // make sure we have at least a summary + if (SUMMARY==EMPTY) SUMMARY=SUBSTR(DESCRIPTION,0,32); // derive from description + if (SUMMARY==EMPTY) SUMMARY="unnamed"; // in case description is empty as well + // do NOT send duration (some servers crash when doing so) + DURATION = UNASSIGNED; + // shape alarm + if (ALARM_TIME!=EMPTY) { + if (ITEMDATATYPE()=="iCalendar20") { + if (ALARM_ACTION==EMPTY) ALARM_ACTION = "AUDIO"; + ALARM_TIME = CONVERTTOUSERZONE(ALARM_TIME,TRUE); // unfloat into user (system) zone, in case it is floating + ALARM_TIME = CONVERTTOZONE(ALARM_TIME,"UTC"); // must always be UTC by iCalendar 2.0 specs + // send as duration if we have non-empty non-date DTSTART + if (DTSTART!=EMPTY && !ISDATEONLY(DTSTART)) { + // make a duration (unfloat DTSTART into system zone in case it is floating first!) + ALARM_TIME = ALARM_TIME-CONVERTTOZONE(CONVERTTOUSERZONE(DTSTART,TRUE),"UTC"); + ALARM_REL = 1; // relative to start + } + } + else { + if (ALARM_MSG==EMPTY) ALARM_MSG="alarm"; + } + } + ]]></macro> diff --git a/src/syncevo/configs/scripting/client/00timeout.xml b/src/syncevo/configs/scripting/client/00timeout.xml new file mode 100644 index 00000000..c56df746 --- /dev/null +++ b/src/syncevo/configs/scripting/client/00timeout.xml @@ -0,0 +1,2 @@ + <looptimeout>5</looptimeout> + diff --git a/src/syncevo/configs/scripting/server/12email.xml b/src/syncevo/configs/scripting/server/12email.xml new file mode 100644 index 00000000..5ca7286b --- /dev/null +++ b/src/syncevo/configs/scripting/server/12email.xml @@ -0,0 +1,162 @@ + <!-- The following email handling scripts are defined as script MACROS because they + are used in multiple <datatype> definitions below. This avoids duplicating these + script's source code in the config file --> + + <macro name="EMAIL_INIT_SCRIPT"><![CDATA[ + INTEGER ITEMLIMIT; + // default limit is limit of session + ITEMLIMIT = SIZELIMIT(); + ]]></macro> + + + <macro name="EMAIL_PROCESSITEM_SCRIPT"><![CDATA[ + // pre-process item + if (UPPERCASE(FOLDER)=="INBOX") { + // In any case, prevent adding to inbox (delete remote items instead) + PREVENTADD(); + // server always wins for inbox + CONFLICTSTRATEGY("server-wins"); + if (SLOWSYNC()) { + // also prevent modifications in server + IGNOREUPDATE(); + } + else { + // normal sync items going to inbox from client need special treatment + if (SYNCOP()=="add" || SYNCOP()=="replace") { + // make sure that existing server item will conflict with this item + if (LIMIT!=EMPTY && (LIMIT<0 || LIMIT>SIZELIMIT())) { + // force conflict only if this is a reload + FORCECONFLICT(); + } + // make sure we never overwrite a body in the inbox + BODY = UNASSIGNED; + // delete always wins over replace in inbox (to avoid adds to inbox) + DELETEWINS(); + } + } + } + else if (UPPERCASE(FOLDER)=="OUTBOX") { + // never try to change something in outbox + IGNOREUPDATE(); + if (SYNCOP()!="delete") { + // - date of mail is NOW, set it such that a correct date is written to the DB + MAILDATE = DBNOW(); + // MAILDATE = (INTEGER)DBNOW() - TIMEUNITS(120); // %%% backdate it 2 mins to make sure it does not get retransmitted + // - echo item as replace (to force-move it to the sent folder) + ECHOITEM("replace"); + } + CONFLICTSTRATEGY("client-wins"); + } + else if (UPPERCASE(FOLDER)=="SENT") { + // never try to change something in sent folder + IGNOREUPDATE(); + // Server has precedence in case of conflicts + CONFLICTSTRATEGY("server-wins"); + // Implement reload capability for sent items as well + if (SLOWSYNC()) { + // do not add new sent items to the server in slowsync + PREVENTADD(); // causes extra sent items on the client to be deleted + } + else { + // make sure that existing server item will conflict with this item + if (SYNCOP()=="replace") { + if (LIMIT!=EMPTY && (LIMIT<0 || LIMIT>SIZELIMIT())) { + // force conflict only if this is a reload + FORCECONFLICT(); + REJECTITEM(200); // but do not process the item further + } + else { + // silently ignore other types of changes + REJECTITEM(200); + } + // make sure we never overwrite a body in the sent folder + BODY = UNASSIGNED; + } + } + } + else { + // Other folder + // - silently discard incoming item for other folder than the above + // except if it is a delete + if (SYNCOP()!="delete") + REJECTITEM(0); + } + ]]></macro> + + + <macro name="EMAIL_MERGE_SCRIPT"><![CDATA[ + // pre-process item + if (UPPERCASE(LOOSING.FOLDER)!="OUTBOX") { + // non-outbox (especially inbox) needs special merge to accomplish reload feature + // - loosing item is client's, winning is server's + if (LOOSING.LIMIT!=EMPTY) { + // loosing (remote) item specifies a new limit, override winning's default + WINNING.LIMIT=LOOSING.LIMIT; + SETWINNINGCHANGED(TRUE); + } + // make sure winning has right folder + WINNING.FOLDER=LOOSING.FOLDER; + // make sure a set read-flag gets propagated to server + if (LOOSING.ISREAD=="true") WINNING.ISREAD="true"; + // merge other fields normally + MERGEFIELDS(); + // make sure body does not get re-written to local DB even if merge would cause local update + LOOSING.BODY=UNASSIGNED; + } + else { + // normal merging in other folders + MERGEFIELDS(); + } + ]]></macro> + + <macro name="EMAIL_OUTGOING_SCRIPT"><![CDATA[ + // pre-process item + if (UPPERCASE(FOLDER)=="OUTBOX") { + // writing to outbox is always the ECHOITEM + // - cause item to move into "sent" folder + FOLDER = "sent"; + if (!SESSIONVAR("retransfer_body")) { + // - prevent body retransfer, but not for dumb P800/P900/M600/P990 clients + BODY = UNASSIGNED; // prevent body transfer + ATT_COUNT = 0; // prevent attachment transfer + ATT_CONTENTS = UNASSIGNED; + // basically, this item is not limited (already complete on the client) + // even if contents are not sent + LIMIT = -1; + SETSIZELIMIT(-1); + } + } + else { + // outgoing item to any folder of of remote (inbox, sent...) + // - limit body to what is set in the LIMIT field + // %%% probably obsolete, as textitem will handle limit field automatically for >=V1.0.8.21 + IF (LIMIT==EMPTY) + LIMIT = SIZELIMIT(); // if none set already, use default for this item (=default of datastore, if not SETSIZELIMIT() called before for this item generation) + } + // set limit for item generator + if (LIMIT!=EMPTY) + SETSIZELIMIT(LIMIT); + ]]></macro> + + + <macro name="EMAIL_FILTERINIT_SCRIPT"><![CDATA[ + // check if we need to filter + INTEGER NEEDFILTER; + + NEEDFILTER = + !DBHANDLESOPTS() && // only if DB cannot handle it + (STARTDATE()!=EMPTY); // and only if a start date is set (end date not needed as there are never future emails today) + SETFILTERALL(NEEDFILTER); + RETURN NEEDFILTER; + ]]></macro> + + + <macro name="EMAIL_FILTER_SCRIPT"><![CDATA[ + INTEGER PASSES; + + // check if item passes filter + PASSES=FALSE; + // Emails pass if they have a MAILDATE on or later than start date + PASSES = MAILDATE>=STARTDATE(); + RETURN PASSES; + ]]></macro> diff --git a/src/syncevo/configs/update-samples.pl b/src/syncevo/configs/update-samples.pl new file mode 100644 index 00000000..0dbdb97b --- /dev/null +++ b/src/syncevo/configs/update-samples.pl @@ -0,0 +1,64 @@ +#! /usr/bin/env perl + +sub basename { + $_ = shift; + s;.*/;;; + return $_; +} + +# Concatenate all files ending in .xml in the given directory +# plus those in a specific subdirectory for client or server. +# Order lexicographic ascending of the base filename. + +sub readfragments { + my $dir = shift; + my $subdir = shift; + my @res = (); + + my @files = (); + if (opendir(my $dh, $dir)) { + foreach (grep (/.*\.xml$/, readdir($dh))) { + push @files, "$dir/$_"; + } + closedir($dh); + + if (opendir(my $dh, "$dir/$subdir")) { + foreach (grep (/.*\.xml$/, readdir($dh))) { + push @files, "$dir/$subdir/$_"; + } + closedir($dh); + } + } + + @files = sort { basename($a) <=> basename($b) } @files; + foreach (@files) { + open(IN, "<$_") || die "cannot read $_: $!"; + push @res, <IN>; + close(IN); + } + + return join("", @res); +} + +# replace content of <debug>, <scripting>, <datatypes> and all <remoterule>s +# with the corresponding shared and/or client/server .xml fragments +sub update { + my $file = shift; + my $subdir = shift; + + open(IN, "<$file") || die "cannot read $file: $!"; + $_ = join("", <IN>); + close(IN) || die "closing $file: $!"; + + s;(<debug>\n).*(\n *</debug>);$1 . readfragments("debug", $subdir) . $2;se; + s;(<scripting>\n).*(\n *</scripting>);$1 . readfragments("scripting", $subdir) . $2;se; + s;(<datatypes>\n).*(\n *</datatypes>);$1 . readfragments("datatypes", $subdir) . $2;se; + s;(\n *)<remoterule>.*</remoterule>;$1 . readfragments("remoterules", $subdir);se; + + open(OUT, ">$file") || die "cannot write $file: $!"; + print OUT; + close(OUT) || die "closing $file: $!"; +} + +update("syncclient_sample_config.xml", "client"); +update("syncserv_sample_config.xml", "server"); |