X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/55e0266795bc09436ea45c3ead59d2925762d5c2..a8a93fdc7d40eac2bf60caca3ff81f52f5add92e:/tools/helpers/ipc.py diff --git a/tools/helpers/ipc.py b/tools/helpers/ipc.py index 2ea28e1..aa62061 100644 --- a/tools/helpers/ipc.py +++ b/tools/helpers/ipc.py @@ -3,6 +3,7 @@ # Currently implemented as FIFO import os +import dbus BASE_DIR = "/var/run/" @@ -35,3 +36,9 @@ def notify(channel, msg): def notify_blocking(channel, msg): with open_channel(channel, "w", 1) as channel: channel.write(msg) + +def DBusContainerService(object_path="/ContainerManager", intf="id.waydro.ContainerManager"): + return dbus.Interface(dbus.SystemBus().get_object("id.waydro.Container", object_path), intf) + +def DBusSessionService(object_path="/SessionManager", intf="id.waydro.SessionManager"): + return dbus.Interface(dbus.SessionBus().get_object("id.waydro.Session", object_path), intf)