Bug 33757

Summary: bus driver should be able to implement several interfaces
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: enhancement    
Priority: medium CC: hp, me, robin.bateboerop, walters
Version: 1.5Keywords: patch
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/smcv/dbus-smcv.git;a=shortlog;h=refs/heads/bus-driver-methods-33757
Whiteboard: review+ from walters, 1.5
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 34040    
Attachments: bus driver: allow implementing more than one interface
[2/3] bus_driver_generate_introspect_string: close <interface> correctly
[3/3] bus_driver_generate_introspect_string: don't hard-code Introspect()

Description Simon McVittie 2011-01-31 05:50:19 UTC
The bus driver currently hard-codes support for two interfaces (o.fd.DBus and Introspectable, with the latter being a one-off special case).

If we gave it a lookup table of interfaces, we could add, for instance, a Debugging or Profiling interface for Bug #24307.

(In the longer term Colin wants such things to be on a secondary /var/run/dbus/system_bus_management_socket or some such, but splitting off interfaces now seems like a good start on that.)

Maemo/MeeGo has a patched dbus-daemon which links against libcreds (<http://meego.gitorious.org/meego-platform-security/libcreds2>); any libcreds-related functionality should also go on a conditionally-enabled interface.

The Unix- and SELinux-specific methods on o.fd.DBus could also have gone on separate interfaces, if we'd had this at the time.
Comment 1 Simon McVittie 2011-01-31 05:51:21 UTC
Created attachment 42749 [details] [review]
bus driver: allow implementing more than one interface
Comment 2 Colin Walters 2011-01-31 10:09:19 UTC
Review of attachment 42749 [details] [review]:

Looks good to me.
Comment 3 Simon McVittie 2011-01-31 10:51:19 UTC
Oops, that wasn't quite right; corrections to follow.
Comment 4 Simon McVittie 2011-01-31 10:52:19 UTC
Created attachment 42763 [details] [review]
[2/3] bus_driver_generate_introspect_string: close <interface> correctly
Comment 5 Simon McVittie 2011-01-31 10:52:53 UTC
Created attachment 42764 [details] [review]
[3/3] bus_driver_generate_introspect_string: don't hard-code Introspect()

Introspectable is now just an interface like any other, so we don't
need to hard-code it.
Comment 6 Colin Walters 2011-02-17 08:29:15 UTC
Still looks fine overall, but I'd prefer that these 3 be squashed together to better preserve bisectability.
Comment 7 Simon McVittie 2011-02-17 09:05:53 UTC
Thanks, I'll commit a squashed version as the first thing in 1.5.x.
Comment 8 Simon McVittie 2011-02-18 06:20:38 UTC
Fixed in master, will be in 1.5.0.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.