aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonny Sasaka <sonnysasaka@chromium.org>2018-03-10 01:41:12 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-16 13:30:01 -0700
commit50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0 (patch)
treeaff4b670c3c635f479871eae25c72aad0d71b947
parent0a5aff886985c2687ccd789a6def7e47c34cd1ac (diff)
downloadplatform_external_libbrillo-50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0.tar.gz
platform_external_libbrillo-50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0.tar.bz2
platform_external_libbrillo-50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0.zip
libbrillo: Expose DBusObject of ExportedObjectManager.
ExportedObjectManager subscribes to signals on interface org.freedesktop.DBus.ObjectManager. In D-Bus forwarding case, it may receive expected signals from the forwarded service about InterfacesAdded and InterfacesRemoved but it would be logged as unexpected method calls and pollute the logs. There needs to be a way to freely attach method handlers to the expected methods so we can handle them instead of unnecessarily polluting the logs. BUG=chromium:812468 TEST=Tested with Bluetooth daemon D-Bus forwarding Change-Id: Ifb26a2d7ce800fde4311b18efe36ab5110f0dae4 Reviewed-on: https://chromium-review.googlesource.com/958325 Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org> Tested-by: Sonny Sasaka <sonnysasaka@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org>
-rw-r--r--brillo/dbus/exported_object_manager.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/brillo/dbus/exported_object_manager.h b/brillo/dbus/exported_object_manager.h
index 01dab5b..ea68f33 100644
--- a/brillo/dbus/exported_object_manager.h
+++ b/brillo/dbus/exported_object_manager.h
@@ -108,6 +108,13 @@ class BRILLO_EXPORT ExportedObjectManager
const scoped_refptr<dbus::Bus>& GetBus() const { return bus_; }
+ // Due to D-Bus forwarding, clients may need to access the underlying
+ // DBusObject to handle signals/methods.
+ // TODO(sonnysasaka): Refactor this accessor into a stricter API once we know
+ // what D-Bus forwarding needs when it's completed, without exposing
+ // DBusObject directly.
+ brillo::dbus_utils::DBusObject* dbus_object() { return &dbus_object_; };
+
private:
BRILLO_PRIVATE ObjectMap HandleGetManagedObjects();