]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/helpers/ipc.py
lxc: Mount DMA-BUF Heaps
[waydroid.git] / tools / helpers / ipc.py
index 2ea28e186b1db2691a7a1edfb464f73c3741f505..aa620615bfcae0a2e1e4e01fd110adc2fb0d7541 100644 (file)
@@ -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)