On Sat, Jan 24, 2009 at 06:00:33PM +0100, Nicolas wrote: > Hi, > > I'm working about the opensync plugin porting to 0.4x.
Great! > The API of opensync project has a lot of changements. Yes. It might be worth looking at some of their own plugins and comparing the changes between file-sync 0.22 and their latest devel tree. > What solution do you wish ? > - simple porting (but the code is quiet ugly) > - proper way > > Proper way is longer (in time) Since opensync is steadily growing closer to an 0.40 release, let's go the simple port first. Which code is ugly? > Also, you prefer work in C / C++ ? use autotools / cmake ? > > I ask it, because opensync plugin sample is in C and is built with > cmake. Ahh... You'll have to use C++ for the plugin, similar to the current 0.22 plugin code. I'd use the same opensync-plugin as a base for your work, and just keep using autotools. I haven't looked closely at the build procedure for external plugins, but it can't be that hard, and they use pkg-config, so changing the current configure and automake scripts to point to the new pkg-config files should be all you need. The current 0.22 plugin uses C++, and only needs one C exported function: extern "C" { BXEXPORT void get_info(OSyncEnv *env); } That's in barry_sync.cc. I doubt you'll need too many more for the new 0.4x API. I have a few extras in the extern "C" list, but that was a leftover, and not necessary. The main thing you need to watch is exceptions... don't let them escape into the C side of opensync. Catch all exceptions and return errors into C land appropriately. You use git right? Do you want to open a fork on repo.or.cz for your plugin work? I don't want to include the new plugin until it is ready, so it doesn't hold up the release of 0.15. I don't mind including a devel branch in Barry's git tree, to include your work as you go. I can just pull every so often. I would start by copying opensync-plugin to opensync-0.4x and working there. I believe 0.22 will hang around for a little while, even after 0.4x is released, so I want both plugins available in Barry. If you have any questions, let me know. Thanks, - Chris ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel