|
From: deloptes <del...@ya...> - 2010-10-05 23:51:35
|
Chris Frey wrote: > Great news! I so far haven't had the time to setup an akonadi system > here to test with, but I'm sure there are Akonadi fans out there who > can help test. :-) Personal thanks for your support and guiding. I will need to have a look into configure/discover/initialize. I am afraid I've misunderstood what it is doing exactly at that time. I need confirmation on the scenario to save time on reading and looking into the documentation or other code. What I did not understand is that the library is taking action on configure (running with --config option) and that it keeps somewhere track of what is supported/enabled, so I think the right flow would be 1 --configure (initial) 2 --discover 3 --configure 4 --sync in 1 you start with the default config (providing information on what is supported by the plugin and announcing it to the library in 2 you discover supported features (means verify the opposite side supports this too). in 3 you set configuration on what was already configured i.e. you know that akonadi definitely supports events/contacts etc and you can choose what you would like to use in 4 you initiate the sync process for the enabled ressources Well, if those assumptions are true, then the plugin is doing some wired things :-). I'm sorry for this. I need a bit of assistance here. I'm moving to the next step to do the calendar sync with its components. The challenge I am facing now is that if I enable calendar it enables also "birthdays & anniversaries" ressource which appears as second ressource and overwrites the url of the previously discovered ressource in the config. So I am back to the point how to manage multiple akonadi collections from the same type. I think I need to introduce a new function for creating of ressource and putting into the config. The need is obvious. In default configuration you can not put something you don't know. The better approach however is to drop the <Url>default</Url> property from the config and let the plugin manage the collections itself. I will introducing mimetype to the config and filter based on mimetype through the collection and let the plugin manage the rest. The name would be then a generic one like "Contacts" and will be not overwritten in the discover step 2 and step 3 will be optional. So summing up in 1 you can define which types of objects you are interested in. in 2 you will discover what types akonadi supports and this will be written in the config. Here I will rewrite the discover function to map objType to mimeType in 3 you will be able to select what objects you want to sync in the actual sync the plugin will find the collection based on mimetype and get the desired item to do the change. I will need also support for few error cases and reporting to the library, also what kind of actions can be taken on failure (hashtable actions or what?) many thanks and regards |