|
From: Chris F. <cd...@fo...> - 2010-09-18 20:43:37
|
Hi, My replies might come in a bunch, as there's lots to process here... let's start with the low level config file, since that's probably the most helpful: On Sat, Sep 18, 2010 at 04:15:50PM +0200, deloptes wrote: > This results in following xml file > > <?xml version="1.0"?> > <config version="1.0"> > <Resources> > <Resource> > <Enabled>1</Enabled> > <Formats> > <Format> > <Name>vcard30</Name> > </Format> > </Formats> > <Name>Address Book</Name> > <ObjType>Address Book</ObjType> > <Url>akonadi:?collection=4</Url> > </Resource> The format you've chosen is a vformat (vcard30), and one of the formats supported in opensync, so that's good. The ObjType is incorrect as far as I know. It needs to be one of the basic types associated with the formats, like the following: contact event todo note data This specifies *what* it is, and the format specifies how it looks, either VCARD, etc, or XML. The use of the URL setting is clever... if you have more than one "contact" collection in akonadi, perhaps you could string them together, and parse them later... something like: <Url>akonadi:?collection=4|akonadi:?collection=7</Url> i.e. "this is the resource for contacts, and I will send them to opensync in the vcard30 format, and I get them from collections 4 and 7. Just an idea. You don't have to worry at this stage how you're going to sort out the contacts between collections. In each change object (in get_changes()) there is a uid, and that's where you should put a reference to which collection it came from. I'm not familiar with akonadi, so maybe it already has some kind of uid or url which you can use. Basically, you need to set that uid to something that will uniquely identify a contact in the entire akonadi system. > <Resource> > <Enabled>1</Enabled> > <Formats> > <Format> > <Name></Name> > </Format> > </Formats> > <Name>outbox</Name> > <ObjType>outbox</ObjType> > <Url>akonadi:?collection=3</Url> > </Resource> I'm not sure, but I think the format Name is required. It would be one of the ones listed in your previous email... vcard30, xmlformat-contact-doc, etc. It tells opensync what you're going to send it. It's probably possible to send changes to opensync with a different format for each one, but this makes it simpler. - Chris |