Re: Signals with gchar** arguments
- From: Murray Cumming <murrayc murrayc com>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Signals with gchar** arguments
- Date: Thu, 15 Nov 2007 17:00:38 +0100
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]