Re: GTypeInfo problems..

Francis Brosnan Blázquez <[email protected]> 03 Jan 2003 15:56:21 +0100
Newsgroups gmane.network.beep.roadrunner.general
Organization Advanced Software Production Line, S.L.
Message-ID <[email protected]>
--=-IQ9WoUUdXoxQVXPV+5ZP
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

El vie, 03-01-2003 a las 14:59, Jonas Borgstr=F6m escribi=F3:
> Francis Brosnan Bl=E1zquez <[email protected]> writes:
>=20
> > Hi.
> >=20
> Hi,
>=20
Hi..
> > I don't if this is the right place to ask about my problem, so excuse
> > me. X'D
> >=20
> > I want to allow to configure which handler will be executed when
> > something happens, so I have created a public structure that has to be
> > passed to my GType init function. My function looks as follow:
> >=20
>=20
> *snip*
>=20
> >=20
> > Has anybody any idea about this?
>=20
> You should probably create a config struct which holds user
> configurable parameters. The CVS version of the sasl profile uses such
> an object. It works like this:
>=20
> http://rr.codefactory.se/cgi-bin/viewcvs.cgi/sasl/librrsasl/rr-saslconfig=
.h?rev=3D1.1&content-type=3Dtext/vnd.viewcvs-markup
>=20
> /* Create a configuration object */
> cfg =3D rr_sasl_config_new ();
> /* Register a custom password callback */
> rr_sasl_config_set_password_cb (cfg, ask_pass, NULL);
>=20
> The cfg parameter can be passed to the profile in two
> ways.
>=20
> 1: as the last parameter to the "rr_profile_registry_add_profile"
>    function. This is the only way to pass config values to a
>    listening peer (server). The profile can then access the
>    value from "RR_CHANNEL (profile)->global_config".
>=20
> 2: configuation values can also specified for each beep channel
>    start request as the forth parameter to rr_connection_start.
>    The profile can access the value as:
>    "RR_CHANNEL(profile)->instance_config"
>=20
> / Jonas

Surely, after thinking about my problem a little more I have realized
that I should do like you say, so I started to take a look to Andrea
Campi's rrcap profile. It's the same idea like saslconfig, but thanks a
lot.

BTW, I have observed that, at the server-side, close_indication event
arrives before the last one frame sent, but client-side calls to
rr_channel_close after send all messages. Is this correct?, I mean, will
it have the same behaviour always or could close_indication event arrive
after the last one frame sent?.

Thanks a lot.
--=20
Francis Brosnan Bl=E1zquez <[email protected]>
Advanced Software Production Line, S.L.

--=-IQ9WoUUdXoxQVXPV+5ZP
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje esta firmada digitalmente

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+FaSUKpXqflIzvBcRAvzVAKCSoqChjhvOATXHupRct/P18DyDuQCgqlZ1
ufsRufFmvhh4kc+ORbuZ0fg=
=ZVPh
-----END PGP SIGNATURE-----

--=-IQ9WoUUdXoxQVXPV+5ZP--