Patrick Ohly | 11 Apr 16:52 2014
Picon

UID + CardDAV

Hello!

In my syncing between local storage and CardDAV I have the following
problem: some CardDAV servers expect the UID to be unchanged (Apple
does, Google does not). EDS as local storage and probably also
traditional SyncML clients do not store the UID that they received from
CardDAV, so when writing back their data as-is I get an error from the
CardDAV server.

I used to have a hack in the SyncEvolution CardDAV backend which put
back the UID, but I noticed that this hack isn't working in all cases
and therefore would like to replace it.

libsynthesis already does a read/update/write cycle
("replace_writes_all_fields") when preparing items for the CardDAV
backend. My thinking therefore was:
     1. Add UID to vCard field list.
     2. Don't generate or parse it by default (in particular not when
        talking to EDS).
     3. Enable it when exchanging data with CardDAV.
     4. During the read/update/write the engine should see an unassigned
        UID in the updated data and a set, non-empty UID in the data
        that it needs to update, and thus preserve the UID.

Unfortunately it doesn't work like that. Full log and field list/profile
attached.

It deviates from my expectation in having a <empty> (and not
<unassigned>) UID after parsing the incoming data (which did not have a
UID property). Why is that?
(Continue reading)

Patrick Ohly | 11 Apr 12:18 2014
Picon

vCard group tags

Hello!

Google CardDAV and iOS/OS X use group tags to represent custom labels in
vCards. Attached is an example. Note that the Google vCard format used
by CardDAV is not the same as the one used by Gmail's export feature.
The example is from CardDAV.

I am trying to understand how I can support that using libsynthesis.

The doc mentions:

"groupfield"

        New in 3.4: This optional attribute can be used to specify a string field (usually
        a array or a repeating field) which represents the vCard or vCalendar group tag (a prefix to
        the property name, separated by a dot). The group tag can be used to link properties together
        which can occur multiple times. For example, some vCards might contain more than one
        ORG and TITLE. Now each title belongs to a particular organisation, so the group tag is
        used to represent that:

        A.ORG:myOwnCompany
        B.ORG:myEmployer

        B.TITLE:employee
        A.TITLE:boss

        The groupfield mechanism makes sure that TITLE and ORG repetitions will be stored in the
        same repetition index (array position if ORG and TITLE are mapped to arrays) according to
        their group tag, even if occuring out of order in the incoming vCard.

(Continue reading)

Lukas Zeller | 15 Jan 10:09 2014
Picon

Re: How is wbxml encoding done in libsyntesis/syncevolution

Hi Anuj,

On 14.04.2014, at 17:52, Anuj <acdoon@...> wrote:

> Hi,
> Thanks Patrick and Lukas for answering my query.
> Can you specify  the point(function) in code where Devinf is completed and
> ready for  sending to server(wbxml format).

The complete SyncML message in XML or WBXML format is read from libsynthesis' buffers using
GetSyncMLBuffer() (see engineinterface.h).

The DevInf WBXML/XML is actually created when the engine calls TDevInfResultsCommand::issue() or TDevInfPutCommand::issue().

If you want to extend/manipulate devInf, for whatever reason, I'd strongly recommend not to try messing
with WBXML binary data, but change the way the SyncML Toolkit's internal representation of the devInf is
created (the structs that contain the data which is then converted to WBXML/XML by the SyncML Toolkit).

This happens in TSyncSession::getLocalDevInfItem(), which in turn calls TSyncSession::newDevInf()
where the basic info is filled in, and then newLocalCTCapList() and newDevInfDataStoreList() are
called to create the datastore and CTCap lists.

Best Regards,

Lukas Zeller, plan44.ch
luz@... - www.plan44.ch

_______________________________________________
(Continue reading)

anuj chauhan | 9 Apr 15:43 2014
Picon

Photo Data getting truncated

Hi Patrick,

