After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 560034 - Rewrite D-Bus server support
Rewrite D-Bus server support
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: D-Bus
0.5.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-09 16:17 UTC by Jürg Billeter
Modified: 2008-12-14 19:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Incomplete patch (33.04 KB, patch)
2008-11-09 16:25 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (60.90 KB, patch)
2008-11-15 11:02 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (36.41 KB, patch)
2008-11-21 19:53 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (42.25 KB, patch)
2008-12-12 17:09 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (53.88 KB, patch)
2008-12-12 19:25 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (59.50 KB, patch)
2008-12-12 21:39 UTC, Jürg Billeter
needs-work Details | Review
Updated patch (63.57 KB, patch)
2008-12-13 08:35 UTC, Jürg Billeter
none Details | Review
Updated patch (63.57 KB, patch)
2008-12-13 14:03 UTC, Jürg Billeter
none Details | Review
Updated patch (63.54 KB, patch)
2008-12-13 15:28 UTC, Jürg Billeter
none Details | Review
Updated patch (65.86 KB, patch)
2008-12-13 19:40 UTC, Jürg Billeter
none Details | Review
Fix signals with array parameters in DBus classes (1.35 KB, patch)
2008-12-13 23:58 UTC, Ali Sabil
none Details | Review
Updated patch (67.88 KB, patch)
2008-12-14 08:17 UTC, Jürg Billeter
none Details | Review
Updated patch (71.25 KB, patch)
2008-12-14 15:17 UTC, Jürg Billeter
none Details | Review
Updated patch (74.56 KB, patch)
2008-12-14 16:05 UTC, Jürg Billeter
none Details | Review
Updated patch (83.13 KB, patch)
2008-12-14 17:27 UTC, Jürg Billeter
committed Details | Review

Description Jürg Billeter 2008-11-09 16:17:26 UTC
The current D-Bus server support has some limitations in the support of container types due to the necessary conversions to dbus-glib recognized types. It probably makes sense to avoid the dbus-glib type system and directly use the libdbus API.
Comment 1 Jürg Billeter 2008-11-09 16:25:48 UTC
Created attachment 122269 [details] [review]
Incomplete patch

This patch uses libdbus to read and write D-Bus values, however, the type support is still incomplete.
Comment 2 Jürg Billeter 2008-11-15 11:02:24 UTC
Created attachment 122722 [details] [review]
Updated patch

I've completed draft support for reading and writing values of all types: basic types, variants, arrays, structs, and hash tables. Memory management and conflict handling with temporary variables still need to be implemented.

Still missing to complete server support: properties, signals, introspection, and error handling.

The type serialization can be reused for D-Bus client support. It probably makes sense to first switch client support to libdbus as this should require less work.
Comment 3 Jürg Billeter 2008-11-21 17:04:07 UTC
2008-11-21  Jürg Billeter  <j@bitron.ch>

	* gobject/Makefile.am:
	* gobject/valaccodebasemodule.vala:
	* gobject/valadbusclientmodule.vala:
	* gobject/valadbusmodule.vala:
	* vapi/dbus-glib-1.vapi:

	Add partial static D-Bus client support without dbus-glib
	marshalling
Comment 4 Jürg Billeter 2008-11-21 17:31:08 UTC
2008-11-21  Jürg Billeter  <j@bitron.ch>

	* gobject/valadbusclientmodule.vala:
	* gobject/valadbusmodule.vala:

	Support serialization and deserialization of arrays in static
	D-Bus clients
Comment 5 Jürg Billeter 2008-11-21 19:01:57 UTC
2008-11-21  Jürg Billeter  <j@bitron.ch>

	* gobject/valadbusclientmodule.vala:
	* gobject/valadbusmodule.vala:

	Support serialization and deserialization of structs in static
	D-Bus clients
Comment 6 Jürg Billeter 2008-11-21 19:19:31 UTC
2008-11-21  Jürg Billeter  <j@bitron.ch>

	* gobject/valadbusmodule.vala:

	Support serialization and deserialization of GValue values in
	static D-Bus clients
Comment 7 Jürg Billeter 2008-11-21 19:44:52 UTC
2008-11-21  Jürg Billeter  <j@bitron.ch>

	* gobject/valadbusmodule.vala:

	Support serialization and deserialization of GHashTable objects
	in static D-Bus clients
Comment 8 Jürg Billeter 2008-11-21 19:53:54 UTC
Created attachment 123192 [details] [review]
Updated patch

Initial draft of static client support is now in trunk. I've attached the updated patch for the server part.
Comment 9 Jürg Billeter 2008-12-12 17:09:53 UTC
Created attachment 124537 [details] [review]
Updated patch

Added signal support
Comment 10 Jürg Billeter 2008-12-12 19:25:39 UTC
Created attachment 124548 [details] [review]
Updated patch

Added property support.
Comment 11 Jürg Billeter 2008-12-12 21:39:57 UTC
Created attachment 124553 [details] [review]
Updated patch

Added introspection support.

Error handling is still missing and then we need to start testing and fixing bugs.
Comment 12 Jürg Billeter 2008-12-13 08:35:39 UTC
Created attachment 124566 [details] [review]
Updated patch

Added basic error handling and support for a special first method parameter:

    DBus.BusName? sender

Now we need a lot of testing.
Comment 13 Jürg Billeter 2008-12-13 14:03:46 UTC
Created attachment 124582 [details] [review]
Updated patch

Fixed typo in previous patch.
Comment 14 Jürg Billeter 2008-12-13 15:28:34 UTC
Created attachment 124590 [details] [review]
Updated patch

Fixed bug in code generation for signal parameters.
Comment 15 Jürg Billeter 2008-12-13 19:40:00 UTC
Created attachment 124601 [details] [review]
Updated patch

This update avoids creating marshalling code more than once for the same method, property, or signal.
Comment 16 Ali Sabil 2008-12-13 23:58:06 UTC
Created attachment 124614 [details] [review]
Fix signals with array parameters in DBus classes

The attached patch fixes the support for arrays in signals with the new DBus server implementation.
Comment 17 Jürg Billeter 2008-12-14 08:17:33 UTC
Created attachment 124629 [details] [review]
Updated patch

Thanks. This update includes the signal array fix and fixes an issue with inherited properties.
Comment 18 Jürg Billeter 2008-12-14 15:17:06 UTC
Created attachment 124647 [details] [review]
Updated patch

Yet another update. This fixes registering objects where the static type differs from the dynamic type and it also fixes introspection of inherited members.
Comment 19 Jürg Billeter 2008-12-14 16:05:22 UTC
Created attachment 124650 [details] [review]
Updated patch

This update includes child nodes in introspection information.
Comment 20 Jürg Billeter 2008-12-14 17:27:19 UTC
Created attachment 124659 [details] [review]
Updated patch

Fixed missing include and implement GetAll D-Bus method.
Comment 21 Jürg Billeter 2008-12-14 19:36:56 UTC
2008-12-14  Jürg Billeter  <j@bitron.ch>

	* gobject/valaccodebasemodule.vala:
	* gobject/valadbusservermodule.vala:
	* gobject/valagsignalmodule.vala:
	* vapi/dbus-glib-1.vapi:

	Rewrite D-Bus server support to directly use libdbus without
	dbus-glib marshalling, fixes bug 560034 and bug 549980

	Support BusName sender parameter in exported D-Bus methods

Fixed in r2147.