Fix a crash in funcsig_hash

Colin Walters walters at verbum.org
Mon Jun 20 12:32:20 PDT 2005


On Fri, 2005-06-17 at 10:45 -0700, Ryan Gammon wrote:

> I might be doing this totally wrong -- I used to have a HXDBusPlayer 
> that derived from DBusGProxy, and I created my signals with 
> dbus_g_proxy_add_signal. 

Ah, no, you don't want to derive from DBusGProxy.  Its signals are
different from GLib signals; clients of DBusGProxy have to use
dbus_g_proxy_connect_signal.

> HXDBusPlayer implements a HXBasicPlayback 
> GInterface, HXBasicPlayback has a hx_basic_playback_get_video_area 
> method that returns a GtkWidget which gets packed into the ui.

You can't pass the widget over the bus, though, no?  So this is a method
only for the embedded case?

> I was thinking that doing a g_signal_connect to a signal defined with 
> dbus_g_proxy_add_signal might work, but it wasn't at the time.

Yeah, it won't work; you should think of the DBusGProxy as a bundle of
convenience methods for talking to the remote object, not as the remote
object itself.  We can't create GLib signals because GLib signals are
based on a GType, so unless we go the route of creating new GObjectClass
at runtime, it won't work.  And creating a class is going to have its
own problems with efficiency etc.

> I then moved the DBusGProxy into my HXDBusPlayer as a member, and 
> emitted the signals manually.

This sounds right.

> In general, I'm trying to use an asynchronous signal for errors. This 
> will kinda suck in terms of writing a player that deals well with 
> errors, but the general idea is to have something that can generically 
> wrap a number of engines, and different engines tend to report their 
> errors in different ways at different times.

Ok.  Reasonable enough.

> I haven't figured out how I'm going to marshal that GError across yet... 
> I have this vague idea I should look at G_TYPE_BOXED.

Well...if you're just using DBus essentially as a private IPC mechanism
in your app (i.e. between two GObject-based programs), then marshalling
GErrors (domain/code) across probably makes sense.  But if you'd also
like to allow e.g. Python clients, you want to use the DBus error
mechanism (which the GLib bindings don't really support yet, but need
to).

> Cool, any idea what the xml syntax might look like?

Probably like:

<annotation name="org.freedesktop.DBus.GLib.ReturnParameter" value="foo"/>

This would also imply the method doesn't return an error.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050620/dc79654a/attachment.pgp


More information about the dbus mailing list