Bug 33757 - bus driver should be able to implement several interfaces
Summary: bus driver should be able to implement several interfaces
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: Other All
: medium enhancement
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard: review+ from walters, 1.5
Keywords: patch
Depends on:
Blocks: 34040
  Show dependency treegraph
 
Reported: 2011-01-31 05:50 UTC by Simon McVittie
Modified: 2011-12-15 01:08 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
bus driver: allow implementing more than one interface (8.96 KB, patch)
2011-01-31 05:51 UTC, Simon McVittie
Details | Splinter Review
[2/3] bus_driver_generate_introspect_string: close <interface> correctly (911 bytes, patch)
2011-01-31 10:52 UTC, Simon McVittie
Details | Splinter Review
[3/3] bus_driver_generate_introspect_string: don't hard-code Introspect() (1.27 KB, patch)
2011-01-31 10:52 UTC, Simon McVittie
Details | Splinter Review

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.