Re: [Vala] Vala DBus gpointer question
- From: "Alexandre Moreira" <alexandream gmail com>
- To: eGore <eGore gmx de>
- Cc: vala paldo org
- Subject: Re: [Vala] Vala DBus gpointer question
- Date: Tue, 18 Sep 2007 20:44:23 -0300
On 9/18/07, eGore <eGore gmx de> wrote:
-------- Original-Nachricht --------
Datum: Tue, 18 Sep 2007 09:23:48 +0200
Von: "eGore" <eGore gmx de>
An: vala paldo org
Betreff: [Vala] Vala DBus gpointer question
Hi list,
I'm playing around with the Vala DBus bindings and I'm quite happy with
it. I ran into one issue which I'm currently unable to resolve. I have a
method that is a signal handler. This signal handler has a variable that is of
the type "gpointer" in GLIB/C. What's the corresponding type in Vala?
Thanks and keep up the good work,
Christoph Brill
Ok, it seems removing the "gpointer user_data" stuff might work. Now I'm running into more trouble :-)
When I use the attached bluetooth-1.vala to register signals Vala generates a line like the following:
dbus_g_proxy_connect_signal (self->priv->bluez, "DiscoveryCompleted", ((GCallback)
blue_zdiscovery_discovery_completed), self, NULL)
This is (more or less) the same as my GLIB/C code, but the argrument "self" isn't. In my Code I have to
hand over the handle to DBusGConnection as parameter, but here the handle to the object is given. From what
I can tell self->priv->conn should be passed, right? Or am I completely misunderstanding DBus/GLIB?
Please anyone correct me if I'm wrong, but I guess I'll try to explain :)
Vala is passing the value of "self" because you're using a method to
hook to the signal. You can simply refer to self.conn inside the
method you're hooking to the signal and it should be fine.
Regards,
Alexandre Moreira.
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
_______________________________________________
Vala mailing list
Vala paldo org
http://www.paldo.org/mailman/listinfo/vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]