I am trying to syncronize image data with funambol server but while sending the data to server syncevolution is truncating the image data to somewhere
200-300 bytes.The actual image data was 2423 bytes.

Below is snippet of what  am trying to send(length of image data is 2423 bytes) :

BEGIN:VCARD
N:lastname3;firstname3;Kumar;Mr;Phd
ADR;HOME:;;Caprio;Demalio;Romania;RD3258;USA
ADR;WORK:;;Caprio;Demalio;Romania;RD3258;USA
PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhQUExQWFRQXGBUUFxUUFxQUFRUUFBQXFhUVFBQYHCggGBwlHBQUITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGywkHxwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLP/AABEIALcBEwMBIgACEQEDEQH/xAAcAAABB<...remainder of "B" encoded binary data...>
END:VCARD


           Outgoing Log Snippet

<?xml version="1.0" encoding="UTF-8"?><SyncML xmlns='SYNCML:SYNCML1.2'><SyncHdr><VerDTD>1.2</VerDTD><VerProto>SyncML/1.2</VerProto><SessionID>10</SessionID><MsgID>2</MsgID><Target><LocURI>http://qa2-sync.cs.san2.attcompute.com/sync/s;jsessionid=C2093D74FB04AA369B71C2638A0751C2</LocURI></Target><Source><LocURI>linux:ipolicy-HP-Compaq-dc7600-Convertible-Minitower</LocURI><LocName>guest</LocName></Source><Meta><MaxMsgSize xmlns='syncml:metinf'>150000</MaxMsgSize><MaxObjSize xmlns='syncml:metinf'>4000000</MaxObjSize></Meta></SyncHdr><SyncBody><Status><CmdID>1</CmdID><MsgRef>1</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd><TargetRef>linux:ipolicy-HP-Compaq-dc7600-Convertible-Minitower</TargetRef><SourceRef>http://qa2-sync.cs.san2.attcompute.com/sync/s</SourceRef><Data>200</Data></Status><Status><CmdID>2</CmdID><MsgRef>1</MsgRef><CmdRef>5</CmdRef><Cmd>Results</Cmd><SourceRef>./devinf12</SourceRef><Data>200</Data></Status><Status><CmdID>3</CmdID><MsgRef>1</MsgRef><CmdRef>6</CmdRef><Cmd>Alert</Cmd><TargetRef>./addressbook</TargetRef><SourceRef>./Contact/Unfiled</SourceRef><Data>200</Data><Item><Data><Anchor xmlns='syncml:metinf'><Next>20140409T111222Z</Next></Anchor></Data></Item></Status><Sync><CmdID>4</CmdID><Target><LocURI>./Contact/Unfiled</LocURI></Target><Source><LocURI>./addressbook</LocURI></Source><Add><CmdID>5</CmdID><Meta><Type xmlns='syncml:metinf'>text/x-vcard</Type></Meta><Item><Source><LocURI>1003</LocURI></Source><Data><![CDATA[

BEGIN:VCARD
N:lastname3;firstname3;Kumar;Mr;Phd
X-CT:PERSON
PHOTO;JPEG;ENCODING=BASE64:/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhQUExQWFRQXGBUUFxUUFxQUFRUUFBQXFhUVFBQYHCggGBwlHBQUITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGywkHxwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLP/AABEIALcBEwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAAIDBQY=

