On Fr, 2011-07-08 at 15:13 +0100, Valluri, Amarnath wrote:
> I was looking this bug/feature :
> https://bugs.meego.com/show_bug.cgi?id=11251, assigned to me.
> 
>  
> 
> I spent almost two/three days to go through all the code related to
> this, and XML configuration of data types etc. But couldn’t get enough
> to start implementing the changes.

No surprise, this issue touches on all of the Synthesis internals.
Learning about those takes a while ;-)

> My Understanding is : 
> 
> Currently ‘Note’ datatype is configured as ‘plain/text’ in synthesis
> xml configuration with two fields, SUBJECT and TEXT. Hence it can’t
> store additional fields like CATEGORIES of imported items.
> 
> So we need to expand this datatype to accommodate whole Memo
> information.

Yes. But don't invent your own field list. Just use the existing
"calendar" fieldlist. Then add a VJOURNAL sub-profile to the "vCalendar"
mimeprofile. That'll enable synchronizing memos/notes as iCalendar 2.0,
between peers which support that.

Then change the "Note" textprofile so that it uses the "calendar"
fieldlist. That should take care of conversion to/from plain text.

> And even the text<->VJOURNAL conversion is happening in
> backend(EvolutionMemoSource) which should be avoided.

This conversion needs to be removed. EvolutionMemoSource itself probably
becomes obsolete.

> My Doubts are :
> 
>  
> 
> i)                    you said in bug description that “configure
> plaintext datatype which uses same field list as calendar”, But this
> datatype is already existing, should we add fields to this?
> 
> OR Can’t we have a sub-profile in Calendar profile as VJOURNAL ?, I
> mean can we save memo’s also as calendar events L.

The latter.

> ii)                   I gone through SynthesisDBPlugin, SythesisEngine
> and SyncSource code. But I couldn’t get exactly where and how these
> configured datatypes/fields are being used in the engine side,
> 
> while reading and writing the items.

Have a look at SyncSourceBase::getDatastoreXML() in SyncSource.cpp. This
is where the Synthesis XML config is being generated for each source.
You'll find that it selects datatypes there.

> iii)                 I am not clear How this type conversion to move
> to Engine. and Say if we configure this type in engine, I hope we can
> drop whole MemoSouce(.cpp) code. Am I right ?

Right.

-- 
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