An ecore loop based libpurple client...

Anderson Briglia anderson.briglia at openbossa.org
Thu Apr 9 08:21:18 EDT 2009


Hi,

On Mon, Apr 6, 2009 at 12:01 PM, Ethan Blanton <elb at pidgin.im> wrote:

> "Marco Trevisan (Treviño)" spake unto us the following wisdom:
> > Hello, I'm posting here what I've already posted in enlightenment-devel
> > since we're still looking for a solution for getting a libpurple client
> > to work with ecore (that would allow to write an EFL GUI around it).
>
> Great!  We're always excited to see new UIs and new opportunities for
> libpurple.  :-)


We have a registered project called: Python-purple for Maemo[1]. Even it is
"for Maemo", I guess the code and an example there could help you to see
libpurple being used by other GUI's.
Python-purple is a python binding for libpurple. We have a nullclient[2]
written in python which have a python-efl GUI. Note that this client is very
minimal and python-purple itself is in a initial phase as well.

[1] http://garage.maemo.org/projects/python-purple/
[2] http://git.maemo.org/projects/python-purple/gitweb?p=python-purple

Regards,

Anderson Briglia


>
>
> > Hello, today as a first step, I've tried to port the libpurple example
> > "nullclient.c" to make it use the ecore_loop instead of the GMainLoop.
> >
> > To get this, I had mostly to write the wrapper functions needed to
> > populate the PurpleEventLoopUiOps struct.
> > Thanks to the ecore_timer* and the ecore_main_fd* functions all this was
> > quite easy, and you can see my result looking at the nullclient-ecore.c
> > attached file.
>
> Sounds good so far.  I haven't looked at your code yet, but something
> in your email caught my eye as a potential sign...
>
> [snip]
>
> >  - If I run it in gdb or I set to TRUE the purple_debug_set_enabled
> >    function, I can connect to the server with no problems, and as you
> >    can see here [2], also the null_write_conv callback is working well
> >    since I receive the incoming messages.
>
> This sounds like a race condition.  Both gdb and stdio stderr (used by
> purple_debug) often cause serializaton of actions in a threaded
> environment.  It looked to me from a brief glance through your code
> that you're not using threads, but is it possible that ecore is using
> threads behind your back?  If so, you may need to do some more work to
> ensure safety of the various libpurple mainloop entry points.  (If
> not, we'll have to look harder.)
>
> Ethan
>
> --
> The laws that forbid the carrying of arms are laws [that have no remedy
> for evils].  They disarm only those who are neither inclined nor
> determined to commit crimes.
>                -- Cesare Beccaria, "On Crimes and Punishments", 1764
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFJ2NXJr9kA9Ig8HBQRAgavAJwJhi0QEO1ZUONG85d/azSyND2mgACghSc5
> Lb2tsE7W5eVjW5aJZzNTt+Y=
> =Up0p
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20090410/eb822a77/attachment.html>


More information about the Devel mailing list