VERSION:2.1
END:VCARD


]]></Data></Item></Add><Add><CmdID>6</CmdID><Meta><Type xmlns='syncml:metinf'>text/x-vcard</Type></Meta><Item><Source><LocURI>1006</LocURI></Source><Data><![CDATA[BEGIN:VCARD

Please  look into the problem and guide me on it if something is required on client end.

Regards
Anuj Chauhan 

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Anuj | 2 Apr 10:02 2014
Picon

How to synchronise image with server

Hi ,
I want to synchronise image with server but have no clue of its representation in 
vCard.Do I need to put URL of image in vCard photo field or entire image data need to be put in vCard.kindly
guide me on this issue 
I am using file based backend for syncevolution.

Thanks and regards
Anuj Chauhan
Lukas Zeller | 13 Mar 08:59 2014
Picon

Re: Varying Property types values representation in xml

Hi Sachin,

please have a look at my answer to Rajesh (just a few minutes ago on the mailing list), this is closely related.

Basically, "HOME,VOICE" is *not* a single enum value, but a list of two separate enums, "HOME" and "VOICE".
The "bitmap" and "multimix" mapping modes in libsynthesis support mapping such enums into a bitfield value.

However in the devInf, you'll always have the basic enum values, not combinations.

Best Regards,

Lukas

On 08.03.2014, at 17:10, Sachin Gupta <chingupt@...> wrote:

> Hi Lukas,
> 
> I am trying to modify the capabilities for a set of TEL values.
> Normally we have the representation as:
> 
> <Property> 
> <PropName>TEL</PropName> 
> <PropParam> 
>   <ParamName>TYPE</ParamName> 
>   <ValEnum>CELL</ValEnum> 
>   <ValEnum>VOICE</ValEnum> 
>   <ValEnum>FAX</ValEnum> 
>   <ValEnum>PAGER</ValEnum> 
>   <ValEnum>OTHER</ValEnum> 
>   <ValEnum>PREF</ValEnum> 
> </PropParam> 
> </Property>
> 
> In this case the represenation is quite easy as explained in the doc and the sample config.
> 
> But how do i represent a format in the config xml for:
> 
> <Property> 
> <PropName>TEL</PropName> 
> <PropParam> 
>   <ParamName>TYPE</ParamName> 
>   <ValEnum>CELL</ValEnum> 
>   <ValEnum>HOME,VOICE</ValEnum> 
>   <ValEnum>WORK,VOICE</ValEnum> 
>   <ValEnum>WORK,FAX</ValEnum> 
>   <ValEnum>HOME,FAX</ValEnum> 
>   <ValEnum>PAGER</ValEnum> 
>   <ValEnum>OTHER</ValEnum> 
>   <ValEnum>PREF</ValEnum> 
> </PropParam> 
> </Property>
> 
> Also what will be the expected properties in the file based vcard for these highlighted ones?
> 
> Regards
> Sachin

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Lukas Zeller | 13 Mar 08:53 2014
Picon

Re: How to control SyncType in SyncCap

Hi,

On 11.03.2014, at 11:57, anuj chauhan <acdoon@...> wrote:

> Thanks for replying ,the flag that you mentioned <syncmodeextensions>
> Can you explain how it could be used to control desired capabilities,
> or how is  it used in config.

It's just a boolean flag, to be used inside <client> or <server> like

  <syncmodeextensions>no</syncmodeextensions>

This would switch off the special high-numbered sync modes used in SyncEvolution.

Best Regards,

Lukas Zeller
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
rajesh kumar pawar | 12 Mar 11:00 2014
Picon

issues with combination of TYPE

Hi Lukas,

I am working to customize the Syncevolution and am facing issues with
combination of TYPE parameters.

The problem I am facing is that the syncevolution is not producing
FLAGS or the Bitmap values for the instances where there is a
combination of TYPES like HOME,INTERNET etc.

Below are the things that may help in reference

configuration xml for Syncevolution

Fieldlist:
*
*
      <field name="EMAIL" array="yes" compare="conflict" type="multiline"/>
      <field name="EMAIL_FLAGS" array="yes" compare="conflict" type="integer"/>
      <field name="EMAIL_LABEL" array="yes" compare="conflict" type="string"/>
     <field name="EMAIL_ID" array="yes" compare="conflict" type="integer"/>
*
*
*
Mimeprofile:
*
*
         <property name="EMAIL" suppressempty="yes">
            <value field="EMAIL"/>
            <position field="EMAIL" increment="1" minshow="1" repeat="array"/>
            <parameter name="TYPE" default="yes" positional="no" show="yes">
               <value field="EMAIL_FLAGS" combine="," conversion="multimix">
                  <enum name="WORK,INTERNET" value="B0"/>
                  <enum name="HOME,INTERNET" value="B1"/>
                  <enum name="INTERNET" value="B2"/>
                  <enum name="PREF" value="B3"/>
               </value>
            </parameter>
         </property>

vCard in addressbook (file based):

Before sync:
       EMAIL;WORK;INTERNET:work@...
       EMAIL;HOME;INTERNET:home@...
       EMAIL;INTERNET:internet@...

After sync:
       EMAIL;INTERNET:work@...
       EMAIL;INTERNET:home@...
       EMAIL;INTERNET:internet@...

Log shows the following :

- 17 :  multiline EMAIL           [1000, 100,     0] : <array with 3 elements>
                                     -- element    0 : "work@..."
                                    -- element    1 : "home@..."
                                     -- element    2 : "internet@..."
- 18 :  integer EMAIL_FLAGS       [   0, 100,     0] : <array with 3 elements>
                                     -- element    0 : 4
                                     -- element    1 : 4
                                     -- element    2 : 4

What I understand from the logs is, syncevolution or the piece of
code, that sets the values of the flags according to the TYPE
mentioned in the vCard for EMAIL is working correctly for the EMAIL
address that is only of TYPE=INTERNET since it is setting a value of
"4" i.e. flag as 0100, which implies B2 is set. While for TYPE=
HOME,INTERNET it is not generating proper flag value "2" i.e. 0010 B1
is set

Please let me know if my understanding is wrong or there is any change
that needs to be made.

Thank you,
Rajesh
Sachin Gupta | 6 Mar 20:13 2014
Picon

Display name of a field and data type in the outgoing devinf

Hi lukas,

How can i set the xml of libsynthesis so that the outgoing devinf shows the displayname and also the datatype?

Do i need to change some code or can it be controlled from the xml?

Regards
Sachin

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Lukas Zeller | 6 Mar 14:09 2014
Picon

Re: How to control SyncType in SyncCap

Hi Anuj,

On 06.03.2014, at 13:41, anuj chauhan <acdoon@...> wrote:

> Can we control and define SyncType  externally or via code.
>  
> Example , I wish to send only these two types below in output dev inf
> <SyncCap>
> <SyncType>1</SyncType>
> 
> <SyncType>7</SyncType>
> 
> </SyncCap>
> 
> I want to control SyncType that we send to the server in output devinf.

It seems that you have an ongoing battle against the automatic devInf generator in libsynthesis :-)

libsynthesis was designed to create the devInf (information about the capabilities of a SyncML peer)
according to the actual capabilities, which means devInf is not just *set*, but *derived* from the actual
capabilities of the database backend. Many traditional SyncML clients and servers suffered from bad
devInf someone just wrote as a piece of XML, and later forgot to update when supported fields, modes, etc.
changed, and so became inconsistent and misleading. That's why libsynthesis does NOT give any direct
influence to devInf in the config.

So if you need to do non-standard things, then you need to change libsynthesis code. The generation of
devInf is done starting in syncsession.cpp's TSyncSession::newDevInf(), and progressing into each
datastore's TLocalEngineDS::newDevInfDatastore() to collect their details. SyncModes in
particular are generated in TLocalEngineDS::newDevInfSyncCap().

The only config flag directly influencing devInf SyncCap is <syncmodeextensions>, which is used to
enable/disable the non-standard sync modes used by SyncEvolution (disabled by default).

Best Regards,

Lukas Zeller
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
anuj chauhan | 5 Mar 12:02 2014
Picon

How to control SyncCapabilit

Hi Patrick,
 
How is  creation of  <SynCap> controlled in syncevolution.
I have following feild in my outgoing xml 
<SyncType>3900001</SyncType> .
I want to remove this from outgoing devinf.
Please guide.
 
Regards
Anuj Chauhan
 
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Gmane