Re: Signals with gchar** arguments



On Thu, 2007-11-15 at 13:06 +0000, Emmanuele Bassi wrote:
> On Thu, 2007-11-15 at 12:52 +0100, Mathias Hasselmann wrote:
> 
> >     static void
> >     authenticate (SoupSession  *session, 
> >                   /* other arguments... */
> >                   gchar       **username,
> >                   gchar       **password,
> >                   gpointer      user_data)
> >     {
> >       /* ... */
> > 
> >       g_free (*username);
> >       *username = g_strdup (lookup_username ());
> > 
> >       /* ... */
> >     }
> > 
> > Notice that this use of "gchar**" arguments is different from the usage
> > as "NULL terminated arrays of strings", aka. "G_TYPE_STRV".
> 
> this is probably the most evil use of signals I've seen in a while. ;-)
> 
> the SoupSession should really take a AuthenticateCallback function and
> emit a signal on success or one on failure.

That makes a lot of sense. It wouldn't make sense to have two signal
handlers connected to this signal. Mathias, could you please turn the
signal into a set_func() in our libepc.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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