On Mo, 2011-07-18 at 14:12 +0100, Valluri, Amarnath wrote:
> Hi Patrick,
> 
> I did the following changes as per your suggestions:
> 
> i) Added 'VJOURNAL' subprofile with suitable properties to 
> calendar-profile.xml
> 
> ii) Added a new datatype named 'journal' to notes-types.xml, whose basetype 
> is 'vcalendar', and uses 'vCalendar' mimeprofile
>     <datatype name='journal' basetype='vcalendar'>
>       <use mimeprofile='vCalendar'/>
>      .....

You are leaving out the interesting part. Is there a corresponding text
profile for that same field list?

> iii) in SyncSource.cpp, getSynthesisInfo() added new branch to handle/use 
> this new type :
>     else if (type == "syncevolution/journal") {
>        info.m_profile = "\"Note\", 2";
>        info.m_datatypes = "  <use datatype='journal' mode='rw' 
> preferred='yes'/>";
>     }

I suspect that a second datatype <use datatype='journal-plain'
mode='rw'/> is missing here.

> iv) Handled this new mimetype('syncevolution/journal') in evolution backend, 
> i.e, EvolutionCalendarSyncSourceRegister.cpp :
>       if (sourceType.m_format == "text/plain") return new 
> EvolutionMemoSource();
>       if (sourceType.m_format == "text/calendar" || sourceType.m_format == 
> "syncevolution/journal") return new EvolutionCalendarSource(..TYPE_JOURNAL);

Remove the EvolutionMemoSource(). It is no longer needed.

> But I am not clear how to force this new data/mime type usage only for 
> 'syncevolution' peers.

You don't. For type == "syncevolution/journal" you tell the Synthesis
engine that it is meant to support two external formats, iCalendar 2.0
and plain text. Internally both are stored in the same calendar field
list. Towards the backend, the iCalendar 2.0 format is used. Towards the
peer the automatic format negotiation picks the one supported by both
peers.


-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to