|
From: Graham C. <g+o...@co...> - 2009-11-01 00:39:37
|
On Friday 30 October 2009 21:49:22 Daniel Gollub wrote: > Currently, there is need of stub plugin, which registers the plugin to the > OpenSync environment. As Graham already suggested in a seperated thread, > we'll very likely change it - so there is only need to write a simple > configuration file to register external plugins. I have a first cut of the external plugin config file ready to check in (http://opensync.pastebin.com/m38d98a95). But I have a couple of questions: 1) When I run the unittests, 17 of them fail. I don't *think* any of them are related to these changes but is that expected at the moment? The following tests FAILED: 36 - filter_sync_deny_all (Failed) 176 - lock_dual_sync_engine_lock (Failed) 206 - mapping_engine_same_similar_conflict (Failed) 207 - mapping_engine_same_similar_conflict2 (Failed) 208 - mapping_engine_same_similar_conflict_multi (Failed) 227 - multisync_dual_new (Failed) 228 - multisync_triple_new (Failed) 239 - multisync_conflict_data_duplicate (Failed) 240 - multisync_conflict_data_duplicate2 (Failed) 246 - sync_easy_conflict (Failed) 247 - sync_easy_new_mapping (Failed) 248 - sync_easy_conflict_duplicate (Failed) 249 - sync_easy_conflict_abort (Failed) 250 - sync_conflict_duplicate2 (Failed) 251 - sync_conflict_delay (Failed) 256 - sync_large (Failed) 261 - sync_initial_slow_sync (Failed) If it is not expected I will have to do some more checking. 2) I have created an example external plugin config file in docs/examples/plugins/src. Can the existing CMake macros be used to get that file installed into the plugin directory (which is where I am looking for it -- I look for .xml files first, then .so files)? I haven't tried it but I assume the macros like OPENSYNC_PLUGIN_INSTALL expect a .so file. I really don't know CMake -- can anyone advise how to get my .xml file installed into the plugin directory? The new code seems to work but there are a few things that still need to be done: 3) The XML format includes <ExternalCommand> but I currently ignore it. My plan is that this should be saved in the plugin structure and could be used as a default for the config option that Henrik is adding. 4) If the .xml and the .so are both present, they both get loaded and two plugins exist with the same name. I thought of adding error checking to osync_plugin_set_name to fail if a plugin of the same name is already loaded. But I have just noticed that none of the osync_plugin_set_... calls have OSyncError parameters. Should they? This would be an API change (to a widely used API). 5) There is no unittest for this code yet. I'm not sure if I will get time to work on this further on Sunday -- I will check it in by the end of Sunday. Graham |