Signals with more than one parameter
steve.kreyer at web.de
Fri May 18 08:24:40 PDT 2007
Havoc Pennington wrote:
> Steve Kreyer wrote:
>> I'm new to DBus. I'm using the glib- binding to develop an "IPC-
>> application". I can send signals with one parameter over DBus, but it
>> doesn't seem to work with more than one parameter. Is it possible in
> Should work fine.
>> Also I wonder that there isn't any marshal information for a
>> particular signal in dbus_glib__object_info, like it is the case for
>> methods ...
> That's because the marshal info is already in the GObject; see your
> call to g_signal_new(), that is registering the signal and its
> introspection info.
>> Maybe you have some hints on how I can extend the following peace of
>> code to send signals with more than 1 parameter?
> Did you forget to change g_signal_new() and related places also? There
> are a number of places you would need to change the code.
First, thanks for your answer ...
Ok, I see. But I didn't get it to work. I see 2 main problems here for me:
1.) glib doesnt provide a matching closure. Do I have to implement it by
myself ? If yes, is there any doc outside on how I can do this ?
2.) If I add a signal at client side:
and register the same signal on server side, like this:
g_signal_id = g_signal_new ("kbd_event",
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
g_cclosure_marshal_VOID__INT, /* don't know what
closure to choose */
I get an error on client side while registering the signal:
** (process:8607): WARNING **: No marshaller for signature of signal
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070518/b0024c76/attachment.bin
More information about the dbus