Is it possible to register a callback of dbus signal with a structure payload by dbus_g_proxy_add_signal()?

Matt Lo Matt.Lo at BenQ.com
Fri Oct 31 03:06:34 PDT 2008


Dear DBus Fellows,

   Is it possible for dbus-glib-binding to register a callback of dbus
signal with a structure payload? For example, the GnomeVFS daemon emits
a 'VolumeMountedSignal' dbus signal on SESSION bus once it has detected
a volume had been mounted. And the data payload of this signal looks
like this:

signal sender=:1.11 -> dest=(null destination)
path=/org/gnome/GnomeVFS/Daemon; interface=org.gnome.GnomeVFS.Daemon;
member=VolumeMountedSignal
	struct {
		int32 	72
		int32	0
		int32	3
		int32	52
		string	"file:///media/disk"
		string	"vfat"
		string	"3.7 GB Removable Volume"
		string	"gnome-dev-harddisk-usb"
		boolean	ture
		boolean	false
		boolean	true
		string	"/dev/sdb1"
		int32	2065
		string
"/org/freedesktop/Hal/devices/volume_uuid_022D_E511"
		string	""
	}

  My question is: how should I specify the GType list for
dbus_g_proxy_add_signal() to register a callback for this signal?
  I've googled for a while searching the answer and it seems that
'Specializable GType System' *might* be a solution. However, after I've
register a struct type by dbus_g_type_register_struct(), use
dbus_g_type_get_struct() to retrieve a specialized GType, and then feed
this GType in dbus_g_proxy_add_signal(). I still got no callback.
   Any advice for me?

Best Regards,
Matt Lo 
Ext #2006



**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure. 


More information about the dbus mailing list