Re: [GnomeMeeting-devel-list] Refactoring the addressbook code



Le mardi 28 mars 2006 à 12:58 +0200, Julien PUYDT a écrit :
> The implementation would not be pretty but would at least put us safely 
> into the glib mainloop :
> 
> struct stupid_foo_call_data {
>    /* whatever data is needed */
> };
> 
> void
> OpalSIPPresenceEP::Foo ()
> {
>   /* allocate and populate data, a stupid_foo_call_data */
>   g_idle_add (idle_foo, (gpointer)data);
> }
> 
> static gboolean
> idle_foo (gpointer data)
> {
>    /* data is really a stupid_foo_call_data ; get
>     * what is needed out of it, then free it  */
> 
>    /* do whatever we want to the glib object : change it,
>     * let it emit signals... no problem, we're in the glib mainloop */
> 
>    return FALSE;
> }
> 
> As I said, not pretty.
> 

Indeed, horrible... 
It means we need glib idle loops everywhere, and overload each function
of OPAL so that we can do that.

I'm not convinced it is a good idea.
-- 
 _      Damien Sandras
(o-     
//\     Ekiga Softphone: http://www.ekiga.org/
v_/_    FOSDEM 2006    : http://www.fosdem.org/
        SIP Phone      : sip:dsandras ekiga net
                         sip:600000 ekiga net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]