Le dimanche 25 janvier 2009 à 03:07 -0500, Chris Frey a écrit :
> 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?

If I make a simple port, the code will be less clean.

But I want quickly get a result :)

> > 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.

OK, I have begun in C++ with autotools.
For the moment, I work from the opensync plugin 0.22.
But there is an other way : work from the sample plugin then add
manually the barry functions...

> 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.

Unfortunetly, there is a lot of work :(
Moreover, I don't know the barry code neither the opensync code :/

> 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.

It isn't the most difficult :)

> 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 don't know if I will have the time to finish the plugin porting.
I keep this on my laptop, and if my work seems ready, I will do a fork
(or a patch if the release of 0.15 will be already out).

> 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.

Yes, I think that the better thing is keep the two plugins (0.22 and 0.4x)

barry/opensync-plugin-0.22/src
barry/opensync-plugin-0.4x/src

Regards,

-- 
Nicolas VIVIEN


------------------------------------------------------------------------------
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

Reply via email to