http://bugzilla.moblin.org/show_bug.cgi?id=6664





--- Comment #5 from yongsheng zhu <[email protected]>  2009-10-14 
01:02:53 ---
(In reply to comment #4)
> (In reply to comment #3)
> > > We should use the iCalendar 2.0 range internally in the Synthesis field 
> > > list
> > > and map to the smaller 1-3 range when talking to peers in vCalendar 1.0.
> > so I'll map iCalendar 2.0 range to vCalendar1.0, not only for Mobical.
> 
> Correct.
> 
> Mobical is the only server we exchange tasks with using vCalendar 1.0, isn't
> it?
There should be 4 places we have to check and do the conversion:
client backend read, client backend write, server incoming, outgoing to server
.

Server side:
if an incoming task and its type is vCalendar1.0,
  do priority conversion after incoming in 'incomingscript'
if an outgoing task and its type is vCalendar1.0,
  do priority conversion before outgoing in 'outgoingscript'
These 2 scripts are global and can be applied for all servers when
sending/receving tasks.

client backend  
if reading a task from client backend,
 do priority conversion after read in 'afterreadscript'. 
if wanting to write a task to client backend,
 do priority conversion before writing in 'beforewritescript'
Since these should be applied for all vCalendar1.0 related backends, but
currently there is no mechanism to support this in our code though we have
backend specified scripts(bug5633 asks) for them.

So I suggest adding a mechanism to solve this issue.
One global script should be defined for each kind of data type. And for each
backend source, we check its mimetype and firstly invoke its own specified
script for that source and then invoke our global scripts. Below is the code
from SyncSource:

 "        <beforewritescript><![CDATA[\n";
        if(!info.m_incomingScript.empty()) {
            xmlstream <<
                "           " << info.m_incomingScript << "\n";
        }
///> check its mimetype and add corresponding global scripts
        xmlstream <<
            "           itemdata = MAKETEXTWITHPROFILE(" << info.m_profile <<
", \"EVOLUTION\");\n"
            "        ]]></beforewritescript>\n"

In bug5633, we add two fields 'm_incomingScript' and 'm_outgoingScript' and I
think their names are not suitable. They should use 'm_afterreadscript' and
'm_beforewritescript' for client backends.

Another possible issue is:
if we read a task in iCalendar2.0 format from client backend with a priority
and then send it in vCalendar1.0, then when refreshing from server, we might a
different priority value other than our sent and they should belong to one
category(high, normal, low). In some servers, if it has more than 3 categories,
like memotoo, which has 5 categories, very high, high, normal, low, very low,
this conversion could make some problems on its web page view.

-- 
Configure bugmail: http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.
_______________________________________________
Syncevolution-issues mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution-issues

Reply via email to